| Index: src/code-stubs-hydrogen.cc
|
| diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
|
| index cce31d936808ea871dc8ea0798b134441dc41a9d..54ca327198767688eff0114f22ed73ab38981fa8 100644
|
| --- a/src/code-stubs-hydrogen.cc
|
| +++ b/src/code-stubs-hydrogen.cc
|
| @@ -126,7 +126,7 @@ bool CodeStubGraphBuilderBase::BuildGraph() {
|
| bool runtime_stack_params = descriptor_->stack_parameter_count().is_valid();
|
| HInstruction* stack_parameter_count = NULL;
|
| for (int i = 0; i < param_count; ++i) {
|
| - Representation r = descriptor_->GetRegisterParameterRepresentation(i);
|
| + Representation r = descriptor_->GetParameterRepresentation(i);
|
| HParameter* param = Add<HParameter>(i, HParameter::REGISTER_PARAMETER, r);
|
| start_environment->Bind(i, param);
|
| parameters_[i] = param;
|
| @@ -535,6 +535,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),
|
|
|