Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 6243004: Add GenerateSafePointTable, CallCode and EmitGoto to lithium codegen on x64... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+ }
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698