47 #define RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \
49 F(GetProperty, 2, 1) \
50 F(KeyedGetProperty, 2, 1) \
51 F(DeleteProperty, 3, 1) \
52 F(HasLocalProperty, 2, 1) \
53 F(HasProperty, 2, 1) \
55 F(IsPropertyEnumerable, 2, 1) \
56 F(GetPropertyNames, 1, 1) \
57 F(GetPropertyNamesFast, 1, 1) \
58 F(GetLocalPropertyNames, 1, 1) \
59 F(GetLocalElementNames, 1, 1) \
60 F(GetInterceptorInfo, 1, 1) \
61 F(GetNamedInterceptorPropertyNames, 1, 1) \
62 F(GetIndexedInterceptorElementNames, 1, 1) \
63 F(GetArgumentsProperty, 1, 1) \
64 F(ToFastProperties, 1, 1) \
65 F(FinishArrayPrototypeSetup, 1, 1) \
66 F(SpecialArrayFunctions, 1, 1) \
67 F(GetDefaultReceiver, 1, 1) \
69 F(GetPrototype, 1, 1) \
70 F(IsInPrototypeChain, 2, 1) \
72 F(GetOwnProperty, 2, 1) \
74 F(IsExtensible, 1, 1) \
75 F(PreventExtensions, 1, 1)\
78 F(CheckIsBootstrapping, 0, 1) \
82 F(GetFunctionDelegate, 1, 1) \
83 F(GetConstructorDelegate, 1, 1) \
84 F(NewArgumentsFast, 3, 1) \
85 F(NewStrictArgumentsFast, 3, 1) \
86 F(LazyCompile, 1, 1) \
87 F(LazyRecompile, 1, 1) \
88 F(ParallelRecompile, 1, 1) \
89 F(NotifyDeoptimized, 1, 1) \
91 F(DeoptimizeFunction, 1, 1) \
92 F(ClearFunctionTypeFeedback, 1, 1) \
93 F(RunningInSimulator, 0, 1) \
94 F(OptimizeFunctionOnNextCall, -1, 1) \
95 F(GetOptimizationStatus, 1, 1) \
96 F(GetOptimizationCount, 1, 1) \
97 F(CompileForOnStackReplacement, 1, 1) \
98 F(SetNewFunctionAttributes, 1, 1) \
99 F(AllocateInNewSpace, 1, 1) \
100 F(SetNativeFlag, 1, 1) \
101 F(StoreArrayLiteralElement, 5, 1) \
102 F(DebugCallbackSupportsStepping, 1, 1) \
103 F(DebugPrepareStepInIfStepping, 1, 1) \
106 F(PushIfAbsent, 2, 1) \
107 F(ArrayConcat, 1, 1) \
113 F(StringToNumber, 1, 1) \
114 F(StringFromCharCodeArray, 1, 1) \
115 F(StringParseInt, 2, 1) \
116 F(StringParseFloat, 1, 1) \
117 F(StringToLowerCase, 1, 1) \
118 F(StringToUpperCase, 1, 1) \
119 F(StringSplit, 3, 1) \
120 F(CharFromCode, 1, 1) \
122 F(URIUnescape, 1, 1) \
123 F(QuoteJSONString, 1, 1) \
124 F(QuoteJSONStringComma, 1, 1) \
125 F(QuoteJSONStringArray, 1, 1) \
127 F(NumberToString, 1, 1) \
128 F(NumberToStringSkipCache, 1, 1) \
129 F(NumberToInteger, 1, 1) \
130 F(NumberToIntegerMapMinusZero, 1, 1) \
131 F(NumberToJSUint32, 1, 1) \
132 F(NumberToJSInt32, 1, 1) \
133 F(NumberToSmi, 1, 1) \
134 F(AllocateHeapNumber, 0, 1) \
142 F(NumberUnaryMinus, 1, 1) \
143 F(NumberAlloc, 0, 1) \
146 F(StringBuilderConcat, 3, 1) \
147 F(StringBuilderJoin, 3, 1) \
148 F(SparseJoinWithSeparator, 3, 1) \
161 F(NumberEquals, 2, 1) \
162 F(StringEquals, 2, 1) \
164 F(NumberCompare, 3, 1) \
165 F(SmiLexicographicCompare, 2, 1) \
166 F(StringCompare, 2, 1) \
172 F(Math_atan2, 2, 1) \
176 F(Math_floor, 1, 1) \
179 F(Math_pow_cfunction, 2, 1) \
180 F(RoundNumber, 1, 1) \
186 F(RegExpCompile, 3, 1) \
187 F(RegExpExec, 4, 1) \
188 F(RegExpExecMultiple, 4, 1) \
189 F(RegExpInitializeObject, 5, 1) \
190 F(RegExpConstructResult, 3, 1) \
196 F(StringCharCodeAt, 2, 1) \
197 F(StringIndexOf, 3, 1) \
198 F(StringLastIndexOf, 3, 1) \
199 F(StringLocaleCompare, 2, 1) \
201 F(StringReplaceRegExpWithString, 4, 1) \
202 F(StringReplaceOneCharWithString, 3, 1) \
203 F(StringMatch, 3, 1) \
204 F(StringTrim, 3, 1) \
205 F(StringToArray, 2, 1) \
206 F(NewStringWrapper, 1, 1) \
209 F(NumberToRadixString, 2, 1) \
210 F(NumberToFixed, 2, 1) \
211 F(NumberToExponential, 2, 1) \
212 F(NumberToPrecision, 2, 1)
214 #define RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
216 F(FunctionSetInstanceClassName, 2, 1) \
217 F(FunctionSetLength, 2, 1) \
218 F(FunctionSetPrototype, 2, 1) \
219 F(FunctionSetReadOnlyPrototype, 1, 1) \
220 F(FunctionGetName, 1, 1) \
221 F(FunctionSetName, 2, 1) \
222 F(FunctionNameShouldPrintAsAnonymous, 1, 1) \
223 F(FunctionMarkNameShouldPrintAsAnonymous, 1, 1) \
224 F(FunctionBindArguments, 4, 1) \
225 F(BoundFunctionGetBindings, 1, 1) \
226 F(FunctionRemovePrototype, 1, 1) \
227 F(FunctionGetSourceCode, 1, 1) \
228 F(FunctionGetScript, 1, 1) \
229 F(FunctionGetScriptSourcePosition, 1, 1) \
230 F(FunctionGetPositionForOffset, 2, 1) \
231 F(FunctionIsAPIFunction, 1, 1) \
232 F(FunctionIsBuiltin, 1, 1) \
234 F(CollectStackTrace, 3, 1) \
235 F(GetV8Version, 0, 1) \
239 F(SetExpectedNumberOfProperties, 2, 1) \
241 F(CreateApiFunction, 1, 1) \
242 F(IsTemplate, 1, 1) \
243 F(GetTemplateField, 2, 1) \
244 F(DisableAccessChecks, 1, 1) \
245 F(EnableAccessChecks, 1, 1) \
248 F(DateCurrentTime, 0, 1) \
249 F(DateParseString, 2, 1) \
250 F(DateLocalTimezone, 1, 1) \
252 F(DateMakeDay, 2, 1) \
253 F(DateSetValue, 3, 1) \
258 F(CompileString, 1, 1) \
259 F(GlobalPrint, 1, 1) \
262 F(GlobalReceiver, 1, 1) \
263 F(ResolvePossiblyDirectEval, 5, 2) \
265 F(SetProperty, -1 , 1) \
266 F(DefineOrRedefineDataProperty, 4, 1) \
267 F(DefineOrRedefineAccessorProperty, 5, 1) \
268 F(IgnoreAttributesAndSetProperty, -1 , 1) \
271 F(RemoveArrayHoles, 2, 1) \
272 F(GetArrayKeys, 2, 1) \
273 F(MoveArrayContents, 2, 1) \
274 F(EstimateNumberOfElements, 1, 1) \
277 F(LookupAccessor, 3, 1) \
280 F(MaterializeRegExpLiteral, 4, 1)\
281 F(CreateObjectLiteral, 4, 1) \
282 F(CreateObjectLiteralShallow, 4, 1) \
283 F(CreateArrayLiteral, 3, 1) \
284 F(CreateArrayLiteralShallow, 3, 1) \
287 F(IsJSModule, 1, 1) \
290 F(CreateJSProxy, 2, 1) \
291 F(CreateJSFunctionProxy, 4, 1) \
293 F(IsJSFunctionProxy, 1, 1) \
294 F(GetHandler, 1, 1) \
295 F(GetCallTrap, 1, 1) \
296 F(GetConstructTrap, 1, 1) \
300 F(SetInitialize, 1, 1) \
306 F(MapInitialize, 1, 1) \
313 F(WeakMapInitialize, 1, 1) \
314 F(WeakMapGet, 2, 1) \
315 F(WeakMapHas, 2, 1) \
316 F(WeakMapDelete, 2, 1) \
317 F(WeakMapSet, 3, 1) \
320 F(NewClosure, 3, 1) \
322 F(NewObjectFromBound, 1, 1) \
323 F(FinalizeInstanceSize, 1, 1) \
326 F(ThrowReferenceError, 1, 1) \
327 F(ThrowNotDateError, 0, 1) \
328 F(StackGuard, 0, 1) \
330 F(PromoteScheduledException, 0, 1) \
333 F(NewGlobalContext, 2, 1) \
334 F(NewFunctionContext, 1, 1) \
335 F(PushWithContext, 2, 1) \
336 F(PushCatchContext, 3, 1) \
337 F(PushBlockContext, 2, 1) \
338 F(PushModuleContext, 1, 1) \
339 F(DeleteContextSlot, 2, 1) \
340 F(LoadContextSlot, 2, 2) \
341 F(LoadContextSlotNoReferenceError, 2, 2) \
342 F(StoreContextSlot, 4, 1) \
345 F(DeclareGlobals, 3, 1) \
346 F(DeclareContextSlot, 4, 1) \
347 F(InitializeVarGlobal, -1 , 1) \
348 F(InitializeConstGlobal, 2, 1) \
349 F(InitializeConstContextSlot, 3, 1) \
350 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
353 F(DebugPrint, 1, 1) \
354 F(DebugTrace, 0, 1) \
355 F(TraceEnter, 0, 1) \
363 F(GetFromCache, 2, 1) \
366 F(NewMessageObject, 2, 1) \
367 F(MessageGetType, 1, 1) \
368 F(MessageGetArguments, 1, 1) \
369 F(MessageGetStartPosition, 1, 1) \
370 F(MessageGetScript, 1, 1) \
376 F(HasFastSmiElements, 1, 1) \
377 F(HasFastSmiOrObjectElements, 1, 1) \
378 F(HasFastObjectElements, 1, 1) \
379 F(HasFastDoubleElements, 1, 1) \
380 F(HasFastHoleyElements, 1, 1) \
381 F(HasDictionaryElements, 1, 1) \
382 F(HasExternalPixelElements, 1, 1) \
383 F(HasExternalArrayElements, 1, 1) \
384 F(HasExternalByteElements, 1, 1) \
385 F(HasExternalUnsignedByteElements, 1, 1) \
386 F(HasExternalShortElements, 1, 1) \
387 F(HasExternalUnsignedShortElements, 1, 1) \
388 F(HasExternalIntElements, 1, 1) \
389 F(HasExternalUnsignedIntElements, 1, 1) \
390 F(HasExternalFloatElements, 1, 1) \
391 F(HasExternalDoubleElements, 1, 1) \
392 F(HasFastProperties, 1, 1) \
393 F(TransitionElementsSmiToDouble, 1, 1) \
394 F(TransitionElementsDoubleToObject, 1, 1) \
395 F(HaveSameMap, 2, 1) \
397 F(ProfilerResume, 0, 1) \
398 F(ProfilerPause, 0, 1)
401 #ifdef ENABLE_DEBUGGER_SUPPORT
402 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
404 F(DebugBreak, 0, 1) \
405 F(SetDebugEventListener, 2, 1) \
407 F(DebugGetPropertyDetails, 2, 1) \
408 F(DebugGetProperty, 2, 1) \
409 F(DebugPropertyTypeFromDetails, 1, 1) \
410 F(DebugPropertyAttributesFromDetails, 1, 1) \
411 F(DebugPropertyIndexFromDetails, 1, 1) \
412 F(DebugNamedInterceptorPropertyValue, 2, 1) \
413 F(DebugIndexedInterceptorElementValue, 2, 1) \
414 F(CheckExecutionState, 1, 1) \
415 F(GetFrameCount, 1, 1) \
416 F(GetFrameDetails, 2, 1) \
417 F(GetScopeCount, 2, 1) \
418 F(GetScopeDetails, 4, 1) \
419 F(GetFunctionScopeCount, 1, 1) \
420 F(GetFunctionScopeDetails, 2, 1) \
421 F(DebugPrintScopes, 0, 1) \
422 F(GetThreadCount, 1, 1) \
423 F(GetThreadDetails, 2, 1) \
424 F(SetDisableBreak, 1, 1) \
425 F(GetBreakLocations, 1, 1) \
426 F(SetFunctionBreakPoint, 3, 1) \
427 F(SetScriptBreakPoint, 3, 1) \
428 F(ClearBreakPoint, 1, 1) \
429 F(ChangeBreakOnException, 2, 1) \
430 F(IsBreakOnException, 1, 1) \
431 F(PrepareStep, 3, 1) \
432 F(ClearStepping, 0, 1) \
433 F(DebugEvaluate, 6, 1) \
434 F(DebugEvaluateGlobal, 4, 1) \
435 F(DebugGetLoadedScripts, 0, 1) \
436 F(DebugReferencedBy, 3, 1) \
437 F(DebugConstructedBy, 2, 1) \
438 F(DebugGetPrototype, 1, 1) \
439 F(DebugSetScriptSource, 2, 1) \
440 F(SystemBreak, 0, 1) \
441 F(DebugDisassembleFunction, 1, 1) \
442 F(DebugDisassembleConstructor, 1, 1) \
443 F(FunctionGetInferredName, 1, 1) \
444 F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \
445 F(LiveEditGatherCompileInfo, 2, 1) \
446 F(LiveEditReplaceScript, 3, 1) \
447 F(LiveEditReplaceFunctionCode, 2, 1) \
448 F(LiveEditFunctionSourceUpdated, 1, 1) \
449 F(LiveEditFunctionSetScript, 2, 1) \
450 F(LiveEditReplaceRefToNestedFunction, 3, 1) \
451 F(LiveEditPatchFunctionPositions, 2, 1) \
452 F(LiveEditCheckAndDropActivations, 2, 1) \
453 F(LiveEditCompareStrings, 2, 1) \
454 F(LiveEditRestartFrame, 2, 1) \
455 F(GetFunctionCodePositionFromSource, 2, 1) \
456 F(ExecuteInDebugContext, 2, 1) \
459 F(CollectGarbage, 1, 1) \
460 F(GetHeapUsage, 0, 1) \
463 F(HasLOLEnabled, 0, 1) \
464 F(CaptureLOL, 0, 1) \
468 F(GetLOLObjId, 1, 1) \
469 F(GetLOLObjRetainers, 6, 1) \
470 F(GetLOLPath, 3, 1) \
472 F(PrintLOLObj, 1, 1) \
474 F(SummarizeLOL, 3, 1)
477 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F)
481 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \
485 #define RUNTIME_FUNCTION_LIST_DEBUG(F)
493 #define RUNTIME_FUNCTION_LIST(F) \
494 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \
495 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
496 RUNTIME_FUNCTION_LIST_DEBUG(F) \
497 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F)
503 #define INLINE_FUNCTION_LIST(F) \
505 F(IsNonNegativeSmi, 1, 1) \
508 F(IsConstructCall, 0, 1) \
509 F(CallFunction, -1 , 1) \
510 F(ArgumentsLength, 0, 1) \
513 F(SetValueOf, 2, 1) \
514 F(DateField, 2 , 1) \
515 F(StringCharFromCode, 1, 1) \
516 F(StringCharAt, 2, 1) \
517 F(ObjectEquals, 2, 1) \
518 F(RandomHeapNumber, 0, 1) \
520 F(IsFunction, 1, 1) \
521 F(IsUndetectableObject, 1, 1) \
522 F(IsSpecObject, 1, 1) \
523 F(IsStringWrapperSafeForDefaultValueOf, 1, 1) \
530 F(IsRegExpEquivalent, 2, 1) \
531 F(HasCachedArrayIndex, 1, 1) \
532 F(GetCachedArrayIndex, 1, 1) \
533 F(FastAsciiArrayJoin, 2, 1)
541 #define INLINE_RUNTIME_FUNCTION_LIST(F) \
543 F(StringCharCodeAt, 2, 1) \
547 F(StringCompare, 2, 1) \
548 F(RegExpExec, 4, 1) \
549 F(RegExpConstructResult, 3, 1) \
550 F(GetFromCache, 2, 1) \
551 F(NumberToString, 1, 1)
560 return &string_input_buffer_;
563 return &to_upper_mapping_;
566 return &to_lower_mapping_;
569 return &string_input_buffer_compare_bufx_;
572 return &string_input_buffer_compare_bufy_;
575 return &string_locale_compare_buf1_;
578 return &string_locale_compare_buf2_;
584 StaticResource<StringInputBuffer> string_input_buffer_;
587 StringInputBuffer string_input_buffer_compare_bufx_;
588 StringInputBuffer string_input_buffer_compare_bufy_;
589 StringInputBuffer string_locale_compare_buf1_;
590 StringInputBuffer string_locale_compare_buf2_;
602 #define F(name, nargs, ressize) k##name,
605 #define F(name, nargs, ressize) kInline##name,
712 #endif // V8_RUNTIME_H_
#define INLINE_FUNCTION_LIST(F)
static const int kNotFound
static const Function * FunctionForSymbol(Handle< String > name)
static void PerformGC(Object *result)
static MUST_USE_RESULT MaybeObject * ForceDeleteObjectProperty(Isolate *isolate, Handle< JSReceiver > object, Handle< Object > key)
static MUST_USE_RESULT MaybeObject * SetObjectProperty(Isolate *isolate, Handle< Object > object, Handle< Object > key, Handle< Object > value, PropertyAttributes attr, StrictModeFlag strict_mode)
static const Function * FunctionForId(FunctionId id)
StringInputBuffer * string_input_buffer_compare_bufy()
#define RUNTIME_FUNCTION_LIST(F)
static MUST_USE_RESULT MaybeObject * InitializeIntrinsicFunctionNames(Heap *heap, Object *dictionary)
StringInputBuffer * string_locale_compare_buf2()
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
IntrinsicType intrinsic_type
unibrow::Mapping< unibrow::ToUppercase, 128 > * to_upper_mapping()
static int StringMatch(Isolate *isolate, Handle< String > sub, Handle< String > pat, int index)
static bool IsUpperCaseChar(RuntimeState *runtime_state, uint16_t ch)
static Handle< Object > CreateArrayLiteralBoilerplate(Isolate *isolate, Handle< FixedArray > literals, Handle< FixedArray > elements)
StringInputBuffer * string_input_buffer_compare_bufx()
static MUST_USE_RESULT MaybeObject * GetObjectProperty(Isolate *isolate, Handle< Object > object, Handle< Object > key)
static MUST_USE_RESULT MaybeObject * ForceSetObjectProperty(Isolate *isolate, Handle< JSObject > object, Handle< Object > key, Handle< Object > value, PropertyAttributes attr)
StaticResource< StringInputBuffer > * string_input_buffer()
unibrow::Mapping< unibrow::ToLowercase, 128 > * to_lower_mapping()
#define INLINE_RUNTIME_FUNCTION_LIST(F)
StringInputBuffer * string_locale_compare_buf1()
static MUST_USE_RESULT MaybeObject * GetElementOrCharAt(Isolate *isolate, Handle< Object > object, uint32_t index)