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_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_RUNTIME_H_ |
6 #define V8_RUNTIME_RUNTIME_H_ | 6 #define V8_RUNTIME_RUNTIME_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 #include "src/unicode.h" | 10 #include "src/unicode.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 F(InterpreterNotEquals, 2, 1) \ | 218 F(InterpreterNotEquals, 2, 1) \ |
219 F(InterpreterStrictEquals, 2, 1) \ | 219 F(InterpreterStrictEquals, 2, 1) \ |
220 F(InterpreterStrictNotEquals, 2, 1) \ | 220 F(InterpreterStrictNotEquals, 2, 1) \ |
221 F(InterpreterLessThan, 2, 1) \ | 221 F(InterpreterLessThan, 2, 1) \ |
222 F(InterpreterGreaterThan, 2, 1) \ | 222 F(InterpreterGreaterThan, 2, 1) \ |
223 F(InterpreterLessThanOrEqual, 2, 1) \ | 223 F(InterpreterLessThanOrEqual, 2, 1) \ |
224 F(InterpreterGreaterThanOrEqual, 2, 1) \ | 224 F(InterpreterGreaterThanOrEqual, 2, 1) \ |
225 F(InterpreterToBoolean, 1, 1) \ | 225 F(InterpreterToBoolean, 1, 1) \ |
226 F(InterpreterLogicalNot, 1, 1) \ | 226 F(InterpreterLogicalNot, 1, 1) \ |
227 F(InterpreterTypeOf, 1, 1) \ | 227 F(InterpreterTypeOf, 1, 1) \ |
228 F(InterpreterNewClosure, 2, 1) \ | 228 F(InterpreterNewClosure, 2, 1) |
229 F(InterpreterForInPrepare, 1, 1) | |
230 | 229 |
231 | 230 |
232 #define FOR_EACH_INTRINSIC_FUNCTION(F) \ | 231 #define FOR_EACH_INTRINSIC_FUNCTION(F) \ |
233 F(FunctionGetName, 1, 1) \ | 232 F(FunctionGetName, 1, 1) \ |
234 F(FunctionSetName, 2, 1) \ | 233 F(FunctionSetName, 2, 1) \ |
235 F(FunctionRemovePrototype, 1, 1) \ | 234 F(FunctionRemovePrototype, 1, 1) \ |
236 F(FunctionGetScript, 1, 1) \ | 235 F(FunctionGetScript, 1, 1) \ |
237 F(FunctionGetSourceCode, 1, 1) \ | 236 F(FunctionGetSourceCode, 1, 1) \ |
238 F(FunctionGetScriptSourcePosition, 1, 1) \ | 237 F(FunctionGetScriptSourcePosition, 1, 1) \ |
239 F(FunctionGetPositionForOffset, 2, 1) \ | 238 F(FunctionGetPositionForOffset, 2, 1) \ |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 | 1006 |
1008 #define FOR_EACH_INTRINSIC_URI(F) \ | 1007 #define FOR_EACH_INTRINSIC_URI(F) \ |
1009 F(URIEscape, 1, 1) \ | 1008 F(URIEscape, 1, 1) \ |
1010 F(URIUnescape, 1, 1) | 1009 F(URIUnescape, 1, 1) |
1011 | 1010 |
1012 | 1011 |
1013 #define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ | 1012 #define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ |
1014 F(LoadLookupSlot, 2, 2) \ | 1013 F(LoadLookupSlot, 2, 2) \ |
1015 F(LoadLookupSlotNoReferenceError, 2, 2) | 1014 F(LoadLookupSlotNoReferenceError, 2, 2) |
1016 | 1015 |
| 1016 #define FOR_EACH_INTRINSIC_RETURN_TRIPLE(F) \ |
| 1017 F(ForInPrepare, 1, 3) |
1017 | 1018 |
1018 // Most intrinsics are implemented in the runtime/ directory, but ICs are | 1019 // Most intrinsics are implemented in the runtime/ directory, but ICs are |
1019 // implemented in ic.cc for now. | 1020 // implemented in ic.cc for now. |
1020 #define FOR_EACH_INTRINSIC_IC(F) \ | 1021 #define FOR_EACH_INTRINSIC_IC(F) \ |
1021 F(BinaryOpIC_Miss, 2, 1) \ | 1022 F(BinaryOpIC_Miss, 2, 1) \ |
1022 F(BinaryOpIC_MissWithAllocationSite, 3, 1) \ | 1023 F(BinaryOpIC_MissWithAllocationSite, 3, 1) \ |
1023 F(CallIC_Miss, 3, 1) \ | 1024 F(CallIC_Miss, 3, 1) \ |
1024 F(CompareIC_Miss, 3, 1) \ | 1025 F(CompareIC_Miss, 3, 1) \ |
1025 F(CompareNilIC_Miss, 1, 1) \ | 1026 F(CompareNilIC_Miss, 1, 1) \ |
1026 F(ElementsTransitionAndStoreIC_Miss, 5, 1) \ | 1027 F(ElementsTransitionAndStoreIC_Miss, 5, 1) \ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 FOR_EACH_INTRINSIC_SCOPES(F) \ | 1073 FOR_EACH_INTRINSIC_SCOPES(F) \ |
1073 FOR_EACH_INTRINSIC_SIMD(F) \ | 1074 FOR_EACH_INTRINSIC_SIMD(F) \ |
1074 FOR_EACH_INTRINSIC_STRINGS(F) \ | 1075 FOR_EACH_INTRINSIC_STRINGS(F) \ |
1075 FOR_EACH_INTRINSIC_SYMBOL(F) \ | 1076 FOR_EACH_INTRINSIC_SYMBOL(F) \ |
1076 FOR_EACH_INTRINSIC_TEST(F) \ | 1077 FOR_EACH_INTRINSIC_TEST(F) \ |
1077 FOR_EACH_INTRINSIC_TYPEDARRAY(F) \ | 1078 FOR_EACH_INTRINSIC_TYPEDARRAY(F) \ |
1078 FOR_EACH_INTRINSIC_URI(F) | 1079 FOR_EACH_INTRINSIC_URI(F) |
1079 | 1080 |
1080 // FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors, | 1081 // FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors, |
1081 // either returning an object or a pair. | 1082 // either returning an object or a pair. |
1082 #define FOR_EACH_INTRINSIC(F) \ | 1083 #define FOR_EACH_INTRINSIC(F) \ |
1083 FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ | 1084 FOR_EACH_INTRINSIC_RETURN_TRIPLE(F) \ |
| 1085 FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ |
1084 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) | 1086 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) |
1085 | 1087 |
1086 | 1088 |
1087 #define F(name, nargs, ressize) \ | 1089 #define F(name, nargs, ressize) \ |
1088 Object* Runtime_##name(int args_length, Object** args_object, \ | 1090 Object* Runtime_##name(int args_length, Object** args_object, \ |
1089 Isolate* isolate); | 1091 Isolate* isolate); |
1090 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) | 1092 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) |
1091 #undef F | 1093 #undef F |
1092 | 1094 |
1093 //--------------------------------------------------------------------------- | 1095 //--------------------------------------------------------------------------- |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 | 1229 |
1228 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; | 1230 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; |
1229 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; | 1231 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; |
1230 STATIC_ASSERT(LANGUAGE_END == 3); | 1232 STATIC_ASSERT(LANGUAGE_END == 3); |
1231 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; | 1233 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; |
1232 | 1234 |
1233 } // namespace internal | 1235 } // namespace internal |
1234 } // namespace v8 | 1236 } // namespace v8 |
1235 | 1237 |
1236 #endif // V8_RUNTIME_RUNTIME_H_ | 1238 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |