Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 038efcc4297361685009d3e7079f9a3fab4b4e77..b2bf66cb9d8902f0b929e5cfef2aa845454eda08 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -10259,12 +10259,13 @@ void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) { |
void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( |
CallRuntime* call) { |
ASSERT(call->arguments()->length() == 3); |
- CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ // We need to follow the evaluation order of full codegen. |
CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ HValue* string = Pop(); |
HValue* value = Pop(); |
HValue* index = Pop(); |
- HValue* string = Pop(); |
Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, |
index, value); |
Add<HSimulate>(call->id(), FIXED_SIMULATE); |
@@ -10275,12 +10276,13 @@ void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( |
void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( |
CallRuntime* call) { |
ASSERT(call->arguments()->length() == 3); |
- CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ // We need to follow the evaluation order of full codegen. |
CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
+ HValue* string = Pop(); |
HValue* value = Pop(); |
HValue* index = Pop(); |
- HValue* string = Pop(); |
Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string, |
index, value); |
Add<HSimulate>(call->id(), FIXED_SIMULATE); |