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 44 matching lines...) Loading... |
55 /* more deopting Hydrogen stubs. */ \ | 55 /* more deopting Hydrogen stubs. */ \ |
56 V(StubFailureTrampoline) \ | 56 V(StubFailureTrampoline) \ |
57 /* These are only called from FCG */ \ | 57 /* These are only called from FCG */ \ |
58 /* They can be removed when only the TF */ \ | 58 /* They can be removed when only the TF */ \ |
59 /* version of the corresponding stub is */ \ | 59 /* version of the corresponding stub is */ \ |
60 /* used universally */ \ | 60 /* used universally */ \ |
61 V(CallICTrampoline) \ | 61 V(CallICTrampoline) \ |
62 V(KeyedLoadICTrampoline) \ | 62 V(KeyedLoadICTrampoline) \ |
63 V(KeyedStoreICTrampoline) \ | 63 V(KeyedStoreICTrampoline) \ |
64 /* --- HydrogenCodeStubs --- */ \ | 64 /* --- HydrogenCodeStubs --- */ \ |
65 V(StringAdd) \ | |
66 /* These builtins w/ JS linkage are */ \ | 65 /* These builtins w/ JS linkage are */ \ |
67 /* just fast-cases of C++ builtins. They */ \ | 66 /* just fast-cases of C++ builtins. They */ \ |
68 /* require varg support from TF */ \ | 67 /* require varg support from TF */ \ |
69 V(FastArrayPush) \ | 68 V(FastArrayPush) \ |
70 V(FastFunctionBind) \ | 69 V(FastFunctionBind) \ |
71 /* These will be ported/eliminated */ \ | 70 /* These will be ported/eliminated */ \ |
72 /* as part of the new IC system, ask */ \ | 71 /* as part of the new IC system, ask */ \ |
73 /* ishell before doing anything */ \ | 72 /* ishell before doing anything */ \ |
74 V(KeyedLoadGeneric) \ | 73 V(KeyedLoadGeneric) \ |
75 V(LoadConstant) \ | 74 V(LoadConstant) \ |
(...skipping 39 matching lines...) Loading... |
115 V(FastCloneRegExp) \ | 114 V(FastCloneRegExp) \ |
116 V(FastCloneShallowArray) \ | 115 V(FastCloneShallowArray) \ |
117 V(FastCloneShallowObject) \ | 116 V(FastCloneShallowObject) \ |
118 V(FastNewClosure) \ | 117 V(FastNewClosure) \ |
119 V(FastNewFunctionContext) \ | 118 V(FastNewFunctionContext) \ |
120 V(KeyedLoadSloppyArguments) \ | 119 V(KeyedLoadSloppyArguments) \ |
121 V(KeyedStoreSloppyArguments) \ | 120 V(KeyedStoreSloppyArguments) \ |
122 V(LoadScriptContextField) \ | 121 V(LoadScriptContextField) \ |
123 V(StoreScriptContextField) \ | 122 V(StoreScriptContextField) \ |
124 V(NumberToString) \ | 123 V(NumberToString) \ |
| 124 V(StringAdd) \ |
125 V(GetProperty) \ | 125 V(GetProperty) \ |
126 V(LoadIC) \ | 126 V(LoadIC) \ |
127 V(KeyedLoadICTF) \ | 127 V(KeyedLoadICTF) \ |
128 V(StoreFastElement) \ | 128 V(StoreFastElement) \ |
129 V(StoreField) \ | 129 V(StoreField) \ |
130 V(StoreGlobal) \ | 130 V(StoreGlobal) \ |
131 V(StoreIC) \ | 131 V(StoreIC) \ |
132 V(StoreInterceptor) \ | 132 V(StoreInterceptor) \ |
133 V(StoreMap) \ | 133 V(StoreMap) \ |
134 V(StoreTransition) \ | 134 V(StoreTransition) \ |
(...skipping 1471 matching lines...) Loading... |
1606 | 1606 |
1607 BinaryOpWithAllocationSiteStub(Isolate* isolate, const BinaryOpICState& state) | 1607 BinaryOpWithAllocationSiteStub(Isolate* isolate, const BinaryOpICState& state) |
1608 : BinaryOpICStub(isolate, state) {} | 1608 : BinaryOpICStub(isolate, state) {} |
1609 | 1609 |
1610 Code::Kind GetCodeKind() const final { return Code::STUB; } | 1610 Code::Kind GetCodeKind() const final { return Code::STUB; } |
1611 | 1611 |
1612 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithAllocationSite); | 1612 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithAllocationSite); |
1613 DEFINE_HYDROGEN_CODE_STUB(BinaryOpWithAllocationSite, BinaryOpICStub); | 1613 DEFINE_HYDROGEN_CODE_STUB(BinaryOpWithAllocationSite, BinaryOpICStub); |
1614 }; | 1614 }; |
1615 | 1615 |
1616 | 1616 class StringAddStub final : public TurboFanCodeStub { |
1617 class StringAddStub final : public HydrogenCodeStub { | |
1618 public: | 1617 public: |
1619 StringAddStub(Isolate* isolate, StringAddFlags flags, | 1618 StringAddStub(Isolate* isolate, StringAddFlags flags, |
1620 PretenureFlag pretenure_flag) | 1619 PretenureFlag pretenure_flag) |
1621 : HydrogenCodeStub(isolate) { | 1620 : TurboFanCodeStub(isolate) { |
1622 set_sub_minor_key(StringAddFlagsBits::encode(flags) | | 1621 minor_key_ = (StringAddFlagsBits::encode(flags) | |
1623 PretenureFlagBits::encode(pretenure_flag)); | 1622 PretenureFlagBits::encode(pretenure_flag)); |
1624 } | 1623 } |
1625 | 1624 |
1626 StringAddFlags flags() const { | 1625 StringAddFlags flags() const { |
1627 return StringAddFlagsBits::decode(sub_minor_key()); | 1626 return StringAddFlagsBits::decode(minor_key_); |
1628 } | 1627 } |
1629 | 1628 |
1630 PretenureFlag pretenure_flag() const { | 1629 PretenureFlag pretenure_flag() const { |
1631 return PretenureFlagBits::decode(sub_minor_key()); | 1630 return PretenureFlagBits::decode(minor_key_); |
1632 } | 1631 } |
1633 | 1632 |
1634 private: | 1633 private: |
1635 class StringAddFlagsBits : public BitField<StringAddFlags, 0, 3> {}; | 1634 class StringAddFlagsBits : public BitField<StringAddFlags, 0, 3> {}; |
1636 class PretenureFlagBits : public BitField<PretenureFlag, 3, 1> {}; | 1635 class PretenureFlagBits : public BitField<PretenureFlag, 3, 1> {}; |
1637 | 1636 |
1638 void PrintBaseName(std::ostream& os) const override; // NOLINT | 1637 void PrintBaseName(std::ostream& os) const override; // NOLINT |
1639 | 1638 |
1640 DEFINE_CALL_INTERFACE_DESCRIPTOR(StringAdd); | 1639 DEFINE_CALL_INTERFACE_DESCRIPTOR(StringAdd); |
1641 DEFINE_HYDROGEN_CODE_STUB(StringAdd, HydrogenCodeStub); | 1640 DEFINE_TURBOFAN_CODE_STUB(StringAdd, TurboFanCodeStub); |
1642 }; | 1641 }; |
1643 | 1642 |
1644 | 1643 |
1645 class CompareICStub : public PlatformCodeStub { | 1644 class CompareICStub : public PlatformCodeStub { |
1646 public: | 1645 public: |
1647 CompareICStub(Isolate* isolate, Token::Value op, CompareICState::State left, | 1646 CompareICStub(Isolate* isolate, Token::Value op, CompareICState::State left, |
1648 CompareICState::State right, CompareICState::State state) | 1647 CompareICState::State right, CompareICState::State state) |
1649 : PlatformCodeStub(isolate) { | 1648 : PlatformCodeStub(isolate) { |
1650 DCHECK(Token::IsCompareOp(op)); | 1649 DCHECK(Token::IsCompareOp(op)); |
1651 DCHECK(OpBits::is_valid(op - Token::EQ)); | 1650 DCHECK(OpBits::is_valid(op - Token::EQ)); |
(...skipping 1137 matching lines...) Loading... |
2789 #undef DEFINE_HYDROGEN_CODE_STUB | 2788 #undef DEFINE_HYDROGEN_CODE_STUB |
2790 #undef DEFINE_CODE_STUB | 2789 #undef DEFINE_CODE_STUB |
2791 #undef DEFINE_CODE_STUB_BASE | 2790 #undef DEFINE_CODE_STUB_BASE |
2792 | 2791 |
2793 extern Representation RepresentationFromMachineType(MachineType type); | 2792 extern Representation RepresentationFromMachineType(MachineType type); |
2794 | 2793 |
2795 } // namespace internal | 2794 } // namespace internal |
2796 } // namespace v8 | 2795 } // namespace v8 |
2797 | 2796 |
2798 #endif // V8_CODE_STUBS_H_ | 2797 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |