Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 374f55f06879ffe12ecf7685f39f450d4eaa98dc..783384d45285f3e5325038a34ea6d3705e45042e 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -81,24 +81,6 @@ class CodeStubGraphBuilderBase : public HGraphBuilder { |
HContext* context() { return context_; } |
Isolate* isolate() { return info_.isolate(); } |
- class ArrayContextChecker { |
- public: |
- ArrayContextChecker(HGraphBuilder* builder, HValue* constructor, |
- HValue* array_function) |
- : checker_(builder) { |
- checker_.If<HCompareObjectEqAndBranch, HValue*>(constructor, |
- array_function); |
- checker_.Then(); |
- } |
- |
- ~ArrayContextChecker() { |
- checker_.ElseDeopt("Array constructor called from different context"); |
- checker_.End(); |
- } |
- private: |
- IfBuilder checker_; |
- }; |
- |
enum ArgumentClass { |
NONE, |
SINGLE, |
@@ -106,7 +88,6 @@ class CodeStubGraphBuilderBase : public HGraphBuilder { |
}; |
HValue* BuildArrayConstructor(ElementsKind kind, |
- ContextCheckMode context_mode, |
AllocationSiteOverrideMode override_mode, |
ArgumentClass argument_class); |
HValue* BuildInternalArrayConstructor(ElementsKind kind, |
@@ -672,15 +653,9 @@ Handle<Code> TransitionElementsKindStub::GenerateCode(Isolate* isolate) { |
HValue* CodeStubGraphBuilderBase::BuildArrayConstructor( |
ElementsKind kind, |
- ContextCheckMode context_mode, |
AllocationSiteOverrideMode override_mode, |
ArgumentClass argument_class) { |
HValue* constructor = GetParameter(ArrayConstructorStubBase::kConstructor); |
- if (context_mode == CONTEXT_CHECK_REQUIRED) { |
- HInstruction* array_function = BuildGetArrayFunction(); |
- ArrayContextChecker checker(this, constructor, array_function); |
- } |
- |
HValue* property_cell = GetParameter(ArrayConstructorStubBase::kPropertyCell); |
// Walk through the property cell to the AllocationSite |
HValue* alloc_site = Add<HLoadNamedField>(property_cell, |
@@ -787,9 +762,8 @@ HValue* CodeStubGraphBuilderBase::BuildArrayNArgumentsConstructor( |
template <> |
HValue* CodeStubGraphBuilder<ArrayNoArgumentConstructorStub>::BuildCodeStub() { |
ElementsKind kind = casted_stub()->elements_kind(); |
- ContextCheckMode context_mode = casted_stub()->context_mode(); |
AllocationSiteOverrideMode override_mode = casted_stub()->override_mode(); |
- return BuildArrayConstructor(kind, context_mode, override_mode, NONE); |
+ return BuildArrayConstructor(kind, override_mode, NONE); |
} |
@@ -802,9 +776,8 @@ template <> |
HValue* CodeStubGraphBuilder<ArraySingleArgumentConstructorStub>:: |
BuildCodeStub() { |
ElementsKind kind = casted_stub()->elements_kind(); |
- ContextCheckMode context_mode = casted_stub()->context_mode(); |
AllocationSiteOverrideMode override_mode = casted_stub()->override_mode(); |
- return BuildArrayConstructor(kind, context_mode, override_mode, SINGLE); |
+ return BuildArrayConstructor(kind, override_mode, SINGLE); |
} |
@@ -817,9 +790,8 @@ Handle<Code> ArraySingleArgumentConstructorStub::GenerateCode( |
template <> |
HValue* CodeStubGraphBuilder<ArrayNArgumentsConstructorStub>::BuildCodeStub() { |
ElementsKind kind = casted_stub()->elements_kind(); |
- ContextCheckMode context_mode = casted_stub()->context_mode(); |
AllocationSiteOverrideMode override_mode = casted_stub()->override_mode(); |
- return BuildArrayConstructor(kind, context_mode, override_mode, MULTIPLE); |
+ return BuildArrayConstructor(kind, override_mode, MULTIPLE); |
} |