Revision: 7018
Author: [email protected]
Date: Wed Mar 2 03:45:31 2011
Log: Generalize fix for overflowing of the frame-element constant pool.
BUG=74627
Review URL: http://codereview.chromium.org/6588116
http://code.google.com/p/v8/source/detail?r=7018
Modified:
/branches/bleeding_edge/src/ia32/virtual-frame-ia32.cc
/branches/bleeding_edge/src/ia32/virtual-frame-ia32.h
/branches/bleeding_edge/src/virtual-frame-heavy-inl.h
/branches/bleeding_edge/src/x64/codegen-x64.cc
/branches/bleeding_edge/src/x64/virtual-frame-x64.cc
/branches/bleeding_edge/src/x64/virtual-frame-x64.h
=======================================
--- /branches/bleeding_edge/src/ia32/virtual-frame-ia32.cc Tue Mar 1
20:53:43 2011
+++ /branches/bleeding_edge/src/ia32/virtual-frame-ia32.cc Wed Mar 2
03:45:31 2011
@@ -1337,6 +1337,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/bleeding_edge/src/ia32/virtual-frame-ia32.h Tue Mar 1
20:53:43 2011
+++ /branches/bleeding_edge/src/ia32/virtual-frame-ia32.h Wed Mar 2
03:45:31 2011
@@ -422,8 +422,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/bleeding_edge/src/virtual-frame-heavy-inl.h Mon Feb 28
04:09:53 2011
+++ /branches/bleeding_edge/src/virtual-frame-heavy-inl.h Wed Mar 2
03:45:31 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/bleeding_edge/src/x64/codegen-x64.cc Tue Mar 1 20:53:43 2011
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc Wed Mar 2 03:45:31 2011
@@ -4696,18 +4696,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/bleeding_edge/src/x64/virtual-frame-x64.cc Tue Mar 1
20:53:43 2011
+++ /branches/bleeding_edge/src/x64/virtual-frame-x64.cc Wed Mar 2
03:45:31 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/bleeding_edge/src/x64/virtual-frame-x64.h Tue Mar 1 20:53:43
2011
+++ /branches/bleeding_edge/src/x64/virtual-frame-x64.h Wed Mar 2 03:45:31
2011
@@ -403,8 +403,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