| 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 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2343 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { | 2345 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { |
| 2344 public: | 2346 public: |
| 2345 explicit KeyedLoadICTrampolineStub(Isolate* isolate) | 2347 explicit KeyedLoadICTrampolineStub(Isolate* isolate) |
| 2346 : LoadICTrampolineStub(isolate) {} | 2348 : LoadICTrampolineStub(isolate) {} |
| 2347 | 2349 |
| 2348 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2350 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2349 | 2351 |
| 2350 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); | 2352 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); |
| 2351 }; | 2353 }; |
| 2352 | 2354 |
| 2355 class KeyedLoadICTrampolineTFStub : public LoadICTrampolineTFStub { |
| 2356 public: |
| 2357 explicit KeyedLoadICTrampolineTFStub(Isolate* isolate) |
| 2358 : LoadICTrampolineTFStub(isolate) {} |
| 2359 |
| 2360 void GenerateAssembly(CodeStubAssembler* assembler) const override; |
| 2361 |
| 2362 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2363 |
| 2364 DEFINE_CODE_STUB(KeyedLoadICTrampolineTF, LoadICTrampolineTFStub); |
| 2365 }; |
| 2366 |
| 2353 class StoreICTrampolineStub : public PlatformCodeStub { | 2367 class StoreICTrampolineStub : public PlatformCodeStub { |
| 2354 public: | 2368 public: |
| 2355 StoreICTrampolineStub(Isolate* isolate, const StoreICState& state) | 2369 StoreICTrampolineStub(Isolate* isolate, const StoreICState& state) |
| 2356 : PlatformCodeStub(isolate) { | 2370 : PlatformCodeStub(isolate) { |
| 2357 minor_key_ = state.GetExtraICState(); | 2371 minor_key_ = state.GetExtraICState(); |
| 2358 } | 2372 } |
| 2359 | 2373 |
| 2360 Code::Kind GetCodeKind() const override { return Code::STORE_IC; } | 2374 Code::Kind GetCodeKind() const override { return Code::STORE_IC; } |
| 2361 | 2375 |
| 2362 ExtraICState GetExtraICState() const final { | 2376 ExtraICState GetExtraICState() const final { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2461 | 2475 |
| 2462 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2476 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2463 | 2477 |
| 2464 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 2478 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 2465 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); | 2479 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); |
| 2466 | 2480 |
| 2467 protected: | 2481 protected: |
| 2468 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2482 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2469 }; | 2483 }; |
| 2470 | 2484 |
| 2485 class KeyedLoadICTFStub : public LoadICTFStub { |
| 2486 public: |
| 2487 explicit KeyedLoadICTFStub(Isolate* isolate) : LoadICTFStub(isolate) {} |
| 2488 |
| 2489 void GenerateAssembly(CodeStubAssembler* assembler) const override; |
| 2490 |
| 2491 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2492 |
| 2493 DEFINE_CODE_STUB(KeyedLoadICTF, LoadICTFStub); |
| 2494 }; |
| 2495 |
| 2471 class StoreICStub : public PlatformCodeStub { | 2496 class StoreICStub : public PlatformCodeStub { |
| 2472 public: | 2497 public: |
| 2473 StoreICStub(Isolate* isolate, const StoreICState& state) | 2498 StoreICStub(Isolate* isolate, const StoreICState& state) |
| 2474 : PlatformCodeStub(isolate) { | 2499 : PlatformCodeStub(isolate) { |
| 2475 minor_key_ = state.GetExtraICState(); | 2500 minor_key_ = state.GetExtraICState(); |
| 2476 } | 2501 } |
| 2477 | 2502 |
| 2478 void GenerateForTrampoline(MacroAssembler* masm); | 2503 void GenerateForTrampoline(MacroAssembler* masm); |
| 2479 | 2504 |
| 2480 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } | 2505 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3094 #undef DEFINE_HYDROGEN_CODE_STUB | 3119 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3095 #undef DEFINE_CODE_STUB | 3120 #undef DEFINE_CODE_STUB |
| 3096 #undef DEFINE_CODE_STUB_BASE | 3121 #undef DEFINE_CODE_STUB_BASE |
| 3097 | 3122 |
| 3098 extern Representation RepresentationFromType(Type* type); | 3123 extern Representation RepresentationFromType(Type* type); |
| 3099 | 3124 |
| 3100 } // namespace internal | 3125 } // namespace internal |
| 3101 } // namespace v8 | 3126 } // namespace v8 |
| 3102 | 3127 |
| 3103 #endif // V8_CODE_STUBS_H_ | 3128 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |