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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_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 "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 5080 matching lines...) Expand 10 before | Expand all | Expand 10 after
5091 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5091 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5092 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); 5092 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls()));
5093 const ExternalLabel label(cls().ToCString(), stub.EntryPoint()); 5093 const ExternalLabel label(cls().ToCString(), stub.EntryPoint());
5094 compiler->GenerateCall(token_pos(), 5094 compiler->GenerateCall(token_pos(),
5095 &label, 5095 &label,
5096 PcDescriptors::kOther, 5096 PcDescriptors::kOther,
5097 locs()); 5097 locs());
5098 __ Drop(ArgumentCount()); // Discard arguments. 5098 __ Drop(ArgumentCount()); // Discard arguments.
5099 } 5099 }
5100 5100
5101
5102 LocationSummary* CreateClosureInstr::MakeLocationSummary(bool opt) const {
5103 return MakeCallSummary();
5104 }
5105
5106
5107 void CreateClosureInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5108 const Function& closure_function = function();
5109 ASSERT(!closure_function.IsImplicitStaticClosureFunction());
5110 const Code& stub = Code::Handle(
5111 StubCode::GetAllocationStubForClosure(closure_function));
5112 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint());
5113 compiler->GenerateCall(token_pos(),
5114 &label,
5115 PcDescriptors::kOther,
5116 locs());
5117 __ Drop(2); // Discard type arguments and receiver.
5118 }
5119
5120 } // namespace dart 5101 } // namespace dart
5121 5102
5122 #undef __ 5103 #undef __
5123 5104
5124 #endif // defined TARGET_ARCH_X64 5105 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698