Reviewers: Kevin Millikin, Message: A tiny change for you
Description: Initialize list of frame elements to proper size. Please review this at http://codereview.chromium.org/57006 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/virtual-frame-ia32.h M src/virtual-frame-ia32.cc Index: src/virtual-frame-ia32.h =================================================================== --- src/virtual-frame-ia32.h (revision 1637) +++ src/virtual-frame-ia32.h (working copy) @@ -340,6 +340,7 @@ static const int kContextOffset = StandardFrameConstants::kContextOffset; static const int kHandlerSize = StackHandlerConstants::kSize / kPointerSize; + static const int kPreallocatedElements = 5 + 8; // 8 expression stack slots. CodeGenerator* cgen_; MacroAssembler* masm_; Index: src/virtual-frame-ia32.cc =================================================================== --- src/virtual-frame-ia32.cc (revision 1637) +++ src/virtual-frame-ia32.cc (working copy) @@ -1,4 +1,4 @@ -// Copyright 2008 the V8 project authors. All rights reserved. +// Copyright 2009 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -43,7 +43,9 @@ VirtualFrame::VirtualFrame(CodeGenerator* cgen) : cgen_(cgen), masm_(cgen->masm()), - elements_(0), + elements_(cgen->scope()->num_parameters() + + cgen->scope()->num_stack_slots() + + kPreallocatedElements), parameter_count_(cgen->scope()->num_parameters()), local_count_(0), stack_pointer_(parameter_count_ + 1), // 0-based index of TOS. --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
