Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 19569002: Replace ChainContextInstr with existing IL instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after
3590 void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3590 void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3591 Register value = locs()->in(0).reg(); 3591 Register value = locs()->in(0).reg();
3592 Register result = locs()->out().reg(); 3592 Register result = locs()->out().reg();
3593 3593
3594 __ LoadObject(result, Bool::True()); 3594 __ LoadObject(result, Bool::True());
3595 __ cmp(result, ShifterOperand(value)); 3595 __ cmp(result, ShifterOperand(value));
3596 __ LoadObject(result, Bool::False(), EQ); 3596 __ LoadObject(result, Bool::False(), EQ);
3597 } 3597 }
3598 3598
3599 3599
3600 LocationSummary* ChainContextInstr::MakeLocationSummary() const {
3601 return LocationSummary::Make(1,
3602 Location::NoLocation(),
3603 LocationSummary::kNoCall);
3604 }
3605
3606
3607 void ChainContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3608 Register context_value = locs()->in(0).reg();
3609
3610 // Chain the new context in context_value to its parent in CTX.
3611 __ StoreIntoObject(context_value,
3612 FieldAddress(context_value, Context::parent_offset()),
3613 CTX);
3614 // Set new context as current context.
3615 __ mov(CTX, ShifterOperand(context_value));
3616 }
3617
3618
3619 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const { 3600 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const {
3620 const intptr_t kNumInputs = 2; 3601 const intptr_t kNumInputs = 2;
3621 const intptr_t kNumTemps = 0; 3602 const intptr_t kNumTemps = 0;
3622 LocationSummary* locs = 3603 LocationSummary* locs =
3623 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3604 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3624 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() 3605 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister()
3625 : Location::RequiresRegister()); 3606 : Location::RequiresRegister());
3626 locs->set_in(1, Location::RequiresRegister()); 3607 locs->set_in(1, Location::RequiresRegister());
3627 return locs; 3608 return locs;
3628 } 3609 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 compiler->GenerateCall(token_pos(), 3654 compiler->GenerateCall(token_pos(),
3674 &label, 3655 &label,
3675 PcDescriptors::kOther, 3656 PcDescriptors::kOther,
3676 locs()); 3657 locs());
3677 __ Drop(2); // Discard type arguments and receiver. 3658 __ Drop(2); // Discard type arguments and receiver.
3678 } 3659 }
3679 3660
3680 } // namespace dart 3661 } // namespace dart
3681 3662
3682 #endif // defined TARGET_ARCH_ARM 3663 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698