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

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

Issue 19370003: Enable allocation sinking for closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 7 years, 4 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 4374 matching lines...) Expand 10 before | Expand all | Expand 10 after
4385 } 4385 }
4386 } 4386 }
4387 4387
4388 4388
4389 LocationSummary* AllocateObjectInstr::MakeLocationSummary() const { 4389 LocationSummary* AllocateObjectInstr::MakeLocationSummary() const {
4390 return MakeCallSummary(); 4390 return MakeCallSummary();
4391 } 4391 }
4392 4392
4393 4393
4394 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4394 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4395 const Class& cls = Class::ZoneHandle(constructor().Owner()); 4395 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls()));
4396 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls)); 4396 const ExternalLabel label(cls().ToCString(), stub.EntryPoint());
4397 const ExternalLabel label(cls.ToCString(), stub.EntryPoint());
4398 compiler->GenerateCall(token_pos(), 4397 compiler->GenerateCall(token_pos(),
4399 &label, 4398 &label,
4400 PcDescriptors::kOther, 4399 PcDescriptors::kOther,
4401 locs()); 4400 locs());
4402 __ Drop(ArgumentCount()); // Discard arguments. 4401 __ Drop(ArgumentCount()); // Discard arguments.
4403 } 4402 }
4404 4403
4405 4404
4406 LocationSummary* CreateClosureInstr::MakeLocationSummary() const { 4405 LocationSummary* CreateClosureInstr::MakeLocationSummary() const {
4407 return MakeCallSummary(); 4406 return MakeCallSummary();
4408 } 4407 }
4409 4408
4410 4409
4411 void CreateClosureInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4410 void CreateClosureInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4412 const Function& closure_function = function(); 4411 const Function& closure_function = function();
4413 ASSERT(!closure_function.IsImplicitStaticClosureFunction()); 4412 ASSERT(!closure_function.IsImplicitStaticClosureFunction());
4414 const Code& stub = Code::Handle( 4413 const Code& stub = Code::Handle(
4415 StubCode::GetAllocationStubForClosure(closure_function)); 4414 StubCode::GetAllocationStubForClosure(closure_function));
4416 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint()); 4415 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint());
4417 compiler->GenerateCall(token_pos(), 4416 compiler->GenerateCall(token_pos(),
4418 &label, 4417 &label,
4419 PcDescriptors::kOther, 4418 PcDescriptors::kOther,
4420 locs()); 4419 locs());
4421 __ Drop(2); // Discard type arguments and receiver. 4420 __ Drop(2); // Discard type arguments and receiver.
4422 } 4421 }
4423 4422
4424 } // namespace dart 4423 } // namespace dart
4425 4424
4426 #endif // defined TARGET_ARCH_ARM 4425 #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