Revision: 14339
Author: [email protected]
Date: Thu Apr 18 08:44:38 2013
Log: HArgument instructions currently require a frame. In Lithium we
can ensure a frame
is created for these instructions via a compile info flag.
BUG=
Review URL: https://codereview.chromium.org/14354003
http://code.google.com/p/v8/source/detail?r=14339
Modified:
/branches/bleeding_edge/src/arm/lithium-arm.cc
/branches/bleeding_edge/src/arm/lithium-codegen-arm.h
/branches/bleeding_edge/src/compiler.h
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.h
/branches/bleeding_edge/src/ia32/lithium-ia32.cc
/branches/bleeding_edge/src/x64/lithium-codegen-x64.h
/branches/bleeding_edge/src/x64/lithium-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.cc Thu Apr 18 03:51:24 2013
+++ /branches/bleeding_edge/src/arm/lithium-arm.cc Thu Apr 18 08:44:38 2013
@@ -989,12 +989,14 @@
LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* instr) {
+ info()->MarkAsRequiresFrame();
LOperand* value = UseRegister(instr->value());
return DefineAsRegister(new(zone()) LArgumentsLength(value));
}
LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements*
elems) {
+ info()->MarkAsRequiresFrame();
return DefineAsRegister(new(zone()) LArgumentsElements);
}
@@ -2456,6 +2458,7 @@
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt*
instr) {
+ info()->MarkAsRequiresFrame();
LOperand* args = UseRegister(instr->arguments());
LOperand* length = UseTempRegister(instr->length());
LOperand* index = UseRegister(instr->index());
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.h Thu Apr 18
06:45:19 2013
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.h Thu Apr 18
08:44:38 2013
@@ -83,7 +83,8 @@
bool NeedsEagerFrame() const {
return GetStackSlotCount() > 0 ||
info()->is_non_deferred_calling() ||
- !info()->IsStub();
+ !info()->IsStub() ||
+ info()->requires_frame();
}
bool NeedsDeferredFrame() const {
return !NeedsEagerFrame() && info()->is_deferred_calling();
=======================================
--- /branches/bleeding_edge/src/compiler.h Thu Apr 18 02:50:46 2013
+++ /branches/bleeding_edge/src/compiler.h Thu Apr 18 08:44:38 2013
@@ -142,6 +142,14 @@
bool saves_caller_doubles() const {
return SavesCallerDoubles::decode(flags_);
}
+
+ void MarkAsRequiresFrame() {
+ flags_ |= RequiresFrame::encode(true);
+ }
+
+ bool requires_frame() const {
+ return RequiresFrame::decode(flags_);
+ }
void SetParseRestriction(ParseRestriction restriction) {
flags_ = ParseRestricitonField::update(flags_, restriction);
@@ -300,6 +308,8 @@
class SavesCallerDoubles: public BitField<bool, 12, 1> {};
// If the set of valid statements is restricted.
class ParseRestricitonField: public BitField<ParseRestriction, 13, 1> {};
+ // If the function requires a frame (for unspecified reasons)
+ class RequiresFrame: public BitField<bool, 14, 1> {};
unsigned flags_;
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.h Thu Apr 18
06:45:19 2013
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.h Thu Apr 18
08:44:38 2013
@@ -87,7 +87,8 @@
bool NeedsEagerFrame() const {
return GetStackSlotCount() > 0 ||
info()->is_non_deferred_calling() ||
- !info()->IsStub();
+ !info()->IsStub() ||
+ info()->requires_frame();
}
bool NeedsDeferredFrame() const {
return !NeedsEagerFrame() && info()->is_deferred_calling();
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Thu Apr 18 03:51:24
2013
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Thu Apr 18 08:44:38
2013
@@ -1056,11 +1056,13 @@
LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) {
+ info()->MarkAsRequiresFrame();
return DefineAsRegister(new(zone())
LArgumentsLength(Use(length->value())));
}
LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements*
elems) {
+ info()->MarkAsRequiresFrame();
return DefineAsRegister(new(zone()) LArgumentsElements);
}
@@ -2575,6 +2577,7 @@
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt*
instr) {
+ info()->MarkAsRequiresFrame();
LOperand* args = UseRegister(instr->arguments());
LOperand* length = UseTempRegister(instr->length());
LOperand* index = Use(instr->index());
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.h Thu Apr 18
06:45:19 2013
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.h Thu Apr 18
08:44:38 2013
@@ -83,7 +83,8 @@
bool NeedsEagerFrame() const {
return GetStackSlotCount() > 0 ||
info()->is_non_deferred_calling() ||
- !info()->IsStub();
+ !info()->IsStub() ||
+ info()->requires_frame();
}
bool NeedsDeferredFrame() const {
return !NeedsEagerFrame() && info()->is_deferred_calling();
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Thu Apr 18 03:51:24 2013
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Thu Apr 18 08:44:38 2013
@@ -997,11 +997,13 @@
LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) {
+ info()->MarkAsRequiresFrame();
return DefineAsRegister(new(zone())
LArgumentsLength(Use(length->value())));
}
LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements*
elems) {
+ info()->MarkAsRequiresFrame();
return DefineAsRegister(new(zone()) LArgumentsElements);
}
@@ -2378,6 +2380,7 @@
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt*
instr) {
+ info()->MarkAsRequiresFrame();
LOperand* args = UseRegister(instr->arguments());
LOperand* length = UseTempRegister(instr->length());
LOperand* index = Use(instr->index());
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.