Index: runtime/vm/intermediate_language_dbc.cc |
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc |
index ec13a8339869a875de4b355bfe2cd7fdfb11c64e..5f986cb9104f38910a82ebce6ecc2ecd72a0d994 100644 |
--- a/runtime/vm/intermediate_language_dbc.cc |
+++ b/runtime/vm/intermediate_language_dbc.cc |
@@ -418,9 +418,13 @@ EMIT_NATIVE_CODE(LoadStaticField, 1, Location::RequiresRegister()) { |
} |
-EMIT_NATIVE_CODE(InitStaticField, 0) { |
- ASSERT(!compiler->is_optimizing()); |
- __ InitStaticTOS(); |
+EMIT_NATIVE_CODE(InitStaticField, 1) { |
+ if (compiler->is_optimizing()) { |
+ __ Push(locs()->in(0).reg()); |
+ __ InitStaticTOS(); |
Vyacheslav Egorov (Google)
2016/11/09 09:28:28
This looks like a call. Does this need compiler->R
Florian Schneider
2016/11/09 13:51:52
Actually yes, good point. It could throw, or cause
Vyacheslav Egorov (Google)
2016/11/09 13:55:11
I think it should work.
Maybe write a test?
|
+ } else { |
+ __ InitStaticTOS(); |
+ } |
} |