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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_arm.cc ('k') | runtime/vm/intermediate_language_mips.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 4682 matching lines...) Expand 10 before | Expand all | Expand 10 after
4693 4693
4694 Label done; 4694 Label done;
4695 __ LoadObject(result, Bool::True()); 4695 __ LoadObject(result, Bool::True());
4696 __ CompareRegisters(result, value); 4696 __ CompareRegisters(result, value);
4697 __ j(NOT_EQUAL, &done, Assembler::kNearJump); 4697 __ j(NOT_EQUAL, &done, Assembler::kNearJump);
4698 __ LoadObject(result, Bool::False()); 4698 __ LoadObject(result, Bool::False());
4699 __ Bind(&done); 4699 __ Bind(&done);
4700 } 4700 }
4701 4701
4702 4702
4703 LocationSummary* ChainContextInstr::MakeLocationSummary() const {
4704 return LocationSummary::Make(1,
4705 Location::NoLocation(),
4706 LocationSummary::kNoCall);
4707 }
4708
4709
4710 void ChainContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4711 Register context_value = locs()->in(0).reg();
4712
4713 // Chain the new context in context_value to its parent in CTX.
4714 __ StoreIntoObject(context_value,
4715 FieldAddress(context_value, Context::parent_offset()),
4716 CTX);
4717 // Set new context as current context.
4718 __ MoveRegister(CTX, context_value);
4719 }
4720
4721
4722 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const { 4703 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const {
4723 const intptr_t kNumInputs = 2; 4704 const intptr_t kNumInputs = 2;
4724 const intptr_t kNumTemps = 0; 4705 const intptr_t kNumTemps = 0;
4725 LocationSummary* locs = 4706 LocationSummary* locs =
4726 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 4707 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
4727 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() 4708 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister()
4728 : Location::RequiresRegister()); 4709 : Location::RequiresRegister());
4729 locs->set_in(1, Location::RequiresRegister()); 4710 locs->set_in(1, Location::RequiresRegister());
4730 return locs; 4711 return locs;
4731 } 4712 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
4778 PcDescriptors::kOther, 4759 PcDescriptors::kOther,
4779 locs()); 4760 locs());
4780 __ Drop(2); // Discard type arguments and receiver. 4761 __ Drop(2); // Discard type arguments and receiver.
4781 } 4762 }
4782 4763
4783 } // namespace dart 4764 } // namespace dart
4784 4765
4785 #undef __ 4766 #undef __
4786 4767
4787 #endif // defined TARGET_ARCH_IA32 4768 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698