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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 V(StringLessThanOrEqual) \ | 133 V(StringLessThanOrEqual) \ |
134 V(StringGreaterThan) \ | 134 V(StringGreaterThan) \ |
135 V(StringGreaterThanOrEqual) \ | 135 V(StringGreaterThanOrEqual) \ |
136 V(ToInteger) \ | 136 V(ToInteger) \ |
137 V(ToLength) \ | 137 V(ToLength) \ |
138 V(HasProperty) \ | 138 V(HasProperty) \ |
139 V(ForInFilter) \ | 139 V(ForInFilter) \ |
140 V(GetProperty) \ | 140 V(GetProperty) \ |
141 V(LoadICTrampolineTF) \ | 141 V(LoadICTrampolineTF) \ |
142 V(LoadICTF) \ | 142 V(LoadICTF) \ |
| 143 V(KeyedLoadICTrampolineTF) \ |
| 144 V(KeyedLoadICTF) \ |
143 /* IC Handler stubs */ \ | 145 /* IC Handler stubs */ \ |
144 V(KeyedLoadSloppyArguments) \ | 146 V(KeyedLoadSloppyArguments) \ |
145 V(KeyedStoreSloppyArguments) \ | 147 V(KeyedStoreSloppyArguments) \ |
146 V(LoadApiGetter) \ | 148 V(LoadApiGetter) \ |
147 V(LoadConstant) \ | 149 V(LoadConstant) \ |
148 V(LoadFastElement) \ | 150 V(LoadFastElement) \ |
149 V(LoadField) \ | 151 V(LoadField) \ |
150 V(LoadIndexedInterceptor) \ | 152 V(LoadIndexedInterceptor) \ |
151 V(StoreField) \ | 153 V(StoreField) \ |
152 V(StoreGlobal) \ | 154 V(StoreGlobal) \ |
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2360 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { | 2362 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { |
2361 public: | 2363 public: |
2362 explicit KeyedLoadICTrampolineStub(Isolate* isolate) | 2364 explicit KeyedLoadICTrampolineStub(Isolate* isolate) |
2363 : LoadICTrampolineStub(isolate) {} | 2365 : LoadICTrampolineStub(isolate) {} |
2364 | 2366 |
2365 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2367 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
2366 | 2368 |
2367 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); | 2369 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); |
2368 }; | 2370 }; |
2369 | 2371 |
| 2372 class KeyedLoadICTrampolineTFStub : public LoadICTrampolineTFStub { |
| 2373 public: |
| 2374 explicit KeyedLoadICTrampolineTFStub(Isolate* isolate) |
| 2375 : LoadICTrampolineTFStub(isolate) {} |
| 2376 |
| 2377 void GenerateAssembly(CodeStubAssembler* assembler) const override; |
| 2378 |
| 2379 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2380 |
| 2381 DEFINE_CODE_STUB(KeyedLoadICTrampolineTF, LoadICTrampolineTFStub); |
| 2382 }; |
| 2383 |
2370 class StoreICTrampolineStub : public PlatformCodeStub { | 2384 class StoreICTrampolineStub : public PlatformCodeStub { |
2371 public: | 2385 public: |
2372 StoreICTrampolineStub(Isolate* isolate, const StoreICState& state) | 2386 StoreICTrampolineStub(Isolate* isolate, const StoreICState& state) |
2373 : PlatformCodeStub(isolate) { | 2387 : PlatformCodeStub(isolate) { |
2374 minor_key_ = state.GetExtraICState(); | 2388 minor_key_ = state.GetExtraICState(); |
2375 } | 2389 } |
2376 | 2390 |
2377 Code::Kind GetCodeKind() const override { return Code::STORE_IC; } | 2391 Code::Kind GetCodeKind() const override { return Code::STORE_IC; } |
2378 | 2392 |
2379 ExtraICState GetExtraICState() const final { | 2393 ExtraICState GetExtraICState() const final { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2478 | 2492 |
2479 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2493 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
2480 | 2494 |
2481 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 2495 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
2482 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); | 2496 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); |
2483 | 2497 |
2484 protected: | 2498 protected: |
2485 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2499 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
2486 }; | 2500 }; |
2487 | 2501 |
| 2502 class KeyedLoadICTFStub : public LoadICTFStub { |
| 2503 public: |
| 2504 explicit KeyedLoadICTFStub(Isolate* isolate) : LoadICTFStub(isolate) {} |
| 2505 |
| 2506 void GenerateAssembly(CodeStubAssembler* assembler) const override; |
| 2507 |
| 2508 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2509 |
| 2510 DEFINE_CODE_STUB(KeyedLoadICTF, LoadICTFStub); |
| 2511 }; |
| 2512 |
2488 class StoreICStub : public PlatformCodeStub { | 2513 class StoreICStub : public PlatformCodeStub { |
2489 public: | 2514 public: |
2490 StoreICStub(Isolate* isolate, const StoreICState& state) | 2515 StoreICStub(Isolate* isolate, const StoreICState& state) |
2491 : PlatformCodeStub(isolate) { | 2516 : PlatformCodeStub(isolate) { |
2492 minor_key_ = state.GetExtraICState(); | 2517 minor_key_ = state.GetExtraICState(); |
2493 } | 2518 } |
2494 | 2519 |
2495 void GenerateForTrampoline(MacroAssembler* masm); | 2520 void GenerateForTrampoline(MacroAssembler* masm); |
2496 | 2521 |
2497 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } | 2522 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3111 #undef DEFINE_HYDROGEN_CODE_STUB | 3136 #undef DEFINE_HYDROGEN_CODE_STUB |
3112 #undef DEFINE_CODE_STUB | 3137 #undef DEFINE_CODE_STUB |
3113 #undef DEFINE_CODE_STUB_BASE | 3138 #undef DEFINE_CODE_STUB_BASE |
3114 | 3139 |
3115 extern Representation RepresentationFromType(Type* type); | 3140 extern Representation RepresentationFromType(Type* type); |
3116 | 3141 |
3117 } // namespace internal | 3142 } // namespace internal |
3118 } // namespace v8 | 3143 } // namespace v8 |
3119 | 3144 |
3120 #endif // V8_CODE_STUBS_H_ | 3145 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |