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 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ad2c227e01
commit
bfb3e6ce9c
@ -989,12 +989,14 @@ LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
||||
|
||||
|
||||
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::DoArgumentsObject(HArgumentsObject* instr) {
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
||||
info()->MarkAsRequiresFrame();
|
||||
LOperand* args = UseRegister(instr->arguments());
|
||||
LOperand* length = UseTempRegister(instr->length());
|
||||
LOperand* index = UseRegister(instr->index());
|
||||
|
@ -83,7 +83,8 @@ class LCodeGen BASE_EMBEDDED {
|
||||
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();
|
||||
|
@ -143,6 +143,14 @@ class CompilationInfo {
|
||||
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 CompilationInfo {
|
||||
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_;
|
||||
|
||||
|
@ -87,7 +87,8 @@ class LCodeGen BASE_EMBEDDED {
|
||||
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();
|
||||
|
@ -1056,11 +1056,13 @@ LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
||||
|
||||
|
||||
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::DoArgumentsObject(HArgumentsObject* instr) {
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
||||
info()->MarkAsRequiresFrame();
|
||||
LOperand* args = UseRegister(instr->arguments());
|
||||
LOperand* length = UseTempRegister(instr->length());
|
||||
LOperand* index = Use(instr->index());
|
||||
|
@ -83,7 +83,8 @@ class LCodeGen BASE_EMBEDDED {
|
||||
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();
|
||||
|
@ -997,11 +997,13 @@ LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
||||
|
||||
|
||||
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::DoArgumentsObject(HArgumentsObject* instr) {
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
||||
info()->MarkAsRequiresFrame();
|
||||
LOperand* args = UseRegister(instr->arguments());
|
||||
LOperand* length = UseTempRegister(instr->length());
|
||||
LOperand* index = Use(instr->index());
|
||||
|
Loading…
Reference in New Issue
Block a user