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

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

Issue 178233003: Allocate instance closures similarly to regular closures, i.e. without a (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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
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 "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 5011 matching lines...) Expand 10 before | Expand all | Expand 10 after
5022 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5022 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5023 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); 5023 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls()));
5024 const ExternalLabel label(cls().ToCString(), stub.EntryPoint()); 5024 const ExternalLabel label(cls().ToCString(), stub.EntryPoint());
5025 compiler->GenerateCall(token_pos(), 5025 compiler->GenerateCall(token_pos(),
5026 &label, 5026 &label,
5027 PcDescriptors::kOther, 5027 PcDescriptors::kOther,
5028 locs()); 5028 locs());
5029 __ Drop(ArgumentCount()); // Discard arguments. 5029 __ Drop(ArgumentCount()); // Discard arguments.
5030 } 5030 }
5031 5031
5032
5033 LocationSummary* CreateClosureInstr::MakeLocationSummary(bool opt) const {
5034 return MakeCallSummary();
5035 }
5036
5037
5038 void CreateClosureInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5039 const Function& closure_function = function();
5040 ASSERT(!closure_function.IsImplicitStaticClosureFunction());
5041 const Code& stub = Code::Handle(
5042 StubCode::GetAllocationStubForClosure(closure_function));
5043 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint());
5044 compiler->GenerateCall(token_pos(),
5045 &label,
5046 PcDescriptors::kOther,
5047 locs());
5048 __ Drop(2); // Discard type arguments and receiver.
5049 }
5050
5051 } // namespace dart 5032 } // namespace dart
5052 5033
5053 #endif // defined TARGET_ARCH_ARM 5034 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698