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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 F(InterpreterNotEquals, 2, 1) \ | 213 F(InterpreterNotEquals, 2, 1) \ |
214 F(InterpreterStrictEquals, 2, 1) \ | 214 F(InterpreterStrictEquals, 2, 1) \ |
215 F(InterpreterStrictNotEquals, 2, 1) \ | 215 F(InterpreterStrictNotEquals, 2, 1) \ |
216 F(InterpreterLessThan, 2, 1) \ | 216 F(InterpreterLessThan, 2, 1) \ |
217 F(InterpreterGreaterThan, 2, 1) \ | 217 F(InterpreterGreaterThan, 2, 1) \ |
218 F(InterpreterLessThanOrEqual, 2, 1) \ | 218 F(InterpreterLessThanOrEqual, 2, 1) \ |
219 F(InterpreterGreaterThanOrEqual, 2, 1) \ | 219 F(InterpreterGreaterThanOrEqual, 2, 1) \ |
220 F(InterpreterToBoolean, 1, 1) \ | 220 F(InterpreterToBoolean, 1, 1) \ |
221 F(InterpreterLogicalNot, 1, 1) \ | 221 F(InterpreterLogicalNot, 1, 1) \ |
222 F(InterpreterTypeOf, 1, 1) \ | 222 F(InterpreterTypeOf, 1, 1) \ |
223 F(InterpreterNewClosure, 2, 1) \ | 223 F(InterpreterNewClosure, 2, 1) |
224 F(InterpreterForInPrepare, 1, 1) | |
225 | 224 |
226 | 225 |
227 #define FOR_EACH_INTRINSIC_FUNCTION(F) \ | 226 #define FOR_EACH_INTRINSIC_FUNCTION(F) \ |
228 F(FunctionGetName, 1, 1) \ | 227 F(FunctionGetName, 1, 1) \ |
229 F(FunctionSetName, 2, 1) \ | 228 F(FunctionSetName, 2, 1) \ |
230 F(FunctionRemovePrototype, 1, 1) \ | 229 F(FunctionRemovePrototype, 1, 1) \ |
231 F(FunctionGetScript, 1, 1) \ | 230 F(FunctionGetScript, 1, 1) \ |
232 F(FunctionGetSourceCode, 1, 1) \ | 231 F(FunctionGetSourceCode, 1, 1) \ |
233 F(FunctionGetScriptSourcePosition, 1, 1) \ | 232 F(FunctionGetScriptSourcePosition, 1, 1) \ |
234 F(FunctionGetPositionForOffset, 2, 1) \ | 233 F(FunctionGetPositionForOffset, 2, 1) \ |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 | 1001 |
1003 #define FOR_EACH_INTRINSIC_URI(F) \ | 1002 #define FOR_EACH_INTRINSIC_URI(F) \ |
1004 F(URIEscape, 1, 1) \ | 1003 F(URIEscape, 1, 1) \ |
1005 F(URIUnescape, 1, 1) | 1004 F(URIUnescape, 1, 1) |
1006 | 1005 |
1007 | 1006 |
1008 #define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ | 1007 #define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ |
1009 F(LoadLookupSlot, 2, 2) \ | 1008 F(LoadLookupSlot, 2, 2) \ |
1010 F(LoadLookupSlotNoReferenceError, 2, 2) | 1009 F(LoadLookupSlotNoReferenceError, 2, 2) |
1011 | 1010 |
| 1011 #define FOR_EACH_INTRINSIC_RETURN_TRIPLE(F) \ |
| 1012 F(ForInPrepare, 1, 3) |
1012 | 1013 |
1013 // Most intrinsics are implemented in the runtime/ directory, but ICs are | 1014 // Most intrinsics are implemented in the runtime/ directory, but ICs are |
1014 // implemented in ic.cc for now. | 1015 // implemented in ic.cc for now. |
1015 #define FOR_EACH_INTRINSIC_IC(F) \ | 1016 #define FOR_EACH_INTRINSIC_IC(F) \ |
1016 F(BinaryOpIC_Miss, 2, 1) \ | 1017 F(BinaryOpIC_Miss, 2, 1) \ |
1017 F(BinaryOpIC_MissWithAllocationSite, 3, 1) \ | 1018 F(BinaryOpIC_MissWithAllocationSite, 3, 1) \ |
1018 F(CallIC_Miss, 3, 1) \ | 1019 F(CallIC_Miss, 3, 1) \ |
1019 F(CompareIC_Miss, 3, 1) \ | 1020 F(CompareIC_Miss, 3, 1) \ |
1020 F(CompareNilIC_Miss, 1, 1) \ | 1021 F(CompareNilIC_Miss, 1, 1) \ |
1021 F(ElementsTransitionAndStoreIC_Miss, 5, 1) \ | 1022 F(ElementsTransitionAndStoreIC_Miss, 5, 1) \ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 FOR_EACH_INTRINSIC_SCOPES(F) \ | 1068 FOR_EACH_INTRINSIC_SCOPES(F) \ |
1068 FOR_EACH_INTRINSIC_SIMD(F) \ | 1069 FOR_EACH_INTRINSIC_SIMD(F) \ |
1069 FOR_EACH_INTRINSIC_STRINGS(F) \ | 1070 FOR_EACH_INTRINSIC_STRINGS(F) \ |
1070 FOR_EACH_INTRINSIC_SYMBOL(F) \ | 1071 FOR_EACH_INTRINSIC_SYMBOL(F) \ |
1071 FOR_EACH_INTRINSIC_TEST(F) \ | 1072 FOR_EACH_INTRINSIC_TEST(F) \ |
1072 FOR_EACH_INTRINSIC_TYPEDARRAY(F) \ | 1073 FOR_EACH_INTRINSIC_TYPEDARRAY(F) \ |
1073 FOR_EACH_INTRINSIC_URI(F) | 1074 FOR_EACH_INTRINSIC_URI(F) |
1074 | 1075 |
1075 // FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors, | 1076 // FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors, |
1076 // either returning an object or a pair. | 1077 // either returning an object or a pair. |
1077 #define FOR_EACH_INTRINSIC(F) \ | 1078 #define FOR_EACH_INTRINSIC(F) \ |
1078 FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ | 1079 FOR_EACH_INTRINSIC_RETURN_TRIPLE(F) \ |
| 1080 FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ |
1079 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) | 1081 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) |
1080 | 1082 |
1081 | 1083 |
1082 #define F(name, nargs, ressize) \ | 1084 #define F(name, nargs, ressize) \ |
1083 Object* Runtime_##name(int args_length, Object** args_object, \ | 1085 Object* Runtime_##name(int args_length, Object** args_object, \ |
1084 Isolate* isolate); | 1086 Isolate* isolate); |
1085 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) | 1087 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) |
1086 #undef F | 1088 #undef F |
1087 | 1089 |
1088 //--------------------------------------------------------------------------- | 1090 //--------------------------------------------------------------------------- |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 | 1224 |
1223 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; | 1225 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; |
1224 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; | 1226 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; |
1225 STATIC_ASSERT(LANGUAGE_END == 3); | 1227 STATIC_ASSERT(LANGUAGE_END == 3); |
1226 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; | 1228 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; |
1227 | 1229 |
1228 } // namespace internal | 1230 } // namespace internal |
1229 } // namespace v8 | 1231 } // namespace v8 |
1230 | 1232 |
1231 #endif // V8_RUNTIME_RUNTIME_H_ | 1233 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |