| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_H_ |
| 6 #define V8_RUNTIME_H_ | 6 #define V8_RUNTIME_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/zone.h" | 9 #include "src/zone.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 // The interface to C++ runtime functions. | 14 // The interface to C++ runtime functions. |
| 15 | 15 |
| 16 // ---------------------------------------------------------------------------- | 16 // ---------------------------------------------------------------------------- |
| 17 // RUNTIME_FUNCTION_LIST_ALWAYS defines runtime calls available in both | 17 // RUNTIME_FUNCTION_LIST_ALWAYS defines runtime calls available in both |
| 18 // release and debug mode. | 18 // release and debug mode. |
| 19 // This macro should only be used by the macro RUNTIME_FUNCTION_LIST. | 19 // This macro should only be used by the macro RUNTIME_FUNCTION_LIST. |
| 20 | 20 |
| 21 // WARNING: RUNTIME_FUNCTION_LIST_ALWAYS_* is a very large macro that caused | 21 // WARNING: RUNTIME_FUNCTION_LIST_ALWAYS_* is a very large macro that caused |
| 22 // MSVC Intellisense to crash. It was broken into two macros to work around | 22 // MSVC Intellisense to crash. It was broken into two macros to work around |
| 23 // this problem. Please avoid large recursive macros whenever possible. | 23 // this problem. Please avoid large recursive macros whenever possible. |
| 24 #define RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \ | 24 #define RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \ |
| 25 /* Property access */ \ | 25 /* Property access */ \ |
| 26 F(GetProperty, 2, 1) \ | 26 F(GetProperty, 2, 1) \ |
| 27 F(KeyedGetProperty, 2, 1) \ | 27 F(KeyedGetProperty, 2, 1) \ |
| 28 F(DeleteProperty, 3, 1) \ | 28 F(DeleteProperty, 3, 1) \ |
| 29 F(HasOwnProperty, 2, 1) \ | 29 F(HasOwnProperty, 2, 1) \ |
| 30 F(HasProperty, 2, 1) \ | 30 F(HasProperty, 2, 1) \ |
| 31 F(HasElement, 2, 1) \ | 31 F(HasElement, 2, 1) \ |
| 32 F(IsPropertyEnumerable, 2, 1) \ | 32 F(IsPropertyEnumerable, 2, 1) \ |
| 33 F(GetPropertyNames, 1, 1) \ | 33 F(GetPropertyNames, 1, 1) \ |
| 34 F(GetPropertyNamesFast, 1, 1) \ | 34 F(GetPropertyNamesFast, 1, 1) \ |
| 35 F(GetOwnPropertyNames, 2, 1) \ | 35 F(GetOwnPropertyNames, 2, 1) \ |
| 36 F(GetOwnElementNames, 1, 1) \ | 36 F(GetOwnElementNames, 1, 1) \ |
| 37 F(GetInterceptorInfo, 1, 1) \ | 37 F(GetInterceptorInfo, 1, 1) \ |
| 38 F(GetNamedInterceptorPropertyNames, 1, 1) \ | 38 F(GetNamedInterceptorPropertyNames, 1, 1) \ |
| 39 F(GetIndexedInterceptorElementNames, 1, 1) \ | 39 F(GetIndexedInterceptorElementNames, 1, 1) \ |
| 40 F(GetArgumentsProperty, 1, 1) \ | 40 F(GetArgumentsProperty, 1, 1) \ |
| 41 F(ToFastProperties, 1, 1) \ | 41 F(ToFastProperties, 1, 1) \ |
| 42 F(FinishArrayPrototypeSetup, 1, 1) \ | 42 F(FinishArrayPrototypeSetup, 1, 1) \ |
| 43 F(SpecialArrayFunctions, 0, 1) \ | 43 F(SpecialArrayFunctions, 0, 1) \ |
| 44 F(IsSloppyModeFunction, 1, 1) \ | 44 F(IsSloppyModeFunction, 1, 1) \ |
| 45 F(GetDefaultReceiver, 1, 1) \ | 45 F(GetDefaultReceiver, 1, 1) \ |
| 46 \ | 46 \ |
| 47 F(GetPrototype, 1, 1) \ | 47 F(GetPrototype, 1, 1) \ |
| 48 F(SetPrototype, 2, 1) \ | 48 F(SetPrototype, 2, 1) \ |
| 49 F(IsInPrototypeChain, 2, 1) \ | 49 F(IsInPrototypeChain, 2, 1) \ |
| 50 \ | 50 \ |
| 51 F(GetOwnProperty, 2, 1) \ | 51 F(GetOwnProperty, 2, 1) \ |
| 52 \ | 52 \ |
| 53 F(IsExtensible, 1, 1) \ | 53 F(IsExtensible, 1, 1) \ |
| 54 F(PreventExtensions, 1, 1)\ | 54 F(PreventExtensions, 1, 1) \ |
| 55 \ | 55 \ |
| 56 /* Utilities */ \ | 56 /* Utilities */ \ |
| 57 F(CheckIsBootstrapping, 0, 1) \ | 57 F(CheckIsBootstrapping, 0, 1) \ |
| 58 F(GetRootNaN, 0, 1) \ | 58 F(GetRootNaN, 0, 1) \ |
| 59 F(Call, -1 /* >= 2 */, 1) \ | 59 F(Call, -1 /* >= 2 */, 1) \ |
| 60 F(Apply, 5, 1) \ | 60 F(Apply, 5, 1) \ |
| 61 F(GetFunctionDelegate, 1, 1) \ | 61 F(GetFunctionDelegate, 1, 1) \ |
| 62 F(GetConstructorDelegate, 1, 1) \ | 62 F(GetConstructorDelegate, 1, 1) \ |
| 63 F(DeoptimizeFunction, 1, 1) \ | 63 F(DeoptimizeFunction, 1, 1) \ |
| 64 F(ClearFunctionTypeFeedback, 1, 1) \ | 64 F(ClearFunctionTypeFeedback, 1, 1) \ |
| 65 F(RunningInSimulator, 0, 1) \ | 65 F(RunningInSimulator, 0, 1) \ |
| 66 F(IsConcurrentRecompilationSupported, 0, 1) \ | 66 F(IsConcurrentRecompilationSupported, 0, 1) \ |
| 67 F(OptimizeFunctionOnNextCall, -1, 1) \ | 67 F(OptimizeFunctionOnNextCall, -1, 1) \ |
| 68 F(NeverOptimizeFunction, 1, 1) \ | 68 F(NeverOptimizeFunction, 1, 1) \ |
| 69 F(GetOptimizationStatus, -1, 1) \ | 69 F(GetOptimizationStatus, -1, 1) \ |
| 70 F(GetOptimizationCount, 1, 1) \ | 70 F(IsOptimized, 0, 1) /* TODO(turbofan): Only temporary */ \ |
| 71 F(UnblockConcurrentRecompilation, 0, 1) \ | 71 F(GetOptimizationCount, 1, 1) \ |
| 72 F(CompileForOnStackReplacement, 1, 1) \ | 72 F(UnblockConcurrentRecompilation, 0, 1) \ |
| 73 F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \ | 73 F(CompileForOnStackReplacement, 1, 1) \ |
| 74 F(SetNativeFlag, 1, 1) \ | 74 F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \ |
| 75 F(SetInlineBuiltinFlag, 1, 1) \ | 75 F(SetNativeFlag, 1, 1) \ |
| 76 F(StoreArrayLiteralElement, 5, 1) \ | 76 F(SetInlineBuiltinFlag, 1, 1) \ |
| 77 F(DebugPrepareStepInIfStepping, 1, 1) \ | 77 F(StoreArrayLiteralElement, 5, 1) \ |
| 78 F(DebugPromiseHandlePrologue, 1, 1) \ | 78 F(DebugPrepareStepInIfStepping, 1, 1) \ |
| 79 F(DebugPromiseHandleEpilogue, 0, 1) \ | 79 F(DebugPromiseHandlePrologue, 1, 1) \ |
| 80 F(DebugPromiseEvent, 1, 1) \ | 80 F(DebugPromiseHandleEpilogue, 0, 1) \ |
| 81 F(DebugAsyncTaskEvent, 1, 1) \ | 81 F(DebugPromiseEvent, 1, 1) \ |
| 82 F(FlattenString, 1, 1) \ | 82 F(DebugAsyncTaskEvent, 1, 1) \ |
| 83 F(LoadMutableDouble, 2, 1) \ | 83 F(FlattenString, 1, 1) \ |
| 84 F(TryMigrateInstance, 1, 1) \ | 84 F(LoadMutableDouble, 2, 1) \ |
| 85 F(NotifyContextDisposed, 0, 1) \ | 85 F(TryMigrateInstance, 1, 1) \ |
| 86 \ | 86 F(NotifyContextDisposed, 0, 1) \ |
| 87 /* Array join support */ \ | 87 \ |
| 88 F(PushIfAbsent, 2, 1) \ | 88 /* Array join support */ \ |
| 89 F(ArrayConcat, 1, 1) \ | 89 F(PushIfAbsent, 2, 1) \ |
| 90 \ | 90 F(ArrayConcat, 1, 1) \ |
| 91 /* Conversions */ \ | 91 \ |
| 92 F(ToBool, 1, 1) \ | 92 /* Conversions */ \ |
| 93 F(Typeof, 1, 1) \ | 93 F(ToBool, 1, 1) \ |
| 94 \ | 94 F(Typeof, 1, 1) \ |
| 95 F(StringToNumber, 1, 1) \ | 95 \ |
| 96 F(StringParseInt, 2, 1) \ | 96 F(Booleanize, 2, 1) /* TODO(turbofan): Only temporary */ \ |
| 97 F(StringParseFloat, 1, 1) \ | 97 \ |
| 98 F(StringToLowerCase, 1, 1) \ | 98 F(StringToNumber, 1, 1) \ |
| 99 F(StringToUpperCase, 1, 1) \ | 99 F(StringParseInt, 2, 1) \ |
| 100 F(StringSplit, 3, 1) \ | 100 F(StringParseFloat, 1, 1) \ |
| 101 F(CharFromCode, 1, 1) \ | 101 F(StringToLowerCase, 1, 1) \ |
| 102 F(URIEscape, 1, 1) \ | 102 F(StringToUpperCase, 1, 1) \ |
| 103 F(URIUnescape, 1, 1) \ | 103 F(StringSplit, 3, 1) \ |
| 104 \ | 104 F(CharFromCode, 1, 1) \ |
| 105 F(NumberToInteger, 1, 1) \ | 105 F(URIEscape, 1, 1) \ |
| 106 F(NumberToIntegerMapMinusZero, 1, 1) \ | 106 F(URIUnescape, 1, 1) \ |
| 107 F(NumberToJSUint32, 1, 1) \ | 107 \ |
| 108 F(NumberToJSInt32, 1, 1) \ | 108 F(NumberToInteger, 1, 1) \ |
| 109 \ | 109 F(NumberToIntegerMapMinusZero, 1, 1) \ |
| 110 /* Arithmetic operations */ \ | 110 F(NumberToJSUint32, 1, 1) \ |
| 111 F(NumberAdd, 2, 1) \ | 111 F(NumberToJSInt32, 1, 1) \ |
| 112 F(NumberSub, 2, 1) \ | 112 \ |
| 113 F(NumberMul, 2, 1) \ | 113 /* Arithmetic operations */ \ |
| 114 F(NumberDiv, 2, 1) \ | 114 F(NumberAdd, 2, 1) \ |
| 115 F(NumberMod, 2, 1) \ | 115 F(NumberSub, 2, 1) \ |
| 116 F(NumberUnaryMinus, 1, 1) \ | 116 F(NumberMul, 2, 1) \ |
| 117 F(NumberImul, 2, 1) \ | 117 F(NumberDiv, 2, 1) \ |
| 118 \ | 118 F(NumberMod, 2, 1) \ |
| 119 F(StringBuilderConcat, 3, 1) \ | 119 F(NumberUnaryMinus, 1, 1) \ |
| 120 F(StringBuilderJoin, 3, 1) \ | 120 F(NumberImul, 2, 1) \ |
| 121 F(SparseJoinWithSeparator, 3, 1) \ | 121 \ |
| 122 \ | 122 F(StringBuilderConcat, 3, 1) \ |
| 123 /* Bit operations */ \ | 123 F(StringBuilderJoin, 3, 1) \ |
| 124 F(NumberOr, 2, 1) \ | 124 F(SparseJoinWithSeparator, 3, 1) \ |
| 125 F(NumberAnd, 2, 1) \ | 125 \ |
| 126 F(NumberXor, 2, 1) \ | 126 /* Bit operations */ \ |
| 127 \ | 127 F(NumberOr, 2, 1) \ |
| 128 F(NumberShl, 2, 1) \ | 128 F(NumberAnd, 2, 1) \ |
| 129 F(NumberShr, 2, 1) \ | 129 F(NumberXor, 2, 1) \ |
| 130 F(NumberSar, 2, 1) \ | 130 \ |
| 131 \ | 131 F(NumberShl, 2, 1) \ |
| 132 /* Comparisons */ \ | 132 F(NumberShr, 2, 1) \ |
| 133 F(NumberEquals, 2, 1) \ | 133 F(NumberSar, 2, 1) \ |
| 134 F(StringEquals, 2, 1) \ | 134 \ |
| 135 \ | 135 /* Comparisons */ \ |
| 136 F(NumberCompare, 3, 1) \ | 136 F(NumberEquals, 2, 1) \ |
| 137 F(SmiLexicographicCompare, 2, 1) \ | 137 F(StringEquals, 2, 1) \ |
| 138 \ | 138 \ |
| 139 /* Math */ \ | 139 F(NumberCompare, 3, 1) \ |
| 140 F(MathAcos, 1, 1) \ | 140 F(SmiLexicographicCompare, 2, 1) \ |
| 141 F(MathAsin, 1, 1) \ | 141 \ |
| 142 F(MathAtan, 1, 1) \ | 142 /* Math */ \ |
| 143 F(MathFloorRT, 1, 1) \ | 143 F(MathAcos, 1, 1) \ |
| 144 F(MathAtan2, 2, 1) \ | 144 F(MathAsin, 1, 1) \ |
| 145 F(MathExpRT, 1, 1) \ | 145 F(MathAtan, 1, 1) \ |
| 146 F(RoundNumber, 1, 1) \ | 146 F(MathFloorRT, 1, 1) \ |
| 147 F(MathFround, 1, 1) \ | 147 F(MathAtan2, 2, 1) \ |
| 148 \ | 148 F(MathExpRT, 1, 1) \ |
| 149 /* Regular expressions */ \ | 149 F(RoundNumber, 1, 1) \ |
| 150 F(RegExpCompile, 3, 1) \ | 150 F(MathFround, 1, 1) \ |
| 151 F(RegExpExecMultiple, 4, 1) \ | 151 \ |
| 152 F(RegExpInitializeObject, 5, 1) \ | 152 /* Regular expressions */ \ |
| 153 \ | 153 F(RegExpCompile, 3, 1) \ |
| 154 /* JSON */ \ | 154 F(RegExpExecMultiple, 4, 1) \ |
| 155 F(ParseJson, 1, 1) \ | 155 F(RegExpInitializeObject, 5, 1) \ |
| 156 F(BasicJSONStringify, 1, 1) \ | 156 \ |
| 157 F(QuoteJSONString, 1, 1) \ | 157 /* JSON */ \ |
| 158 \ | 158 F(ParseJson, 1, 1) \ |
| 159 /* Strings */ \ | 159 F(BasicJSONStringify, 1, 1) \ |
| 160 F(StringIndexOf, 3, 1) \ | 160 F(QuoteJSONString, 1, 1) \ |
| 161 F(StringLastIndexOf, 3, 1) \ | 161 \ |
| 162 F(StringLocaleCompare, 2, 1) \ | 162 /* Strings */ \ |
| 163 F(StringReplaceGlobalRegExpWithString, 4, 1) \ | 163 F(StringIndexOf, 3, 1) \ |
| 164 F(StringReplaceOneCharWithString, 3, 1) \ | 164 F(StringLastIndexOf, 3, 1) \ |
| 165 F(StringMatch, 3, 1) \ | 165 F(StringLocaleCompare, 2, 1) \ |
| 166 F(StringTrim, 3, 1) \ | 166 F(StringReplaceGlobalRegExpWithString, 4, 1) \ |
| 167 F(StringToArray, 2, 1) \ | 167 F(StringReplaceOneCharWithString, 3, 1) \ |
| 168 F(NewStringWrapper, 1, 1) \ | 168 F(StringMatch, 3, 1) \ |
| 169 F(NewString, 2, 1) \ | 169 F(StringTrim, 3, 1) \ |
| 170 F(TruncateString, 2, 1) \ | 170 F(StringToArray, 2, 1) \ |
| 171 \ | 171 F(NewStringWrapper, 1, 1) \ |
| 172 /* Numbers */ \ | 172 F(NewString, 2, 1) \ |
| 173 F(NumberToRadixString, 2, 1) \ | 173 F(TruncateString, 2, 1) \ |
| 174 F(NumberToFixed, 2, 1) \ | 174 \ |
| 175 F(NumberToExponential, 2, 1) \ | 175 /* Numbers */ \ |
| 176 F(NumberToPrecision, 2, 1) \ | 176 F(NumberToRadixString, 2, 1) \ |
| 177 F(NumberToFixed, 2, 1) \ |
| 178 F(NumberToExponential, 2, 1) \ |
| 179 F(NumberToPrecision, 2, 1) \ |
| 177 F(IsValidSmi, 1, 1) | 180 F(IsValidSmi, 1, 1) |
| 178 | 181 |
| 179 | 182 |
| 180 #define RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ | 183 #define RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ |
| 181 /* Reflection */ \ | 184 /* Reflection */ \ |
| 182 F(FunctionSetInstanceClassName, 2, 1) \ | 185 F(FunctionSetInstanceClassName, 2, 1) \ |
| 183 F(FunctionSetLength, 2, 1) \ | 186 F(FunctionSetLength, 2, 1) \ |
| 184 F(FunctionSetPrototype, 2, 1) \ | 187 F(FunctionSetPrototype, 2, 1) \ |
| 185 F(FunctionGetName, 1, 1) \ | 188 F(FunctionGetName, 1, 1) \ |
| 186 F(FunctionSetName, 2, 1) \ | 189 F(FunctionSetName, 2, 1) \ |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 F(HasFixedUint8Elements, 1, 1) \ | 397 F(HasFixedUint8Elements, 1, 1) \ |
| 395 F(HasFixedInt16Elements, 1, 1) \ | 398 F(HasFixedInt16Elements, 1, 1) \ |
| 396 F(HasFixedUint16Elements, 1, 1) \ | 399 F(HasFixedUint16Elements, 1, 1) \ |
| 397 F(HasFixedInt32Elements, 1, 1) \ | 400 F(HasFixedInt32Elements, 1, 1) \ |
| 398 F(HasFixedUint32Elements, 1, 1) \ | 401 F(HasFixedUint32Elements, 1, 1) \ |
| 399 F(HasFixedFloat32Elements, 1, 1) \ | 402 F(HasFixedFloat32Elements, 1, 1) \ |
| 400 F(HasFixedFloat64Elements, 1, 1) \ | 403 F(HasFixedFloat64Elements, 1, 1) \ |
| 401 F(HasFastProperties, 1, 1) \ | 404 F(HasFastProperties, 1, 1) \ |
| 402 F(TransitionElementsKind, 2, 1) \ | 405 F(TransitionElementsKind, 2, 1) \ |
| 403 F(HaveSameMap, 2, 1) \ | 406 F(HaveSameMap, 2, 1) \ |
| 404 F(IsJSGlobalProxy, 1, 1) | 407 F(IsJSGlobalProxy, 1, 1) \ |
| 408 F(ForInInit, 2, 2) /* TODO(turbofan): Only temporary */ \ |
| 409 F(ForInNext, 4, 2) /* TODO(turbofan): Only temporary */ \ |
| 410 F(ForInCacheArrayLength, 2, 1) /* TODO(turbofan): Only temporary */ |
| 405 | 411 |
| 406 | 412 |
| 407 #define RUNTIME_FUNCTION_LIST_ALWAYS_3(F) \ | 413 #define RUNTIME_FUNCTION_LIST_ALWAYS_3(F) \ |
| 408 /* String and Regexp */ \ | 414 /* String and Regexp */ \ |
| 409 F(NumberToStringRT, 1, 1) \ | 415 F(NumberToStringRT, 1, 1) \ |
| 410 F(RegExpConstructResult, 3, 1) \ | 416 F(RegExpConstructResult, 3, 1) \ |
| 411 F(RegExpExecRT, 4, 1) \ | 417 F(RegExpExecRT, 4, 1) \ |
| 412 F(StringAdd, 2, 1) \ | 418 F(StringAdd, 2, 1) \ |
| 413 F(SubString, 3, 1) \ | 419 F(SubString, 3, 1) \ |
| 414 F(InternalizeString, 1, 1) \ | 420 F(InternalizeString, 1, 1) \ |
| 415 F(StringCompare, 2, 1) \ | 421 F(StringCompare, 2, 1) \ |
| 416 F(StringCharCodeAtRT, 2, 1) \ | 422 F(StringCharCodeAtRT, 2, 1) \ |
| 417 F(GetFromCache, 2, 1) \ | 423 F(GetFromCache, 2, 1) \ |
| 418 \ | 424 \ |
| 419 /* Compilation */ \ | 425 /* Compilation */ \ |
| 420 F(CompileUnoptimized, 1, 1) \ | 426 F(CompileUnoptimized, 1, 1) \ |
| 421 F(CompileOptimized, 2, 1) \ | 427 F(CompileOptimized, 2, 1) \ |
| 422 F(TryInstallOptimizedCode, 1, 1) \ | 428 F(TryInstallOptimizedCode, 1, 1) \ |
| 423 F(NotifyDeoptimized, 1, 1) \ | 429 F(NotifyDeoptimized, 1, 1) \ |
| 424 F(NotifyStubFailure, 0, 1) \ | 430 F(NotifyStubFailure, 0, 1) \ |
| 425 \ | 431 \ |
| 426 /* Utilities */ \ | 432 /* Utilities */ \ |
| 427 F(AllocateInNewSpace, 1, 1) \ | 433 F(AllocateInNewSpace, 1, 1) \ |
| 428 F(AllocateInTargetSpace, 2, 1) \ | 434 F(AllocateInTargetSpace, 2, 1) \ |
| 429 F(AllocateHeapNumber, 0, 1) \ | 435 F(AllocateHeapNumber, 0, 1) \ |
| 430 F(NumberToSmi, 1, 1) \ | 436 F(NumberToSmi, 1, 1) \ |
| 431 F(NumberToStringSkipCache, 1, 1) \ | 437 F(NumberToStringSkipCache, 1, 1) \ |
| 432 \ | 438 \ |
| 439 F(NewArguments, 1, 1) /* TODO(turbofan): Only temporary */ \ |
| 433 F(NewSloppyArguments, 3, 1) \ | 440 F(NewSloppyArguments, 3, 1) \ |
| 434 F(NewStrictArguments, 3, 1) \ | 441 F(NewStrictArguments, 3, 1) \ |
| 435 \ | 442 \ |
| 436 /* Harmony generators */ \ | 443 /* Harmony generators */ \ |
| 437 F(CreateJSGeneratorObject, 0, 1) \ | 444 F(CreateJSGeneratorObject, 0, 1) \ |
| 438 F(SuspendJSGeneratorObject, 1, 1) \ | 445 F(SuspendJSGeneratorObject, 1, 1) \ |
| 439 F(ResumeJSGeneratorObject, 3, 1) \ | 446 F(ResumeJSGeneratorObject, 3, 1) \ |
| 440 F(ThrowGeneratorStateError, 1, 1) \ | 447 F(ThrowGeneratorStateError, 1, 1) \ |
| 441 \ | 448 \ |
| 442 /* Arrays */ \ | 449 /* Arrays */ \ |
| (...skipping 22 matching lines...) Expand all Loading... |
| 465 \ | 472 \ |
| 466 /* Contexts */ \ | 473 /* Contexts */ \ |
| 467 F(NewGlobalContext, 2, 1) \ | 474 F(NewGlobalContext, 2, 1) \ |
| 468 F(NewFunctionContext, 1, 1) \ | 475 F(NewFunctionContext, 1, 1) \ |
| 469 F(PushWithContext, 2, 1) \ | 476 F(PushWithContext, 2, 1) \ |
| 470 F(PushCatchContext, 3, 1) \ | 477 F(PushCatchContext, 3, 1) \ |
| 471 F(PushBlockContext, 2, 1) \ | 478 F(PushBlockContext, 2, 1) \ |
| 472 F(PushModuleContext, 2, 1) \ | 479 F(PushModuleContext, 2, 1) \ |
| 473 F(DeleteLookupSlot, 2, 1) \ | 480 F(DeleteLookupSlot, 2, 1) \ |
| 474 F(LoadLookupSlot, 2, 2) \ | 481 F(LoadLookupSlot, 2, 2) \ |
| 482 F(LoadContextRelative, 3, 1) /* TODO(turbofan): Only temporary */ \ |
| 475 F(LoadLookupSlotNoReferenceError, 2, 2) \ | 483 F(LoadLookupSlotNoReferenceError, 2, 2) \ |
| 476 F(StoreLookupSlot, 4, 1) \ | 484 F(StoreLookupSlot, 4, 1) \ |
| 485 F(StoreContextRelative, 4, 1) /* TODO(turbofan): Only temporary */ \ |
| 477 \ | 486 \ |
| 478 /* Declarations and initialization */ \ | 487 /* Declarations and initialization */ \ |
| 479 F(DeclareGlobals, 3, 1) \ | 488 F(DeclareGlobals, 3, 1) \ |
| 480 F(DeclareModules, 1, 1) \ | 489 F(DeclareModules, 1, 1) \ |
| 481 F(DeclareLookupSlot, 4, 1) \ | 490 F(DeclareLookupSlot, 4, 1) \ |
| 482 F(InitializeConstGlobal, 2, 1) \ | 491 F(InitializeConstGlobal, 2, 1) \ |
| 483 F(InitializeLegacyConstLookupSlot, 3, 1) \ | 492 F(InitializeLegacyConstLookupSlot, 3, 1) \ |
| 484 \ | 493 \ |
| 485 /* Eval */ \ | 494 /* Eval */ \ |
| 486 F(ResolvePossiblyDirectEval, 5, 2) \ | 495 F(ResolvePossiblyDirectEval, 5, 2) \ |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 // StringDictionary. | 792 // StringDictionary. |
| 784 static void InitializeIntrinsicFunctionNames(Isolate* isolate, | 793 static void InitializeIntrinsicFunctionNames(Isolate* isolate, |
| 785 Handle<NameDictionary> dict); | 794 Handle<NameDictionary> dict); |
| 786 | 795 |
| 787 // Get the intrinsic function with the given name, which must be internalized. | 796 // Get the intrinsic function with the given name, which must be internalized. |
| 788 static const Function* FunctionForName(Handle<String> name); | 797 static const Function* FunctionForName(Handle<String> name); |
| 789 | 798 |
| 790 // Get the intrinsic function with the given FunctionId. | 799 // Get the intrinsic function with the given FunctionId. |
| 791 static const Function* FunctionForId(FunctionId id); | 800 static const Function* FunctionForId(FunctionId id); |
| 792 | 801 |
| 802 // Get the intrinsic function with the given function entry address. |
| 803 static const Function* FunctionForEntry(Address ref); |
| 804 |
| 793 // General-purpose helper functions for runtime system. | 805 // General-purpose helper functions for runtime system. |
| 794 static int StringMatch(Isolate* isolate, | 806 static int StringMatch(Isolate* isolate, |
| 795 Handle<String> sub, | 807 Handle<String> sub, |
| 796 Handle<String> pat, | 808 Handle<String> pat, |
| 797 int index); | 809 int index); |
| 798 | 810 |
| 799 static bool IsUpperCaseChar(RuntimeState* runtime_state, uint16_t ch); | 811 static bool IsUpperCaseChar(RuntimeState* runtime_state, uint16_t ch); |
| 800 | 812 |
| 801 // TODO(1240886): Some of the following methods are *not* handle safe, but | 813 // TODO(1240886): Some of the following methods are *not* handle safe, but |
| 802 // accept handle arguments. This seems fragile. | 814 // accept handle arguments. This seems fragile. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 902 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
| 891 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 903 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
| 892 | 904 |
| 893 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 905 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
| 894 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 906 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
| 895 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 907 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; |
| 896 | 908 |
| 897 } } // namespace v8::internal | 909 } } // namespace v8::internal |
| 898 | 910 |
| 899 #endif // V8_RUNTIME_H_ | 911 #endif // V8_RUNTIME_H_ |
| OLD | NEW |