| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 V(StringEqual) \ | 132 V(StringEqual) \ |
| 133 V(StringNotEqual) \ | 133 V(StringNotEqual) \ |
| 134 V(StringLessThan) \ | 134 V(StringLessThan) \ |
| 135 V(StringLessThanOrEqual) \ | 135 V(StringLessThanOrEqual) \ |
| 136 V(StringGreaterThan) \ | 136 V(StringGreaterThan) \ |
| 137 V(StringGreaterThanOrEqual) \ | 137 V(StringGreaterThanOrEqual) \ |
| 138 V(ToBoolean) \ | 138 V(ToBoolean) \ |
| 139 V(ToInteger) \ | 139 V(ToInteger) \ |
| 140 V(ToLength) \ | 140 V(ToLength) \ |
| 141 V(HasProperty) \ | 141 V(HasProperty) \ |
| 142 V(LoadICTrampolineTF) \ |
| 143 V(LoadICTF) \ |
| 142 /* IC Handler stubs */ \ | 144 /* IC Handler stubs */ \ |
| 143 V(ArrayBufferViewLoadField) \ | 145 V(ArrayBufferViewLoadField) \ |
| 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) \ |
| (...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 | 2379 |
| 2378 protected: | 2380 protected: |
| 2379 LoadICState state() const { | 2381 LoadICState state() const { |
| 2380 return LoadICState(static_cast<ExtraICState>(minor_key_)); | 2382 return LoadICState(static_cast<ExtraICState>(minor_key_)); |
| 2381 } | 2383 } |
| 2382 | 2384 |
| 2383 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); | 2385 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); |
| 2384 DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub); | 2386 DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub); |
| 2385 }; | 2387 }; |
| 2386 | 2388 |
| 2389 class LoadICTrampolineTFStub : public TurboFanCodeStub { |
| 2390 public: |
| 2391 LoadICTrampolineTFStub(Isolate* isolate, const LoadICState& state) |
| 2392 : TurboFanCodeStub(isolate) { |
| 2393 minor_key_ = state.GetExtraICState(); |
| 2394 } |
| 2395 |
| 2396 void GenerateAssembly(CodeStubAssembler* assembler) const override; |
| 2397 |
| 2398 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } |
| 2399 |
| 2400 InlineCacheState GetICState() const final { return GENERIC; } |
| 2401 |
| 2402 ExtraICState GetExtraICState() const final { |
| 2403 return static_cast<ExtraICState>(minor_key_); |
| 2404 } |
| 2405 |
| 2406 protected: |
| 2407 LoadICState state() const { |
| 2408 return LoadICState(static_cast<ExtraICState>(minor_key_)); |
| 2409 } |
| 2410 |
| 2411 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); |
| 2412 DEFINE_CODE_STUB(LoadICTrampolineTF, TurboFanCodeStub); |
| 2413 }; |
| 2387 | 2414 |
| 2388 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { | 2415 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { |
| 2389 public: | 2416 public: |
| 2390 explicit KeyedLoadICTrampolineStub(Isolate* isolate, const LoadICState& state) | 2417 explicit KeyedLoadICTrampolineStub(Isolate* isolate, const LoadICState& state) |
| 2391 : LoadICTrampolineStub(isolate, state) {} | 2418 : LoadICTrampolineStub(isolate, state) {} |
| 2392 | 2419 |
| 2393 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2420 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2394 | 2421 |
| 2395 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); | 2422 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); |
| 2396 }; | 2423 }; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2474 return static_cast<ExtraICState>(minor_key_); | 2501 return static_cast<ExtraICState>(minor_key_); |
| 2475 } | 2502 } |
| 2476 | 2503 |
| 2477 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 2504 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 2478 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub); | 2505 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub); |
| 2479 | 2506 |
| 2480 protected: | 2507 protected: |
| 2481 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2508 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2482 }; | 2509 }; |
| 2483 | 2510 |
| 2511 class LoadICTFStub : public TurboFanCodeStub { |
| 2512 public: |
| 2513 explicit LoadICTFStub(Isolate* isolate, const LoadICState& state) |
| 2514 : TurboFanCodeStub(isolate) { |
| 2515 minor_key_ = state.GetExtraICState(); |
| 2516 } |
| 2517 |
| 2518 void GenerateAssembly(CodeStubAssembler* assembler) const override; |
| 2519 |
| 2520 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } |
| 2521 InlineCacheState GetICState() const final { return GENERIC; } |
| 2522 ExtraICState GetExtraICState() const final { |
| 2523 return static_cast<ExtraICState>(minor_key_); |
| 2524 } |
| 2525 |
| 2526 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 2527 DEFINE_CODE_STUB(LoadICTF, TurboFanCodeStub); |
| 2528 }; |
| 2484 | 2529 |
| 2485 class KeyedLoadICStub : public PlatformCodeStub { | 2530 class KeyedLoadICStub : public PlatformCodeStub { |
| 2486 public: | 2531 public: |
| 2487 explicit KeyedLoadICStub(Isolate* isolate, const LoadICState& state) | 2532 explicit KeyedLoadICStub(Isolate* isolate, const LoadICState& state) |
| 2488 : PlatformCodeStub(isolate) { | 2533 : PlatformCodeStub(isolate) { |
| 2489 minor_key_ = state.GetExtraICState(); | 2534 minor_key_ = state.GetExtraICState(); |
| 2490 } | 2535 } |
| 2491 | 2536 |
| 2492 void GenerateForTrampoline(MacroAssembler* masm); | 2537 void GenerateForTrampoline(MacroAssembler* masm); |
| 2493 | 2538 |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3246 #undef DEFINE_HYDROGEN_CODE_STUB | 3291 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3247 #undef DEFINE_CODE_STUB | 3292 #undef DEFINE_CODE_STUB |
| 3248 #undef DEFINE_CODE_STUB_BASE | 3293 #undef DEFINE_CODE_STUB_BASE |
| 3249 | 3294 |
| 3250 extern Representation RepresentationFromType(Type* type); | 3295 extern Representation RepresentationFromType(Type* type); |
| 3251 | 3296 |
| 3252 } // namespace internal | 3297 } // namespace internal |
| 3253 } // namespace v8 | 3298 } // namespace v8 |
| 3254 | 3299 |
| 3255 #endif // V8_CODE_STUBS_H_ | 3300 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |