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

Side by Side Diff: vm/intermediate_language_x64.cc

Issue 10425007: Move two more instructions to intermediate_language_x64.cc. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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 | « vm/flow_graph_compiler_x64.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 #include "vm/locations.h" 9 #include "vm/locations.h"
10 #include "vm/stub_code.h" 10 #include "vm/stub_code.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 UNIMPLEMENTED(); 362 UNIMPLEMENTED();
363 } 363 }
364 364
365 365
366 LocationSummary* CreateClosureComp::MakeLocationSummary() const { 366 LocationSummary* CreateClosureComp::MakeLocationSummary() const {
367 return NULL; 367 return NULL;
368 } 368 }
369 369
370 370
371 void AllocateObjectComp::EmitNativeCode(FlowGraphCompiler* compiler) { 371 void AllocateObjectComp::EmitNativeCode(FlowGraphCompiler* compiler) {
372 UNIMPLEMENTED(); 372 const Class& cls = Class::ZoneHandle(constructor().owner());
373 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls));
374 const ExternalLabel label(cls.ToCString(), stub.EntryPoint());
375 compiler->GenerateCall(token_index(),
376 try_index(),
377 &label,
378 PcDescriptors::kOther);
379 __ Drop(arguments().length()); // Discard arguments.
373 } 380 }
374 381
375 382
376 LocationSummary* AllocateObjectComp::MakeLocationSummary() const { 383 LocationSummary* AllocateObjectComp::MakeLocationSummary() const {
377 return NULL; 384 return MakeCallSummary();
378 } 385 }
379 386
380 387
381 void AllocateObjectWithBoundsCheckComp::EmitNativeCode( 388 void AllocateObjectWithBoundsCheckComp::EmitNativeCode(
382 FlowGraphCompiler* compiler) { 389 FlowGraphCompiler* compiler) {
383 UNIMPLEMENTED(); 390 const Class& cls = Class::ZoneHandle(constructor().owner());
391 Register type_arguments = locs()->in(0).reg();
392 Register instantiator_type_arguments = locs()->in(1).reg();
393 Register result = locs()->out().reg();
394
395 // Push the result place holder initialized to NULL.
396 __ PushObject(Object::ZoneHandle());
397 __ pushq(Immediate(Smi::RawValue(token_index())));
398 __ PushObject(cls);
399 __ pushq(type_arguments);
400 __ pushq(instantiator_type_arguments);
401 compiler->GenerateCallRuntime(cid(),
402 token_index(),
403 try_index(),
404 kAllocateObjectWithBoundsCheckRuntimeEntry);
405 // Pop instantiator type arguments, type arguments, class, and
406 // source location.
407 __ Drop(4);
408 __ popq(result); // Pop new instance.
384 } 409 }
385 410
386 411
387 LocationSummary* AllocateObjectWithBoundsCheckComp:: 412 LocationSummary* AllocateObjectWithBoundsCheckComp::
388 MakeLocationSummary() const { 413 MakeLocationSummary() const {
389 return NULL; 414 return MakeSimpleLocationSummary(2, Location::RequiresRegister());
390 } 415 }
391 416
392 417
393 void NativeLoadFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { 418 void NativeLoadFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
394 UNIMPLEMENTED(); 419 UNIMPLEMENTED();
395 } 420 }
396 421
397 422
398 LocationSummary* NativeLoadFieldComp::MakeLocationSummary() const { 423 LocationSummary* NativeLoadFieldComp::MakeLocationSummary() const {
399 return NULL; 424 return NULL;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 LocationSummary* CatchEntryComp::MakeLocationSummary() const { 507 LocationSummary* CatchEntryComp::MakeLocationSummary() const {
483 return NULL; 508 return NULL;
484 } 509 }
485 510
486 511
487 } // namespace dart 512 } // namespace dart
488 513
489 #undef __ 514 #undef __
490 515
491 #endif // defined TARGET_ARCH_X64 516 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/flow_graph_compiler_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698