Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index 9046e709fd9d3432377c82c2573072c62c00b852..ff0737c19c258d0123b8bdd7b855f05e8da39907 100644 |
| --- a/src/code-stubs.h |
| +++ b/src/code-stubs.h |
| @@ -68,7 +68,6 @@ class ObjectLiteral; |
| V(StoreICTrampoline) \ |
| /* --- HydrogenCodeStubs --- */ \ |
| V(ElementsTransitionAndStore) \ |
| - V(FastCloneShallowArray) \ |
| V(NumberToString) \ |
| V(StringAdd) \ |
| V(ToObject) \ |
| @@ -135,8 +134,9 @@ class ObjectLiteral; |
| V(InternalArrayNoArgumentConstructor) \ |
| V(InternalArraySingleArgumentConstructor) \ |
| V(Dec) \ |
| - V(FastCloneShallowObject) \ |
| V(FastCloneRegExp) \ |
| + V(FastCloneShallowArray) \ |
| + V(FastCloneShallowObject) \ |
| V(FastNewClosure) \ |
| V(FastNewFunctionContext) \ |
| V(InstanceOf) \ |
| @@ -1263,24 +1263,34 @@ class FastCloneRegExpStub final : public TurboFanCodeStub { |
| DEFINE_TURBOFAN_CODE_STUB(FastCloneRegExp, TurboFanCodeStub); |
| }; |
| - |
| -class FastCloneShallowArrayStub : public HydrogenCodeStub { |
| +class FastCloneShallowArrayStub : public TurboFanCodeStub { |
| public: |
| FastCloneShallowArrayStub(Isolate* isolate, |
| AllocationSiteMode allocation_site_mode) |
| - : HydrogenCodeStub(isolate) { |
| - set_sub_minor_key(AllocationSiteModeBits::encode(allocation_site_mode)); |
| + : TurboFanCodeStub(isolate) { |
| + minor_key_ = AllocationSiteModeBits::encode(allocation_site_mode); |
| } |
| + static compiler::Node* Generate( |
| + CodeStubAssembler* assembler, compiler::Node* closure, |
| + compiler::Node* literal_index, compiler::Node* constant_elements, |
| + compiler::Node* context, |
| + AllocationSiteMode allocation_site_mode = DONT_TRACK_ALLOCATION_SITE); |
|
rmcilroy
2016/09/13 20:29:59
no need for the default parameter here
klaasb
2016/09/14 18:24:52
Done.
|
| + |
| AllocationSiteMode allocation_site_mode() const { |
| - return AllocationSiteModeBits::decode(sub_minor_key()); |
| + return AllocationSiteModeBits::decode(minor_key_); |
| } |
| private: |
| class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1> {}; |
| + static compiler::Node* NonEmptyShallowClone( |
|
rmcilroy
2016/09/13 20:29:59
This should probably just be an anonymous namespac
klaasb
2016/09/14 18:24:52
Done.
|
| + CodeStubAssembler* assembler, compiler::Node* boilerplate, |
| + compiler::Node* boilerplate_map, compiler::Node* boilerplate_elements, |
| + compiler::Node* allocation_site, compiler::Node* capacity, |
| + ElementsKind kind); |
| DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowArray); |
| - DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowArray, HydrogenCodeStub); |
| + DEFINE_TURBOFAN_CODE_STUB(FastCloneShallowArray, TurboFanCodeStub); |
| }; |
| class FastCloneShallowObjectStub : public TurboFanCodeStub { |