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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_mips.cc ('k') | no next file » | 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 4352 matching lines...) Expand 10 before | Expand all | Expand 10 after
4363 4363
4364 Label done; 4364 Label done;
4365 __ LoadObject(result, Bool::True()); 4365 __ LoadObject(result, Bool::True());
4366 __ CompareRegisters(result, value); 4366 __ CompareRegisters(result, value);
4367 __ j(NOT_EQUAL, &done, Assembler::kNearJump); 4367 __ j(NOT_EQUAL, &done, Assembler::kNearJump);
4368 __ LoadObject(result, Bool::False()); 4368 __ LoadObject(result, Bool::False());
4369 __ Bind(&done); 4369 __ Bind(&done);
4370 } 4370 }
4371 4371
4372 4372
4373 LocationSummary* ChainContextInstr::MakeLocationSummary() const {
4374 return LocationSummary::Make(1,
4375 Location::NoLocation(),
4376 LocationSummary::kNoCall);
4377 }
4378
4379
4380 void ChainContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4381 Register context_value = locs()->in(0).reg();
4382
4383 // Chain the new context in context_value to its parent in CTX.
4384 __ StoreIntoObject(context_value,
4385 FieldAddress(context_value, Context::parent_offset()),
4386 CTX);
4387 // Set new context as current context.
4388 __ MoveRegister(CTX, context_value);
4389 }
4390
4391
4392 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const { 4373 LocationSummary* StoreVMFieldInstr::MakeLocationSummary() const {
4393 const intptr_t kNumInputs = 2; 4374 const intptr_t kNumInputs = 2;
4394 const intptr_t kNumTemps = 0; 4375 const intptr_t kNumTemps = 0;
4395 LocationSummary* locs = 4376 LocationSummary* locs =
4396 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 4377 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
4397 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() 4378 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister()
4398 : Location::RequiresRegister()); 4379 : Location::RequiresRegister());
4399 locs->set_in(1, Location::RequiresRegister()); 4380 locs->set_in(1, Location::RequiresRegister());
4400 return locs; 4381 return locs;
4401 } 4382 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
4448 PcDescriptors::kOther, 4429 PcDescriptors::kOther,
4449 locs()); 4430 locs());
4450 __ Drop(2); // Discard type arguments and receiver. 4431 __ Drop(2); // Discard type arguments and receiver.
4451 } 4432 }
4452 4433
4453 } // namespace dart 4434 } // namespace dart
4454 4435
4455 #undef __ 4436 #undef __
4456 4437
4457 #endif // defined TARGET_ARCH_X64 4438 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698