| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 151a51ca31d03c123035dfc7a3c789b4a358eae9..e8c2ea83be15ce4500bdb96e13e7605c9da7c88a 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -442,7 +442,7 @@ class FastNewBlockContextStub : public PlatformCodeStub {
|
| };
|
|
|
|
|
| -class FastCloneShallowArrayStub : public PlatformCodeStub {
|
| +class FastCloneShallowArrayStub : public HydrogenCodeStub {
|
| public:
|
| // Maximum length of copied elements array.
|
| static const int kMaximumClonedLength = 8;
|
| @@ -466,7 +466,31 @@ class FastCloneShallowArrayStub : public PlatformCodeStub {
|
| ASSERT_LE(length_, kMaximumClonedLength);
|
| }
|
|
|
| - void Generate(MacroAssembler* masm);
|
| + Mode mode() const { return mode_; }
|
| + int length() const { return length_; }
|
| + AllocationSiteMode allocation_site_mode() const {
|
| + return allocation_site_mode_;
|
| + }
|
| +
|
| + ElementsKind ComputeElementsKind() const {
|
| + switch (mode()) {
|
| + case CLONE_ELEMENTS:
|
| + case COPY_ON_WRITE_ELEMENTS:
|
| + return FAST_ELEMENTS;
|
| + case CLONE_DOUBLE_ELEMENTS:
|
| + return FAST_DOUBLE_ELEMENTS;
|
| + case CLONE_ANY_ELEMENTS:
|
| + /*fall-through*/;
|
| + }
|
| + UNREACHABLE();
|
| + return LAST_ELEMENTS_KIND;
|
| + }
|
| +
|
| + virtual Handle<Code> GenerateCode();
|
| +
|
| + virtual void InitializeInterfaceDescriptor(
|
| + Isolate* isolate,
|
| + CodeStubInterfaceDescriptor* descriptor);
|
|
|
| private:
|
| Mode mode_;
|
| @@ -1573,18 +1597,26 @@ class StubFailureTrampolineStub : public PlatformCodeStub {
|
| static const int kMaxExtraExpressionStackCount = 1;
|
|
|
| explicit StubFailureTrampolineStub(int extra_expression_stack_count)
|
| - : extra_expression_stack_count_(extra_expression_stack_count) {}
|
| + : fp_registers_(CanUseFPRegisters()),
|
| + extra_expression_stack_count_(extra_expression_stack_count) {}
|
|
|
| virtual bool IsPregenerated() { return true; }
|
|
|
| static void GenerateAheadOfTime(Isolate* isolate);
|
|
|
| private:
|
| + class FPRegisters: public BitField<bool, 0, 1> {};
|
| + class ExtraStackCount: public BitField<int, 1, 1> {};
|
| +
|
| Major MajorKey() { return StubFailureTrampoline; }
|
| - int MinorKey() { return extra_expression_stack_count_; }
|
| + int MinorKey() {
|
| + return FPRegisters::encode(fp_registers_) |
|
| + ExtraStackCount::encode(extra_expression_stack_count_);
|
| + }
|
|
|
| void Generate(MacroAssembler* masm);
|
|
|
| + bool fp_registers_;
|
| int extra_expression_stack_count_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub);
|
|
|