| Index: src/x64/lithium-x64.cc
 | 
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
 | 
| index a874a2400aa1a850eb924ceb83c0df8f02b03519..70de0b6a96ae1f0ade781776bca19eaa8382d6bd 100644
 | 
| --- a/src/x64/lithium-x64.cc
 | 
| +++ b/src/x64/lithium-x64.cc
 | 
| @@ -44,10 +44,10 @@ LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
 | 
|  #undef DEFINE_COMPILE
 | 
|  
 | 
|  LOsrEntry::LOsrEntry() {
 | 
| -  for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) {
 | 
| +  for (int i = 0; i < Register::NumAllocatableRegisters(); ++i) {
 | 
|      register_spills_[i] = NULL;
 | 
|    }
 | 
| -  for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) {
 | 
| +  for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) {
 | 
|      double_register_spills_[i] = NULL;
 | 
|    }
 | 
|  }
 | 
| @@ -598,6 +598,8 @@ LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
 | 
|  LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
 | 
|                                          HInstruction* hinstr,
 | 
|                                          CanDeoptimize can_deoptimize) {
 | 
| +  info()->MarkAsNonDeferredCalling();
 | 
| +
 | 
|  #ifdef DEBUG
 | 
|    instr->VerifyCall();
 | 
|  #endif
 | 
| @@ -1588,8 +1590,12 @@ LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) {
 | 
|  LInstruction* LChunkBuilder::DoChange(HChange* instr) {
 | 
|    Representation from = instr->from();
 | 
|    Representation to = instr->to();
 | 
| +  // Only mark conversions that might need to allocate as calling rather than
 | 
| +  // all changes. This makes simple, non-allocating conversion not have to force
 | 
| +  // building a stack frame.
 | 
|    if (from.IsTagged()) {
 | 
|      if (to.IsDouble()) {
 | 
| +      info()->MarkAsDeferredCalling();
 | 
|        LOperand* value = UseRegister(instr->value());
 | 
|        LNumberUntagD* res = new(zone()) LNumberUntagD(value);
 | 
|        return AssignEnvironment(DefineAsRegister(res));
 | 
| @@ -1607,6 +1613,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
 | 
|      }
 | 
|    } else if (from.IsDouble()) {
 | 
|      if (to.IsTagged()) {
 | 
| +      info()->MarkAsDeferredCalling();
 | 
|        LOperand* value = UseRegister(instr->value());
 | 
|        LOperand* temp = TempRegister();
 | 
|  
 | 
| @@ -1620,6 +1627,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
 | 
|        return AssignEnvironment(DefineAsRegister(new(zone()) LDoubleToI(value)));
 | 
|      }
 | 
|    } else if (from.IsInteger32()) {
 | 
| +    info()->MarkAsDeferredCalling();
 | 
|      if (to.IsTagged()) {
 | 
|        HValue* val = instr->value();
 | 
|        LOperand* value = UseRegister(val);
 | 
| @@ -2083,8 +2091,27 @@ LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
 | 
|  
 | 
|  
 | 
|  LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
 | 
| -  int spill_index = chunk()->GetParameterStackSlot(instr->index());
 | 
| -  return DefineAsSpilled(new(zone()) LParameter, spill_index);
 | 
| +  LParameter* result = new(zone()) LParameter;
 | 
| +  switch (instr->kind()) {
 | 
| +    case FUNCTION_PARAMETER: {
 | 
| +      int spill_index = chunk()->GetParameterStackSlot(instr->index());
 | 
| +      return DefineAsSpilled(result, spill_index);
 | 
| +    }
 | 
| +    case KEYED_LOAD_IC_PARAMETER: {
 | 
| +      if (instr->index() == 0) return DefineFixed(result, rdx);
 | 
| +      if (instr->index() == 1) return DefineFixed(result, rax);
 | 
| +      UNREACHABLE();
 | 
| +      break;
 | 
| +    }
 | 
| +    case KEYED_STORE_IC_PARAMETER:
 | 
| +      if (instr->index() == 0) return DefineFixed(result, rdx);
 | 
| +      if (instr->index() == 1) return DefineFixed(result, rcx);
 | 
| +      if (instr->index() == 2) return DefineFixed(result, rax);
 | 
| +      break;
 | 
| +    default:
 | 
| +      UNREACHABLE();
 | 
| +  }
 | 
| +  return NULL;
 | 
|  }
 | 
|  
 | 
|  
 | 
| @@ -2180,6 +2207,7 @@ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
 | 
|  
 | 
|  
 | 
|  LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
 | 
| +  info()->MarkAsDeferredCalling();
 | 
|    if (instr->is_function_entry()) {
 | 
|      return MarkAsCall(new(zone()) LStackCheck, instr);
 | 
|    } else {
 | 
| 
 |