Chromium Code Reviews| Index: src/x64/lithium-codegen-x64.cc |
| =================================================================== |
| --- src/x64/lithium-codegen-x64.cc (revision 6340) |
| +++ src/x64/lithium-codegen-x64.cc (working copy) |
| @@ -338,8 +338,9 @@ |
| bool LCodeGen::GenerateSafepointTable() { |
| - Abort("Unimplemented: %s", "GeneratePrologue"); |
| - return false; |
| + ASSERT(is_done()); |
| + safepoints_.Emit(masm(), StackSlotCount()); |
| + return !is_aborted(); |
| } |
| @@ -492,7 +493,24 @@ |
| void LCodeGen::CallCode(Handle<Code> code, |
| RelocInfo::Mode mode, |
| LInstruction* instr) { |
| - Abort("Unimplemented: %s", "CallCode"); |
| + if (instr != NULL) { |
| + LPointerMap* pointers = instr->pointer_map(); |
| + RecordPosition(pointers->position()); |
| + __ call(code, mode); |
| + RegisterLazyDeoptimization(instr); |
| + } else { |
| + LPointerMap no_pointers(0); |
| + RecordPosition(no_pointers.position()); |
| + __ call(code, mode); |
| + RecordSafepoint(&no_pointers, Safepoint::kNoDeoptimizationIndex); |
| + } |
| + |
| + // Signal that we don't inline smi code before these stubs in the |
| + // optimizing code generator. |
| + if (code->kind() == Code::TYPE_RECORDING_BINARY_OP_IC || |
| + code->kind() == Code::COMPARE_IC) { |
| + __ nop(); |
| + } |
| } |
| @@ -521,6 +539,7 @@ |
| void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment) { |
| + return; |
|
Rico
2011/01/17 09:36:02
The return here is intentional to get the method c
Lasse Reichstein
2011/01/17 09:38:56
Put this explanation in a comment and remove the A
Rico
2011/01/17 09:47:50
Changed to a comment and todo added
|
| Abort("Unimplemented: %s", "RegisterEnvironmentForDeoptimization"); |
| } |
| @@ -859,7 +878,19 @@ |
| void LCodeGen::EmitGoto(int block, LDeferredCode* deferred_stack_check) { |
| - Abort("Unimplemented: %s", "EmitGoto"); |
| + block = chunk_->LookupDestination(block); |
| + int next_block = GetNextEmittedBlock(current_block_); |
| + if (block != next_block) { |
| + // Perform stack overflow check if this goto needs it before jumping. |
| + if (deferred_stack_check != NULL) { |
| + __ CompareRoot(rsp, Heap::kStackLimitRootIndex); |
| + __ j(above_equal, chunk_->GetAssemblyLabel(block)); |
| + __ jmp(deferred_stack_check->entry()); |
| + deferred_stack_check->SetExit(chunk_->GetAssemblyLabel(block)); |
| + } else { |
| + __ jmp(chunk_->GetAssemblyLabel(block)); |
| + } |
| + } |
| } |