Commit fc41b41f authored by whesse@chromium.org's avatar whesse@chromium.org

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
parent aaf56622
......@@ -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.
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment