| Index: src/code-stubs-hydrogen.cc
|
| diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
|
| index 27d34b4415353156250c348fbdbf76117c438714..99e0cccb3f2bdeb80f97838092c5f33a3379124e 100644
|
| --- a/src/code-stubs-hydrogen.cc
|
| +++ b/src/code-stubs-hydrogen.cc
|
| @@ -128,8 +128,7 @@ bool CodeStubGraphBuilderBase::BuildGraph() {
|
| HInstruction* stack_parameter_count = NULL;
|
| for (int i = 0; i < param_count; ++i) {
|
| Representation r = descriptor_->GetEnvironmentParameterRepresentation(i);
|
| - HParameter* param = Add<HParameter>(i,
|
| - HParameter::REGISTER_PARAMETER, r);
|
| + HParameter* param = Add<HParameter>(i, HParameter::REGISTER_PARAMETER, r);
|
| start_environment->Bind(i, param);
|
| parameters_[i] = param;
|
| if (descriptor_->IsEnvironmentParameterCountRegister(i)) {
|
| @@ -537,6 +536,30 @@ Handle<Code> CreateAllocationSiteStub::GenerateCode() {
|
|
|
|
|
| template <>
|
| +HValue* CodeStubGraphBuilder<GrowArrayElementsStub>::BuildCodeStub() {
|
| + HValue* object = GetParameter(GrowArrayElementsStub::kObjectIndex);
|
| + HValue* key = GetParameter(GrowArrayElementsStub::kKeyIndex);
|
| + HValue* current_capacity = GetParameter(
|
| + GrowArrayElementsStub::kCapacityIndex);
|
| + ElementsKind kind = casted_stub()->elements_kind();
|
| +
|
| + HValue* elements = AddLoadElements(object);
|
| + HValue* length = casted_stub()->is_js_array()
|
| + ? Add<HLoadNamedField>(object, static_cast<HValue*>(NULL),
|
| + HObjectAccess::ForArrayLength(kind))
|
| + : current_capacity;
|
| +
|
| + return BuildCheckAndGrowElementsCapacity(object, elements, kind, length,
|
| + current_capacity, key);
|
| +}
|
| +
|
| +
|
| +Handle<Code> GrowArrayElementsStub::GenerateCode() {
|
| + return DoGenerateCode(this);
|
| +}
|
| +
|
| +
|
| +template <>
|
| HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() {
|
| HInstruction* load = BuildUncheckedMonomorphicElementAccess(
|
| GetParameter(KeyedLoadIC::kReceiverIndex),
|
|
|