| Index: src/arm/deoptimizer-arm.cc | 
| diff --git a/src/arm/deoptimizer-arm.cc b/src/arm/deoptimizer-arm.cc | 
| index a263cb7f85edd62388e9d3b8eeef27f1692d06ea..ae7d99c4a243248687851188eb8a4ed50ccf431f 100644 | 
| --- a/src/arm/deoptimizer-arm.cc | 
| +++ b/src/arm/deoptimizer-arm.cc | 
| @@ -458,35 +458,39 @@ void Deoptimizer::DoCompiledStubFrame(TranslationIterator* iterator, | 
| //               FROM                                  TO             <-fp | 
| //    |          ....           |          |          ....           | | 
| //    +-------------------------+          +-------------------------+ | 
| -  //    | JSFunction continuation |          | JSFunction continuation | | 
| +  //    | JSFunction continuation |          |       parameter 1       | | 
| +  //    +-------------------------+          +-------------------------+ | 
| +  // |  |   saved frame (fp)      |          |          ....           | | 
| +  // |  +=========================+<-fp      +-------------------------+ | 
| +  // |  |   JSFunction context    |          |       parameter n       | | 
| +  // v  +-------------------------+          +-------------------------| | 
| +  //    |   COMPILED_STUB marker  |          | JSFunction continuation | | 
| //    +-------------------------+          +-------------------------+<-sp | 
| -  // |  |   saved frame (fp)      | | 
| -  // |  +=========================+<-fp | 
| -  // |  |   JSFunction context    | | 
| -  // v  +-------------------------+ | 
| -  //    |   COMPILED_STUB marker  |          fp = saved frame | 
| -  //    +-------------------------+          f8 = JSFunction context | 
| -  //    |                         | | 
| -  //    | ...                     | | 
| -  //    |                         | | 
| -  //    +-------------------------+<-sp | 
| +  //    |                         |          r0 = number of parameters | 
| +  //    | ...                     |          r1 = failure handler address | 
| +  //    |                         |          fp = saved frame | 
| +  //    +-------------------------+<-sp      cp = JSFunction context | 
| // | 
| // | 
| -  int output_frame_size = 1 * kPointerSize; | 
| -  FrameDescription* output_frame = | 
| -      new(output_frame_size) FrameDescription(output_frame_size, 0); | 
| -  Code* notify_miss = | 
| -      isolate_->builtins()->builtin(Builtins::kNotifyICMiss); | 
| -  output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); | 
| -  output_frame->SetContinuation( | 
| -      reinterpret_cast<intptr_t>(notify_miss->entry())); | 
|  | 
| ASSERT(compiled_code_->kind() == Code::COMPILED_STUB); | 
| int major_key = compiled_code_->major_key(); | 
| CodeStubInterfaceDescriptor* descriptor = | 
| isolate_->code_stub_interface_descriptor(major_key); | 
| -  Handle<Code> miss_ic(descriptor->deoptimization_handler_); | 
| -  output_frame->SetPc(reinterpret_cast<intptr_t>(miss_ic->instruction_start())); | 
| + | 
| +  int output_frame_size = | 
| +      (1 + descriptor->register_param_count_) * kPointerSize; | 
| +  FrameDescription* output_frame = | 
| +      new(output_frame_size) FrameDescription(output_frame_size, 0); | 
| +  Code* notify_failure = | 
| +      isolate_->builtins()->builtin(Builtins::kNotifyStubFailure); | 
| +  output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); | 
| +  output_frame->SetContinuation( | 
| +      reinterpret_cast<uint32_t>(notify_failure->entry())); | 
| + | 
| +  Code* code; | 
| +  CEntryStub(1, kSaveFPRegs).FindCodeInCache(&code, isolate_); | 
| +  output_frame->SetPc(reinterpret_cast<intptr_t>(code->instruction_start())); | 
| unsigned input_frame_size = input_->GetFrameSize(); | 
| intptr_t value = input_->GetFrameSlot(input_frame_size - kPointerSize); | 
| output_frame->SetFrameSlot(0, value); | 
| @@ -496,20 +500,23 @@ void Deoptimizer::DoCompiledStubFrame(TranslationIterator* iterator, | 
| value = input_->GetFrameSlot(input_frame_size - 3 * kPointerSize); | 
| output_frame->SetRegister(cp.code(), value); | 
|  | 
| -  Translation::Opcode opcode = | 
| -      static_cast<Translation::Opcode>(iterator->Next()); | 
| -  ASSERT(opcode == Translation::REGISTER); | 
| -  USE(opcode); | 
| -  int input_reg = iterator->Next(); | 
| -  intptr_t input_value = input_->GetRegister(input_reg); | 
| -  output_frame->SetRegister(r1.code(), input_value); | 
| - | 
| -  int32_t next = iterator->Next(); | 
| -  opcode = static_cast<Translation::Opcode>(next); | 
| -  ASSERT(opcode == Translation::REGISTER); | 
| -  input_reg = iterator->Next(); | 
| -  input_value = input_->GetRegister(input_reg); | 
| -  output_frame->SetRegister(r0.code(), input_value); | 
| +  int parameter_offset = kPointerSize * descriptor->register_param_count_; | 
| +  for (int i = 0; i < descriptor->register_param_count_; ++i) { | 
| +    Translation::Opcode opcode = | 
| +        static_cast<Translation::Opcode>(iterator->Next()); | 
| +    ASSERT(opcode == Translation::REGISTER); | 
| +    USE(opcode); | 
| +    int input_reg = iterator->Next(); | 
| +    intptr_t reg_value = input_->GetRegister(input_reg); | 
| +    output_frame->SetFrameSlot(parameter_offset, reg_value); | 
| +    parameter_offset -= kPointerSize; | 
| +  } | 
| + | 
| +  ApiFunction function(descriptor->deoptimization_handler_); | 
| +  ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_); | 
| +  intptr_t handler = reinterpret_cast<intptr_t>(xref.address()); | 
| +  output_frame->SetRegister(r0.code(), descriptor->register_param_count_); | 
| +  output_frame->SetRegister(r1.code(), handler); | 
|  | 
| ASSERT(frame_index == 0); | 
| output_[frame_index] = output_frame; | 
|  |