Chromium Code Reviews| Index: runtime/vm/intermediate_language_ia32.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language_ia32.cc (revision 39260) |
| +++ runtime/vm/intermediate_language_ia32.cc (working copy) |
| @@ -2455,6 +2455,49 @@ |
| } |
| +LocationSummary* InitStaticFieldInstr::MakeLocationSummary(Isolate* isolate, |
|
Florian Schneider
2014/08/15 09:56:35
I don't think we need a new instruction (and AST n
hausner
2014/08/15 23:00:46
On 2014/08/15 09:56:35, Florian Schneider wrote:
|
| + bool opt) const { |
| + const intptr_t kNumInputs = 1; |
| + const intptr_t kNumTemps = 1; |
| + LocationSummary* locs = new(isolate) LocationSummary( |
| + isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
| + locs->set_in(0, Location::RegisterLocation(EAX)); |
| + locs->set_out(0, Location::RegisterLocation(EAX)); |
| + locs->set_temp(0, Location::RegisterLocation(ECX)); |
| + return locs; |
| +} |
| + |
| + |
| +void InitStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| + Register field = locs()->in(0).reg(); |
| + Register result = locs()->out(0).reg(); |
| + Register temp = locs()->temp(0).reg(); |
| + |
| + Label call_runtime, no_call; |
| + |
| + __ movl(temp, FieldAddress(field, Field::value_offset())); |
| + __ CompareObject(temp, Object::sentinel()); |
| + __ j(EQUAL, &call_runtime); |
| + |
| + __ CompareObject(temp, Object::transition_sentinel()); |
| + __ j(NOT_EQUAL, &no_call); |
| + |
| + __ Bind(&call_runtime); |
| + __ PushObject(Object::null_object()); // Make room for (unused) result. |
| + __ pushl(field); |
| + compiler->GenerateRuntimeCall(token_pos(), |
| + deopt_id(), |
| + kInitStaticFieldRuntimeEntry, |
| + 1, |
| + locs()); |
| + __ popl(result); // Remove argument. |
| + __ popl(result); // Remove result. |
| + |
| + __ Bind(&no_call); |
| +} |
| + |
| + |
| + |
| LocationSummary* CloneContextInstr::MakeLocationSummary(Isolate* isolate, |
| bool opt) const { |
| const intptr_t kNumInputs = 1; |
| @@ -2807,7 +2850,7 @@ |
| ASSERT(left == result); |
| Label* deopt = NULL; |
| if (CanDeoptimize()) { |
| - deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinarySmiOp); |
| + deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinarySmiOp); |
| } |
| if (locs()->in(1).IsConstant()) { |