Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2625 __ LoadImmediate(R1, num_context_variables()); | 2625 __ LoadImmediate(R1, num_context_variables()); |
| 2626 StubCode* stub_code = compiler->isolate()->stub_code(); | 2626 StubCode* stub_code = compiler->isolate()->stub_code(); |
| 2627 const ExternalLabel label(stub_code->AllocateContextEntryPoint()); | 2627 const ExternalLabel label(stub_code->AllocateContextEntryPoint()); |
| 2628 compiler->GenerateCall(token_pos(), | 2628 compiler->GenerateCall(token_pos(), |
| 2629 &label, | 2629 &label, |
| 2630 RawPcDescriptors::kOther, | 2630 RawPcDescriptors::kOther, |
| 2631 locs()); | 2631 locs()); |
| 2632 } | 2632 } |
| 2633 | 2633 |
| 2634 | 2634 |
| 2635 LocationSummary* InitStaticFieldInstr::MakeLocationSummary(Isolate* isolate, | |
| 2636 bool opt) const { | |
| 2637 const intptr_t kNumInputs = 1; | |
| 2638 const intptr_t kNumTemps = 1; | |
| 2639 LocationSummary* locs = new(isolate) LocationSummary( | |
| 2640 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | |
| 2641 locs->set_in(0, Location::RegisterLocation(R0)); | |
| 2642 locs->set_out(0, Location::RegisterLocation(R0)); | |
|
srdjan
2014/08/19 18:49:39
You do not need output .. here and elsewhere..
hausner
2014/08/19 20:54:00
Done.
| |
| 2643 locs->set_temp(0, Location::RegisterLocation(R1)); | |
|
zra
2014/08/18 15:56:09
Why does the temp register need to be hardcoded to
zra
2014/08/18 17:15:53
Nevermind. Looks like for kCall LocationSummary, y
hausner
2014/08/19 17:19:14
I initially tried to use Location::RequiresRegiste
| |
| 2644 return locs; | |
| 2645 } | |
| 2646 | |
| 2647 | |
| 2648 void InitStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 2649 Register field = locs()->in(0).reg(); | |
| 2650 Register temp = locs()->temp(0).reg(); | |
| 2651 Label call_runtime, no_call; | |
| 2652 | |
| 2653 __ ldr(temp, FieldAddress(field, Field::value_offset())); | |
| 2654 __ CompareObject(temp, Object::sentinel()); | |
| 2655 __ b(&call_runtime, EQ); | |
| 2656 | |
| 2657 __ CompareObject(temp, Object::transition_sentinel()); | |
| 2658 __ b(&no_call, NE); | |
| 2659 | |
| 2660 __ Bind(&call_runtime); | |
| 2661 __ PushObject(Object::null_object()); // Make room for (unused) result. | |
| 2662 __ Push(field); | |
| 2663 compiler->GenerateRuntimeCall(token_pos(), | |
| 2664 deopt_id(), | |
| 2665 kInitStaticFieldRuntimeEntry, | |
| 2666 1, | |
| 2667 locs()); | |
| 2668 __ Drop(2); // Remove argument and result placeholder. | |
| 2669 __ Bind(&no_call); | |
| 2670 } | |
| 2671 | |
| 2672 | |
| 2635 LocationSummary* CloneContextInstr::MakeLocationSummary(Isolate* isolate, | 2673 LocationSummary* CloneContextInstr::MakeLocationSummary(Isolate* isolate, |
| 2636 bool opt) const { | 2674 bool opt) const { |
| 2637 const intptr_t kNumInputs = 1; | 2675 const intptr_t kNumInputs = 1; |
| 2638 const intptr_t kNumTemps = 0; | 2676 const intptr_t kNumTemps = 0; |
| 2639 LocationSummary* locs = new(isolate) LocationSummary( | 2677 LocationSummary* locs = new(isolate) LocationSummary( |
| 2640 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 2678 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 2641 locs->set_in(0, Location::RegisterLocation(R0)); | 2679 locs->set_in(0, Location::RegisterLocation(R0)); |
| 2642 locs->set_out(0, Location::RegisterLocation(R0)); | 2680 locs->set_out(0, Location::RegisterLocation(R0)); |
| 2643 return locs; | 2681 return locs; |
| 2644 } | 2682 } |
| (...skipping 4065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6710 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6748 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 6711 #if defined(DEBUG) | 6749 #if defined(DEBUG) |
| 6712 __ LoadImmediate(R4, kInvalidObjectPointer); | 6750 __ LoadImmediate(R4, kInvalidObjectPointer); |
| 6713 __ LoadImmediate(R5, kInvalidObjectPointer); | 6751 __ LoadImmediate(R5, kInvalidObjectPointer); |
| 6714 #endif | 6752 #endif |
| 6715 } | 6753 } |
| 6716 | 6754 |
| 6717 } // namespace dart | 6755 } // namespace dart |
| 6718 | 6756 |
| 6719 #endif // defined TARGET_ARCH_ARM | 6757 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |