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_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/code-stub-assembler.h" | 10 #include "src/code-stub-assembler.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 V(CallConstruct) \ | 28 V(CallConstruct) \ |
29 V(CallIC) \ | 29 V(CallIC) \ |
30 V(CEntry) \ | 30 V(CEntry) \ |
31 V(CompareIC) \ | 31 V(CompareIC) \ |
32 V(DoubleToI) \ | 32 V(DoubleToI) \ |
33 V(FunctionPrototype) \ | 33 V(FunctionPrototype) \ |
34 V(InternalArrayConstructor) \ | 34 V(InternalArrayConstructor) \ |
35 V(JSEntry) \ | 35 V(JSEntry) \ |
36 V(KeyedLoadICTrampoline) \ | 36 V(KeyedLoadICTrampoline) \ |
37 V(LoadICTrampoline) \ | 37 V(LoadICTrampoline) \ |
| 38 V(LoadGlobalICTrampoline) \ |
38 V(CallICTrampoline) \ | 39 V(CallICTrampoline) \ |
39 V(LoadIndexedString) \ | 40 V(LoadIndexedString) \ |
40 V(MathPow) \ | 41 V(MathPow) \ |
41 V(ProfileEntryHook) \ | 42 V(ProfileEntryHook) \ |
42 V(RecordWrite) \ | 43 V(RecordWrite) \ |
43 V(RegExpExec) \ | 44 V(RegExpExec) \ |
44 V(StoreBufferOverflow) \ | 45 V(StoreBufferOverflow) \ |
45 V(StoreElement) \ | 46 V(StoreElement) \ |
46 V(StubFailureTrampoline) \ | 47 V(StubFailureTrampoline) \ |
47 V(SubString) \ | 48 V(SubString) \ |
(...skipping 30 matching lines...) Expand all Loading... |
78 V(Typeof) \ | 79 V(Typeof) \ |
79 V(RegExpConstructResult) \ | 80 V(RegExpConstructResult) \ |
80 V(StoreFastElement) \ | 81 V(StoreFastElement) \ |
81 V(StoreGlobalViaContext) \ | 82 V(StoreGlobalViaContext) \ |
82 V(StoreScriptContextField) \ | 83 V(StoreScriptContextField) \ |
83 V(StringAdd) \ | 84 V(StringAdd) \ |
84 V(ToBooleanIC) \ | 85 V(ToBooleanIC) \ |
85 V(TransitionElementsKind) \ | 86 V(TransitionElementsKind) \ |
86 V(KeyedLoadIC) \ | 87 V(KeyedLoadIC) \ |
87 V(LoadIC) \ | 88 V(LoadIC) \ |
| 89 V(LoadGlobalIC) \ |
88 /* TurboFanCodeStubs */ \ | 90 /* TurboFanCodeStubs */ \ |
89 V(AllocateHeapNumber) \ | 91 V(AllocateHeapNumber) \ |
90 V(AllocateFloat32x4) \ | 92 V(AllocateFloat32x4) \ |
91 V(AllocateInt32x4) \ | 93 V(AllocateInt32x4) \ |
92 V(AllocateUint32x4) \ | 94 V(AllocateUint32x4) \ |
93 V(AllocateBool32x4) \ | 95 V(AllocateBool32x4) \ |
94 V(AllocateInt16x8) \ | 96 V(AllocateInt16x8) \ |
95 V(AllocateUint16x8) \ | 97 V(AllocateUint16x8) \ |
96 V(AllocateBool16x8) \ | 98 V(AllocateBool16x8) \ |
97 V(AllocateInt8x16) \ | 99 V(AllocateInt8x16) \ |
(...skipping 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2371 | 2373 |
2372 protected: | 2374 protected: |
2373 LoadICState state() const { | 2375 LoadICState state() const { |
2374 return LoadICState(static_cast<ExtraICState>(minor_key_)); | 2376 return LoadICState(static_cast<ExtraICState>(minor_key_)); |
2375 } | 2377 } |
2376 | 2378 |
2377 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); | 2379 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); |
2378 DEFINE_CODE_STUB(LoadICTrampolineTF, TurboFanCodeStub); | 2380 DEFINE_CODE_STUB(LoadICTrampolineTF, TurboFanCodeStub); |
2379 }; | 2381 }; |
2380 | 2382 |
| 2383 class LoadGlobalICTrampolineStub : public LoadICTrampolineTFStub { |
| 2384 public: |
| 2385 explicit LoadGlobalICTrampolineStub(Isolate* isolate, |
| 2386 const LoadICState& state) |
| 2387 : LoadICTrampolineTFStub(isolate, state) {} |
| 2388 |
| 2389 Code::Kind GetCodeKind() const override { return Code::LOAD_GLOBAL_IC; } |
| 2390 |
| 2391 DEFINE_CODE_STUB(LoadGlobalICTrampoline, LoadICTrampolineTFStub); |
| 2392 }; |
| 2393 |
2381 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { | 2394 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { |
2382 public: | 2395 public: |
2383 explicit KeyedLoadICTrampolineStub(Isolate* isolate, const LoadICState& state) | 2396 explicit KeyedLoadICTrampolineStub(Isolate* isolate, const LoadICState& state) |
2384 : LoadICTrampolineStub(isolate, state) {} | 2397 : LoadICTrampolineStub(isolate, state) {} |
2385 | 2398 |
2386 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2399 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
2387 | 2400 |
2388 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); | 2401 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); |
2389 }; | 2402 }; |
2390 | 2403 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2482 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } | 2495 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } |
2483 | 2496 |
2484 ExtraICState GetExtraICState() const final { | 2497 ExtraICState GetExtraICState() const final { |
2485 return static_cast<ExtraICState>(minor_key_); | 2498 return static_cast<ExtraICState>(minor_key_); |
2486 } | 2499 } |
2487 | 2500 |
2488 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 2501 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
2489 DEFINE_CODE_STUB(LoadICTF, TurboFanCodeStub); | 2502 DEFINE_CODE_STUB(LoadICTF, TurboFanCodeStub); |
2490 }; | 2503 }; |
2491 | 2504 |
| 2505 class LoadGlobalICStub : public LoadICTFStub { |
| 2506 public: |
| 2507 explicit LoadGlobalICStub(Isolate* isolate, const LoadICState& state) |
| 2508 : LoadICTFStub(isolate, state) {} |
| 2509 |
| 2510 Code::Kind GetCodeKind() const override { return Code::LOAD_GLOBAL_IC; } |
| 2511 |
| 2512 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 2513 DEFINE_CODE_STUB(LoadGlobalIC, LoadICTFStub); |
| 2514 }; |
| 2515 |
2492 class KeyedLoadICStub : public PlatformCodeStub { | 2516 class KeyedLoadICStub : public PlatformCodeStub { |
2493 public: | 2517 public: |
2494 explicit KeyedLoadICStub(Isolate* isolate, const LoadICState& state) | 2518 explicit KeyedLoadICStub(Isolate* isolate, const LoadICState& state) |
2495 : PlatformCodeStub(isolate) { | 2519 : PlatformCodeStub(isolate) { |
2496 minor_key_ = state.GetExtraICState(); | 2520 minor_key_ = state.GetExtraICState(); |
2497 } | 2521 } |
2498 | 2522 |
2499 void GenerateForTrampoline(MacroAssembler* masm); | 2523 void GenerateForTrampoline(MacroAssembler* masm); |
2500 | 2524 |
2501 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2525 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3141 #undef DEFINE_HYDROGEN_CODE_STUB | 3165 #undef DEFINE_HYDROGEN_CODE_STUB |
3142 #undef DEFINE_CODE_STUB | 3166 #undef DEFINE_CODE_STUB |
3143 #undef DEFINE_CODE_STUB_BASE | 3167 #undef DEFINE_CODE_STUB_BASE |
3144 | 3168 |
3145 extern Representation RepresentationFromType(Type* type); | 3169 extern Representation RepresentationFromType(Type* type); |
3146 | 3170 |
3147 } // namespace internal | 3171 } // namespace internal |
3148 } // namespace v8 | 3172 } // namespace v8 |
3149 | 3173 |
3150 #endif // V8_CODE_STUBS_H_ | 3174 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |