Revision: 7019 Author: [email protected] Date: Wed Mar 2 04:02:18 2011 Log: Merge revision 7018 from bleeding_edge to 3.0 branch to fix overflow of constant pools in classic codegen.
Review URL: http://codereview.chromium.org/6592098 http://code.google.com/p/v8/source/detail?r=7019 Modified: /branches/3.0/src/ia32/virtual-frame-ia32.cc /branches/3.0/src/ia32/virtual-frame-ia32.h /branches/3.0/src/version.cc /branches/3.0/src/virtual-frame-heavy-inl.h /branches/3.0/src/x64/codegen-x64.cc /branches/3.0/src/x64/virtual-frame-x64.cc /branches/3.0/src/x64/virtual-frame-x64.h ======================================= --- /branches/3.0/src/ia32/virtual-frame-ia32.cc Mon Feb 28 04:32:02 2011 +++ /branches/3.0/src/ia32/virtual-frame-ia32.cc Wed Mar 2 04:02:18 2011 @@ -1327,6 +1327,20 @@ } UNREACHABLE(); } + + +void VirtualFrame::Push(Handle<Object> value) { + if (ConstantPoolOverflowed()) { + Result temp = cgen()->allocator()->Allocate(); + ASSERT(temp.is_valid()); + __ Set(temp.reg(), Immediate(value)); + Push(&temp); + } else { + FrameElement element = + FrameElement::ConstantElement(value, FrameElement::NOT_SYNCED); + elements_.Add(element); + } +} #undef __ ======================================= --- /branches/3.0/src/ia32/virtual-frame-ia32.h Mon Feb 28 04:32:02 2011 +++ /branches/3.0/src/ia32/virtual-frame-ia32.h Wed Mar 2 04:02:18 2011 @@ -421,8 +421,8 @@ inline bool ConstantPoolOverflowed(); // Push an element on the virtual frame. + void Push(Handle<Object> value); inline void Push(Register reg, TypeInfo info = TypeInfo::Unknown()); - inline void Push(Handle<Object> value); inline void Push(Smi* value); void PushUntaggedElement(Handle<Object> value); ======================================= --- /branches/3.0/src/version.cc Tue Mar 1 05:13:40 2011 +++ /branches/3.0/src/version.cc Wed Mar 2 04:02:18 2011 @@ -35,7 +35,7 @@ #define MAJOR_VERSION 3 #define MINOR_VERSION 0 #define BUILD_NUMBER 12 -#define PATCH_LEVEL 29 +#define PATCH_LEVEL 30 #define CANDIDATE_VERSION false // Define SONAME to have the SCons build the put a specific SONAME into the ======================================= --- /branches/3.0/src/virtual-frame-heavy-inl.h Mon Feb 28 04:32:02 2011 +++ /branches/3.0/src/virtual-frame-heavy-inl.h Wed Mar 2 04:02:18 2011 @@ -85,14 +85,6 @@ bool VirtualFrame::ConstantPoolOverflowed() { return FrameElement::ConstantPoolOverflowed(); } - - -void VirtualFrame::Push(Handle<Object> value) { - ASSERT(!ConstantPoolOverflowed()); - FrameElement element = - FrameElement::ConstantElement(value, FrameElement::NOT_SYNCED); - elements_.Add(element); -} bool VirtualFrame::Equals(VirtualFrame* other) { ======================================= --- /branches/3.0/src/x64/codegen-x64.cc Mon Feb 28 04:32:02 2011 +++ /branches/3.0/src/x64/codegen-x64.cc Wed Mar 2 04:02:18 2011 @@ -4694,18 +4694,7 @@ void CodeGenerator::VisitLiteral(Literal* node) { Comment cmnt(masm_, "[ Literal"); - if (frame_->ConstantPoolOverflowed()) { - Result temp = allocator_->Allocate(); - ASSERT(temp.is_valid()); - if (node->handle()->IsSmi()) { - __ Move(temp.reg(), Smi::cast(*node->handle())); - } else { - __ movq(temp.reg(), node->handle(), RelocInfo::EMBEDDED_OBJECT); - } - frame_->Push(&temp); - } else { - frame_->Push(node->handle()); - } + frame_->Push(node->handle()); } ======================================= --- /branches/3.0/src/x64/virtual-frame-x64.cc Thu Nov 18 04:04:40 2010 +++ /branches/3.0/src/x64/virtual-frame-x64.cc Wed Mar 2 04:02:18 2011 @@ -272,6 +272,24 @@ } UNREACHABLE(); } + + +void VirtualFrame::Push(Handle<Object> value) { + if (ConstantPoolOverflowed()) { + Result temp = cgen()->allocator()->Allocate(); + ASSERT(temp.is_valid()); + if (value->IsSmi()) { + __ Move(temp.reg(), Smi::cast(*value)); + } else { + __ movq(temp.reg(), value, RelocInfo::EMBEDDED_OBJECT); + } + Push(&temp); + } else { + FrameElement element = + FrameElement::ConstantElement(value, FrameElement::NOT_SYNCED); + elements_.Add(element); + } +} void VirtualFrame::Drop(int count) { ======================================= --- /branches/3.0/src/x64/virtual-frame-x64.h Mon Feb 28 04:32:02 2011 +++ /branches/3.0/src/x64/virtual-frame-x64.h Wed Mar 2 04:02:18 2011 @@ -402,8 +402,8 @@ inline bool ConstantPoolOverflowed(); // Push an element on the virtual frame. + void Push(Handle<Object> value); inline void Push(Register reg, TypeInfo info = TypeInfo::Unknown()); - inline void Push(Handle<Object> value); inline void Push(Smi* value); // Pushing a result invalidates it (its contents become owned by the -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
