Chromium Code Reviews| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 V(ProfileEntryHook) \ | 42 V(ProfileEntryHook) \ |
| 43 V(RecordWrite) \ | 43 V(RecordWrite) \ |
| 44 V(RegExpExec) \ | 44 V(RegExpExec) \ |
| 45 V(StoreBufferOverflow) \ | 45 V(StoreBufferOverflow) \ |
| 46 V(StoreElement) \ | 46 V(StoreElement) \ |
| 47 V(StubFailureTrampoline) \ | 47 V(StubFailureTrampoline) \ |
| 48 V(SubString) \ | 48 V(SubString) \ |
| 49 V(ToString) \ | 49 V(ToString) \ |
| 50 V(ToName) \ | 50 V(ToName) \ |
| 51 V(ToObject) \ | 51 V(ToObject) \ |
| 52 V(VectorStoreICTrampoline) \ | 52 V(StoreICTrampoline) \ |
| 53 V(VectorKeyedStoreICTrampoline) \ | 53 V(KeyedStoreICTrampoline) \ |
| 54 V(VectorStoreIC) \ | 54 V(StoreIC) \ |
| 55 V(VectorKeyedStoreIC) \ | 55 V(KeyedStoreIC) \ |
| 56 /* HydrogenCodeStubs */ \ | 56 /* HydrogenCodeStubs */ \ |
| 57 V(BinaryOpIC) \ | 57 V(BinaryOpIC) \ |
| 58 V(BinaryOpWithAllocationSite) \ | 58 V(BinaryOpWithAllocationSite) \ |
| 59 V(CreateAllocationSite) \ | 59 V(CreateAllocationSite) \ |
| 60 V(CreateWeakCell) \ | 60 V(CreateWeakCell) \ |
| 61 V(ElementsTransitionAndStore) \ | 61 V(ElementsTransitionAndStore) \ |
| 62 V(FastArrayPush) \ | 62 V(FastArrayPush) \ |
| 63 V(FastCloneRegExp) \ | 63 V(FastCloneRegExp) \ |
| 64 V(FastCloneShallowArray) \ | 64 V(FastCloneShallowArray) \ |
| 65 V(FastFunctionBind) \ | 65 V(FastFunctionBind) \ |
| (...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2356 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { | 2356 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { |
| 2357 public: | 2357 public: |
| 2358 explicit KeyedLoadICTrampolineStub(Isolate* isolate) | 2358 explicit KeyedLoadICTrampolineStub(Isolate* isolate) |
| 2359 : LoadICTrampolineStub(isolate) {} | 2359 : LoadICTrampolineStub(isolate) {} |
| 2360 | 2360 |
| 2361 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2361 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2362 | 2362 |
| 2363 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); | 2363 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); |
| 2364 }; | 2364 }; |
| 2365 | 2365 |
| 2366 | 2366 class StoreICTrampolineStub : public PlatformCodeStub { |
| 2367 class VectorStoreICTrampolineStub : public PlatformCodeStub { | |
| 2368 public: | 2367 public: |
| 2369 VectorStoreICTrampolineStub(Isolate* isolate, const StoreICState& state) | 2368 StoreICTrampolineStub(Isolate* isolate, const StoreICState& state) |
| 2370 : PlatformCodeStub(isolate) { | 2369 : PlatformCodeStub(isolate) { |
| 2371 minor_key_ = state.GetExtraICState(); | 2370 minor_key_ = state.GetExtraICState(); |
| 2372 } | 2371 } |
| 2373 | 2372 |
| 2374 Code::Kind GetCodeKind() const override { return Code::STORE_IC; } | 2373 Code::Kind GetCodeKind() const override { return Code::STORE_IC; } |
| 2375 | 2374 |
| 2376 ExtraICState GetExtraICState() const final { | 2375 ExtraICState GetExtraICState() const final { |
| 2377 return static_cast<ExtraICState>(minor_key_); | 2376 return static_cast<ExtraICState>(minor_key_); |
| 2378 } | 2377 } |
| 2379 | 2378 |
| 2380 protected: | 2379 protected: |
| 2381 StoreICState state() const { | 2380 StoreICState state() const { |
| 2382 return StoreICState(static_cast<ExtraICState>(minor_key_)); | 2381 return StoreICState(static_cast<ExtraICState>(minor_key_)); |
| 2383 } | 2382 } |
| 2384 | 2383 |
| 2385 private: | 2384 private: |
| 2386 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreICTrampoline); | 2385 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreICTrampoline); |
|
Jakob Kummerow
2016/07/14 09:41:59
future renaming?
Igor Sheludko
2016/07/14 09:47:54
Exactly!
| |
| 2387 DEFINE_PLATFORM_CODE_STUB(VectorStoreICTrampoline, PlatformCodeStub); | 2386 DEFINE_PLATFORM_CODE_STUB(StoreICTrampoline, PlatformCodeStub); |
| 2387 }; | |
| 2388 | |
| 2389 class KeyedStoreICTrampolineStub : public StoreICTrampolineStub { | |
| 2390 public: | |
| 2391 KeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state) | |
| 2392 : StoreICTrampolineStub(isolate, state) {} | |
| 2393 | |
| 2394 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; } | |
| 2395 | |
| 2396 DEFINE_PLATFORM_CODE_STUB(KeyedStoreICTrampoline, StoreICTrampolineStub); | |
| 2388 }; | 2397 }; |
| 2389 | 2398 |
| 2390 | 2399 |
| 2391 class VectorKeyedStoreICTrampolineStub : public VectorStoreICTrampolineStub { | |
| 2392 public: | |
| 2393 VectorKeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state) | |
| 2394 : VectorStoreICTrampolineStub(isolate, state) {} | |
| 2395 | |
| 2396 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; } | |
| 2397 | |
| 2398 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreICTrampoline, | |
| 2399 VectorStoreICTrampolineStub); | |
| 2400 }; | |
| 2401 | |
| 2402 | |
| 2403 class CallICTrampolineStub : public PlatformCodeStub { | 2400 class CallICTrampolineStub : public PlatformCodeStub { |
| 2404 public: | 2401 public: |
| 2405 CallICTrampolineStub(Isolate* isolate, const CallICState& state) | 2402 CallICTrampolineStub(Isolate* isolate, const CallICState& state) |
| 2406 : PlatformCodeStub(isolate) { | 2403 : PlatformCodeStub(isolate) { |
| 2407 minor_key_ = state.GetExtraICState(); | 2404 minor_key_ = state.GetExtraICState(); |
| 2408 } | 2405 } |
| 2409 | 2406 |
| 2410 Code::Kind GetCodeKind() const override { return Code::CALL_IC; } | 2407 Code::Kind GetCodeKind() const override { return Code::CALL_IC; } |
| 2411 | 2408 |
| 2412 ExtraICState GetExtraICState() const final { | 2409 ExtraICState GetExtraICState() const final { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2477 | 2474 |
| 2478 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } | 2475 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } |
| 2479 | 2476 |
| 2480 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 2477 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
| 2481 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); | 2478 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); |
| 2482 | 2479 |
| 2483 protected: | 2480 protected: |
| 2484 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2481 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2485 }; | 2482 }; |
| 2486 | 2483 |
| 2487 | 2484 class StoreICStub : public PlatformCodeStub { |
| 2488 class VectorStoreICStub : public PlatformCodeStub { | |
| 2489 public: | 2485 public: |
| 2490 VectorStoreICStub(Isolate* isolate, const StoreICState& state) | 2486 StoreICStub(Isolate* isolate, const StoreICState& state) |
| 2491 : PlatformCodeStub(isolate) { | 2487 : PlatformCodeStub(isolate) { |
| 2492 minor_key_ = state.GetExtraICState(); | 2488 minor_key_ = state.GetExtraICState(); |
| 2493 } | 2489 } |
| 2494 | 2490 |
| 2495 void GenerateForTrampoline(MacroAssembler* masm); | 2491 void GenerateForTrampoline(MacroAssembler* masm); |
| 2496 | 2492 |
| 2497 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } | 2493 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } |
| 2498 | 2494 |
| 2499 ExtraICState GetExtraICState() const final { | 2495 ExtraICState GetExtraICState() const final { |
| 2500 return static_cast<ExtraICState>(minor_key_); | 2496 return static_cast<ExtraICState>(minor_key_); |
| 2501 } | 2497 } |
| 2502 | 2498 |
| 2503 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); | 2499 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); |
| 2504 DEFINE_PLATFORM_CODE_STUB(VectorStoreIC, PlatformCodeStub); | 2500 DEFINE_PLATFORM_CODE_STUB(StoreIC, PlatformCodeStub); |
| 2505 | 2501 |
| 2506 protected: | 2502 protected: |
| 2507 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2503 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2508 }; | 2504 }; |
| 2509 | 2505 |
| 2510 | 2506 class KeyedStoreICStub : public PlatformCodeStub { |
| 2511 class VectorKeyedStoreICStub : public PlatformCodeStub { | |
| 2512 public: | 2507 public: |
| 2513 VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state) | 2508 KeyedStoreICStub(Isolate* isolate, const StoreICState& state) |
| 2514 : PlatformCodeStub(isolate) { | 2509 : PlatformCodeStub(isolate) { |
| 2515 minor_key_ = state.GetExtraICState(); | 2510 minor_key_ = state.GetExtraICState(); |
| 2516 } | 2511 } |
| 2517 | 2512 |
| 2518 void GenerateForTrampoline(MacroAssembler* masm); | 2513 void GenerateForTrampoline(MacroAssembler* masm); |
| 2519 | 2514 |
| 2520 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } | 2515 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } |
| 2521 | 2516 |
| 2522 ExtraICState GetExtraICState() const final { | 2517 ExtraICState GetExtraICState() const final { |
| 2523 return static_cast<ExtraICState>(minor_key_); | 2518 return static_cast<ExtraICState>(minor_key_); |
| 2524 } | 2519 } |
| 2525 | 2520 |
| 2526 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); | 2521 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); |
| 2527 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub); | 2522 DEFINE_PLATFORM_CODE_STUB(KeyedStoreIC, PlatformCodeStub); |
| 2528 | 2523 |
| 2529 protected: | 2524 protected: |
| 2530 void GenerateImpl(MacroAssembler* masm, bool in_frame); | 2525 void GenerateImpl(MacroAssembler* masm, bool in_frame); |
| 2531 }; | 2526 }; |
| 2532 | 2527 |
| 2533 | 2528 |
| 2534 class DoubleToIStub : public PlatformCodeStub { | 2529 class DoubleToIStub : public PlatformCodeStub { |
| 2535 public: | 2530 public: |
| 2536 DoubleToIStub(Isolate* isolate, Register source, Register destination, | 2531 DoubleToIStub(Isolate* isolate, Register source, Register destination, |
| 2537 int offset, bool is_truncating, bool skip_fastpath = false) | 2532 int offset, bool is_truncating, bool skip_fastpath = false) |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3109 #undef DEFINE_HYDROGEN_CODE_STUB | 3104 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3110 #undef DEFINE_CODE_STUB | 3105 #undef DEFINE_CODE_STUB |
| 3111 #undef DEFINE_CODE_STUB_BASE | 3106 #undef DEFINE_CODE_STUB_BASE |
| 3112 | 3107 |
| 3113 extern Representation RepresentationFromType(Type* type); | 3108 extern Representation RepresentationFromType(Type* type); |
| 3114 | 3109 |
| 3115 } // namespace internal | 3110 } // namespace internal |
| 3116 } // namespace v8 | 3111 } // namespace v8 |
| 3117 | 3112 |
| 3118 #endif // V8_CODE_STUBS_H_ | 3113 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |