Reviewers: Jakob,
Description:
Fix failure in unit tests
R=jkumme...@chromium.org
Please review this at https://codereview.chromium.org/25665006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+12, -8 lines):
M src/hydrogen-instructions.h
M src/hydrogen.cc
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index
45f414dc01350bd678da01dca3173dfd490f59b3..c564872da622fb91dcd429336d5bd2d23fde0713
100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1932,17 +1932,23 @@ class HEnterInlined V8_FINAL : public
HTemplateInstruction<0> {
class HLeaveInlined V8_FINAL : public HTemplateInstruction<0> {
public:
- explicit HLeaveInlined(int drop_count) : drop_count_(drop_count) { }
+ HLeaveInlined(HEnterInlined* entry,
+ int drop_count)
+ : entry_(entry),
+ drop_count_(drop_count) { }
virtual Representation RequiredInputRepresentation(int index)
V8_OVERRIDE {
return Representation::None();
}
- virtual int argument_delta() const V8_OVERRIDE { return -drop_count_; }
+ virtual int argument_delta() const V8_OVERRIDE {
+ return entry_->arguments_pushed() ? -drop_count_ : 0;
+ }
DECLARE_CONCRETE_INSTRUCTION(LeaveInlined)
private:
+ HEnterInlined* entry_;
int drop_count_;
};
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
74e32d2361567a755720c03dcb36a5b4d547af4f..ba981718d73cef59f3325a18cde7e0b4f9aa13e4
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -217,9 +217,8 @@ void HBasicBlock::Goto(HBasicBlock* block,
if (block->IsInlineReturnTarget()) {
HEnvironment* env = last_environment();
- int argument_count = state->entry()->arguments_pushed()
- ? env->arguments_environment()->parameter_count() : 0;
- AddInstruction(new(zone()) HLeaveInlined(argument_count));
+ int argument_count = env->arguments_environment()->parameter_count();
+ AddInstruction(new(zone()) HLeaveInlined(state->entry(),
argument_count));
UpdateEnvironment(last_environment()->DiscardInlined(drop_extra));
}
@@ -237,9 +236,8 @@ void HBasicBlock::AddLeaveInlined(HValue* return_value,
ASSERT(target->IsInlineReturnTarget());
ASSERT(return_value != NULL);
HEnvironment* env = last_environment();
- int argument_count = state->entry()->arguments_pushed()
- ? env->arguments_environment()->parameter_count() : 0;
- AddInstruction(new(zone()) HLeaveInlined(argument_count));
+ int argument_count = env->arguments_environment()->parameter_count();
+ AddInstruction(new(zone()) HLeaveInlined(state->entry(),
argument_count));
UpdateEnvironment(last_environment()->DiscardInlined(drop_extra));
last_environment()->Push(return_value);
AddNewSimulate(BailoutId::None());
--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.