From: whesse@chromium.org Date: Thu, 6 May 2010 11:59:10 +0000 (+0000) Subject: Allocate the right number of fast context slots on X64 and ARM. Port from ia32. X-Git-Tag: upstream/4.7.83~21856 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc41b41fc253f5b86da1e546f897c9be0d950272;p=platform%2Fupstream%2Fv8.git Allocate the right number of fast context slots on X64 and ARM. Port from ia32. This is ported from change 3505 on ia32. Review URL: http://codereview.chromium.org/1992003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc index efb22d5..6667734 100644 --- a/src/arm/codegen-arm.cc +++ b/src/arm/codegen-arm.cc @@ -191,7 +191,7 @@ void CodeGenerator::Generate(CompilationInfo* info) { frame_->AllocateStackSlots(); VirtualFrame::SpilledScope spilled_scope(frame_); - int heap_slots = scope()->num_heap_slots(); + int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; if (heap_slots > 0) { // Allocate local context. // Get outer context and create a new context based on it. diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index 5b6f878..0fdef25 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -360,7 +360,7 @@ void CodeGenerator::Generate(CompilationInfo* info) { frame_->AllocateStackSlots(); // Allocate the local context if needed. - int heap_slots = scope()->num_heap_slots(); + int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; if (heap_slots > 0) { Comment cmnt(masm_, "[ allocate local context"); // Allocate local context.