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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 V(Typeof) \ | 76 V(Typeof) \ |
77 /* These builtins w/ JS linkage are */ \ | 77 /* These builtins w/ JS linkage are */ \ |
78 /* just fast-cases of C++ builtins. They */ \ | 78 /* just fast-cases of C++ builtins. They */ \ |
79 /* require varg support from TF */ \ | 79 /* require varg support from TF */ \ |
80 V(FastArrayPush) \ | 80 V(FastArrayPush) \ |
81 V(FastFunctionBind) \ | 81 V(FastFunctionBind) \ |
82 /* These will be ported/eliminated */ \ | 82 /* These will be ported/eliminated */ \ |
83 /* as part of the new IC system, ask */ \ | 83 /* as part of the new IC system, ask */ \ |
84 /* ishell before doing anything */ \ | 84 /* ishell before doing anything */ \ |
85 V(KeyedLoadGeneric) \ | 85 V(KeyedLoadGeneric) \ |
86 V(KeyedLoadSloppyArguments) \ | |
87 V(KeyedStoreSloppyArguments) \ | |
88 V(LoadConstant) \ | 86 V(LoadConstant) \ |
89 V(LoadDictionaryElement) \ | 87 V(LoadDictionaryElement) \ |
90 V(LoadFastElement) \ | 88 V(LoadFastElement) \ |
91 V(LoadField) \ | 89 V(LoadField) \ |
92 V(LoadScriptContextField) \ | 90 V(LoadScriptContextField) \ |
93 V(StoreFastElement) \ | 91 V(StoreFastElement) \ |
94 V(StoreScriptContextField) \ | 92 V(StoreScriptContextField) \ |
95 V(StoreTransition) \ | 93 V(StoreTransition) \ |
96 /* These should never be ported to TF */ \ | 94 /* These should never be ported to TF */ \ |
97 /* because they are either used only by */ \ | 95 /* because they are either used only by */ \ |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 V(FastCloneRegExp) \ | 142 V(FastCloneRegExp) \ |
145 V(FastNewClosure) \ | 143 V(FastNewClosure) \ |
146 V(FastNewFunctionContext) \ | 144 V(FastNewFunctionContext) \ |
147 V(InstanceOf) \ | 145 V(InstanceOf) \ |
148 V(LessThan) \ | 146 V(LessThan) \ |
149 V(LessThanOrEqual) \ | 147 V(LessThanOrEqual) \ |
150 V(GreaterThan) \ | 148 V(GreaterThan) \ |
151 V(GreaterThanOrEqual) \ | 149 V(GreaterThanOrEqual) \ |
152 V(Equal) \ | 150 V(Equal) \ |
153 V(NotEqual) \ | 151 V(NotEqual) \ |
| 152 V(KeyedLoadSloppyArguments) \ |
| 153 V(KeyedStoreSloppyArguments) \ |
154 V(StrictEqual) \ | 154 V(StrictEqual) \ |
155 V(StrictNotEqual) \ | 155 V(StrictNotEqual) \ |
156 V(StringEqual) \ | 156 V(StringEqual) \ |
157 V(StringNotEqual) \ | 157 V(StringNotEqual) \ |
158 V(StringLessThan) \ | 158 V(StringLessThan) \ |
159 V(StringLessThanOrEqual) \ | 159 V(StringLessThanOrEqual) \ |
160 V(StringGreaterThan) \ | 160 V(StringGreaterThan) \ |
161 V(StringGreaterThanOrEqual) \ | 161 V(StringGreaterThanOrEqual) \ |
162 V(ToInteger) \ | 162 V(ToInteger) \ |
163 V(ToLength) \ | 163 V(ToLength) \ |
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 Code::Kind kind() const override { return Code::LOAD_IC; } | 1544 Code::Kind kind() const override { return Code::LOAD_IC; } |
1545 | 1545 |
1546 private: | 1546 private: |
1547 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; | 1547 class LoadFieldByIndexBits : public BitField<int, 0, 13> {}; |
1548 | 1548 |
1549 // TODO(ishell): The stub uses only kReceiver parameter. | 1549 // TODO(ishell): The stub uses only kReceiver parameter. |
1550 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 1550 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
1551 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); | 1551 DEFINE_HANDLER_CODE_STUB(LoadField, HandlerStub); |
1552 }; | 1552 }; |
1553 | 1553 |
1554 | 1554 class KeyedLoadSloppyArgumentsStub : public TurboFanCodeStub { |
1555 class KeyedLoadSloppyArgumentsStub : public HandlerStub { | |
1556 public: | 1555 public: |
1557 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) | 1556 explicit KeyedLoadSloppyArgumentsStub(Isolate* isolate) |
1558 : HandlerStub(isolate) {} | 1557 : TurboFanCodeStub(isolate) {} |
| 1558 |
| 1559 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 1560 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } |
1559 | 1561 |
1560 protected: | 1562 protected: |
1561 Code::Kind kind() const override { return Code::KEYED_LOAD_IC; } | |
1562 | |
1563 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 1563 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
1564 DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub); | 1564 DEFINE_TURBOFAN_CODE_STUB(KeyedLoadSloppyArguments, TurboFanCodeStub); |
1565 }; | 1565 }; |
1566 | 1566 |
1567 | 1567 |
1568 class CommonStoreModeBits : public BitField<KeyedAccessStoreMode, 0, 3> {}; | 1568 class CommonStoreModeBits : public BitField<KeyedAccessStoreMode, 0, 3> {}; |
1569 | 1569 |
1570 class KeyedStoreSloppyArgumentsStub : public HandlerStub { | 1570 class KeyedStoreSloppyArgumentsStub : public TurboFanCodeStub { |
1571 public: | 1571 public: |
1572 explicit KeyedStoreSloppyArgumentsStub(Isolate* isolate, | 1572 explicit KeyedStoreSloppyArgumentsStub(Isolate* isolate, |
1573 KeyedAccessStoreMode mode) | 1573 KeyedAccessStoreMode mode) |
1574 : HandlerStub(isolate) { | 1574 : TurboFanCodeStub(isolate) { |
1575 set_sub_minor_key(CommonStoreModeBits::encode(mode)); | 1575 minor_key_ = CommonStoreModeBits::encode(mode); |
1576 } | 1576 } |
1577 | 1577 |
| 1578 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
| 1579 ExtraICState GetExtraICState() const override { return Code::STORE_IC; } |
| 1580 |
1578 protected: | 1581 protected: |
1579 Code::Kind kind() const override { return Code::KEYED_STORE_IC; } | |
1580 | |
1581 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector); | 1582 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector); |
1582 DEFINE_HANDLER_CODE_STUB(KeyedStoreSloppyArguments, HandlerStub); | 1583 DEFINE_TURBOFAN_CODE_STUB(KeyedStoreSloppyArguments, TurboFanCodeStub); |
1583 }; | 1584 }; |
1584 | 1585 |
1585 | 1586 |
1586 class LoadConstantStub : public HandlerStub { | 1587 class LoadConstantStub : public HandlerStub { |
1587 public: | 1588 public: |
1588 LoadConstantStub(Isolate* isolate, int constant_index) | 1589 LoadConstantStub(Isolate* isolate, int constant_index) |
1589 : HandlerStub(isolate) { | 1590 : HandlerStub(isolate) { |
1590 set_sub_minor_key(ConstantIndexBits::encode(constant_index)); | 1591 set_sub_minor_key(ConstantIndexBits::encode(constant_index)); |
1591 } | 1592 } |
1592 | 1593 |
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3216 #undef DEFINE_HYDROGEN_CODE_STUB | 3217 #undef DEFINE_HYDROGEN_CODE_STUB |
3217 #undef DEFINE_CODE_STUB | 3218 #undef DEFINE_CODE_STUB |
3218 #undef DEFINE_CODE_STUB_BASE | 3219 #undef DEFINE_CODE_STUB_BASE |
3219 | 3220 |
3220 extern Representation RepresentationFromMachineType(MachineType type); | 3221 extern Representation RepresentationFromMachineType(MachineType type); |
3221 | 3222 |
3222 } // namespace internal | 3223 } // namespace internal |
3223 } // namespace v8 | 3224 } // namespace v8 |
3224 | 3225 |
3225 #endif // V8_CODE_STUBS_H_ | 3226 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |