OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 V(NameDictionaryLookup) \ | 89 V(NameDictionaryLookup) \ |
90 V(ElementsTransitionAndStore) \ | 90 V(ElementsTransitionAndStore) \ |
91 V(TransitionElementsKind) \ | 91 V(TransitionElementsKind) \ |
92 V(StoreArrayLiteralElement) \ | 92 V(StoreArrayLiteralElement) \ |
93 V(StubFailureTrampoline) \ | 93 V(StubFailureTrampoline) \ |
94 V(StubFailureTailCallTrampoline) \ | 94 V(StubFailureTailCallTrampoline) \ |
95 V(ArrayConstructor) \ | 95 V(ArrayConstructor) \ |
96 V(InternalArrayConstructor) \ | 96 V(InternalArrayConstructor) \ |
97 V(ProfileEntryHook) \ | 97 V(ProfileEntryHook) \ |
98 V(StoreGlobal) \ | 98 V(StoreGlobal) \ |
| 99 V(CallApiFunction) \ |
99 /* IC Handler stubs */ \ | 100 /* IC Handler stubs */ \ |
100 V(LoadField) \ | 101 V(LoadField) \ |
101 V(KeyedLoadField) \ | 102 V(KeyedLoadField) \ |
102 V(KeyedArrayCall) | 103 V(KeyedArrayCall) |
103 | 104 |
104 // List of code stubs only used on ARM platforms. | 105 // List of code stubs only used on ARM platforms. |
105 #if V8_TARGET_ARCH_ARM | 106 #if V8_TARGET_ARCH_ARM |
106 #define CODE_STUB_LIST_ARM(V) \ | 107 #define CODE_STUB_LIST_ARM(V) \ |
107 V(GetProperty) \ | 108 V(GetProperty) \ |
108 V(SetProperty) \ | 109 V(SetProperty) \ |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 | 1029 |
1029 class IsConstantBits: public BitField<bool, 0, 1> {}; | 1030 class IsConstantBits: public BitField<bool, 0, 1> {}; |
1030 class RepresentationBits: public BitField<Representation::Kind, 1, 8> {}; | 1031 class RepresentationBits: public BitField<Representation::Kind, 1, 8> {}; |
1031 | 1032 |
1032 int bit_field_; | 1033 int bit_field_; |
1033 | 1034 |
1034 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub); | 1035 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub); |
1035 }; | 1036 }; |
1036 | 1037 |
1037 | 1038 |
| 1039 class CallApiFunctionStub : public PlatformCodeStub { |
| 1040 public: |
| 1041 CallApiFunctionStub(bool restore_context, |
| 1042 bool call_data_undefined, |
| 1043 int argc) { |
| 1044 bit_field_ = |
| 1045 RestoreContextBits::encode(restore_context) | |
| 1046 CallDataUndefinedBits::encode(call_data_undefined) | |
| 1047 ArgumentBits::encode(argc); |
| 1048 } |
| 1049 |
| 1050 private: |
| 1051 virtual void Generate(MacroAssembler* masm) V8_OVERRIDE; |
| 1052 virtual Major MajorKey() V8_OVERRIDE { return CallApiFunction; } |
| 1053 virtual int MinorKey() V8_OVERRIDE { return bit_field_; } |
| 1054 |
| 1055 class RestoreContextBits: public BitField<bool, 0, 1> {}; |
| 1056 class CallDataUndefinedBits: public BitField<bool, 1, 1> {}; |
| 1057 class ArgumentBits: public BitField<int, 2, Code::kArgumentsBits> {}; |
| 1058 |
| 1059 int bit_field_; |
| 1060 |
| 1061 DISALLOW_COPY_AND_ASSIGN(CallApiFunctionStub); |
| 1062 }; |
| 1063 |
| 1064 |
1038 class KeyedLoadFieldStub: public LoadFieldStub { | 1065 class KeyedLoadFieldStub: public LoadFieldStub { |
1039 public: | 1066 public: |
1040 KeyedLoadFieldStub(bool inobject, int index, Representation representation) | 1067 KeyedLoadFieldStub(bool inobject, int index, Representation representation) |
1041 : LoadFieldStub() { | 1068 : LoadFieldStub() { |
1042 Initialize(Code::KEYED_LOAD_IC, inobject, index, representation); | 1069 Initialize(Code::KEYED_LOAD_IC, inobject, index, representation); |
1043 } | 1070 } |
1044 | 1071 |
1045 virtual void InitializeInterfaceDescriptor( | 1072 virtual void InitializeInterfaceDescriptor( |
1046 Isolate* isolate, | 1073 Isolate* isolate, |
1047 CodeStubInterfaceDescriptor* descriptor); | 1074 CodeStubInterfaceDescriptor* descriptor); |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 | 2526 |
2500 | 2527 |
2501 class CallDescriptors { | 2528 class CallDescriptors { |
2502 public: | 2529 public: |
2503 static void InitializeForIsolate(Isolate* isolate); | 2530 static void InitializeForIsolate(Isolate* isolate); |
2504 }; | 2531 }; |
2505 | 2532 |
2506 } } // namespace v8::internal | 2533 } } // namespace v8::internal |
2507 | 2534 |
2508 #endif // V8_CODE_STUBS_H_ | 2535 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |