Reviewers: Mads Ager,
Description:
Merge r6964 from the bleeding_edge to the 3.0 branch.
Please review this at http://codereview.chromium.org/6598036/
SVN Base: http://v8.googlecode.com/svn/branches/3.0/
Affected files:
M src/frame-element.h
M src/ia32/codegen-ia32.cc
M src/ia32/virtual-frame-ia32.h
M src/ia32/virtual-frame-ia32.cc
M src/version.cc
M src/virtual-frame-heavy-inl.h
M src/x64/codegen-x64.cc
M src/x64/virtual-frame-x64.h
Index: src/frame-element.h
===================================================================
--- src/frame-element.h (revision 6954)
+++ src/frame-element.h (working copy)
@@ -113,6 +113,10 @@
static ZoneObjectList* ConstantList();
+ static bool ConstantPoolOverflowed() {
+ return !DataField::is_valid(ConstantList()->length());
+ }
+
// Clear the constants indirection table.
static void ClearConstantList() {
ConstantList()->Clear();
Index: src/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 6954)
+++ src/ia32/codegen-ia32.cc (working copy)
@@ -5360,10 +5360,20 @@
void CodeGenerator::VisitLiteral(Literal* node) {
Comment cmnt(masm_, "[ Literal");
- if (in_safe_int32_mode()) {
- frame_->PushUntaggedElement(node->handle());
+ if (frame_->ConstantPoolOverflowed()) {
+ Result temp = allocator_->Allocate();
+ ASSERT(temp.is_valid());
+ if (in_safe_int32_mode()) {
+ temp.set_untagged_int32(true);
+ }
+ __ Set(temp.reg(), Immediate(node->handle()));
+ frame_->Push(&temp);
} else {
- frame_->Push(node->handle());
+ if (in_safe_int32_mode()) {
+ frame_->PushUntaggedElement(node->handle());
+ } else {
+ frame_->Push(node->handle());
+ }
}
}
Index: src/ia32/virtual-frame-ia32.cc
===================================================================
--- src/ia32/virtual-frame-ia32.cc (revision 6954)
+++ src/ia32/virtual-frame-ia32.cc (working copy)
@@ -1298,6 +1298,7 @@
void VirtualFrame::PushUntaggedElement(Handle<Object> value) {
+ ASSERT(!ConstantPoolOverflowed());
elements_.Add(FrameElement::ConstantElement(value,
FrameElement::NOT_SYNCED));
elements_[element_count() - 1].set_untagged_int32(true);
}
Index: src/ia32/virtual-frame-ia32.h
===================================================================
--- src/ia32/virtual-frame-ia32.h (revision 6954)
+++ src/ia32/virtual-frame-ia32.h (working copy)
@@ -418,6 +418,8 @@
void EmitPush(Immediate immediate,
TypeInfo info = TypeInfo::Unknown());
+ inline bool ConstantPoolOverflowed();
+
// Push an element on the virtual frame.
inline void Push(Register reg, TypeInfo info = TypeInfo::Unknown());
inline void Push(Handle<Object> value);
Index: src/version.cc
===================================================================
--- src/version.cc (revision 6959)
+++ src/version.cc (working copy)
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 0
#define BUILD_NUMBER 12
-#define PATCH_LEVEL 26
+#define PATCH_LEVEL 27
#define CANDIDATE_VERSION false
// Define SONAME to have the SCons build the put a specific SONAME into the
Index: src/virtual-frame-heavy-inl.h
===================================================================
--- src/virtual-frame-heavy-inl.h (revision 6954)
+++ src/virtual-frame-heavy-inl.h (working copy)
@@ -82,7 +82,13 @@
}
+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);
Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc (revision 6954)
+++ src/x64/codegen-x64.cc (working copy)
@@ -4694,7 +4694,18 @@
void CodeGenerator::VisitLiteral(Literal* node) {
Comment cmnt(masm_, "[ Literal");
- frame_->Push(node->handle());
+ 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());
+ }
}
Index: src/x64/virtual-frame-x64.h
===================================================================
--- src/x64/virtual-frame-x64.h (revision 6954)
+++ src/x64/virtual-frame-x64.h (working copy)
@@ -399,6 +399,8 @@
// Uses kScratchRegister, emits appropriate relocation info.
void EmitPush(Handle<Object> value);
+ inline bool ConstantPoolOverflowed();
+
// Push an element on the virtual frame.
inline void Push(Register reg, TypeInfo info = TypeInfo::Unknown());
inline void Push(Handle<Object> value);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev