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

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
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/object.h » ('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_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 5055 matching lines...) Expand 10 before | Expand all | Expand 10 after
5066 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5066 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5067 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); 5067 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls()));
5068 const ExternalLabel label(cls().ToCString(), stub.EntryPoint()); 5068 const ExternalLabel label(cls().ToCString(), stub.EntryPoint());
5069 compiler->GenerateCall(token_pos(), 5069 compiler->GenerateCall(token_pos(),
5070 &label, 5070 &label,
5071 PcDescriptors::kOther, 5071 PcDescriptors::kOther,
5072 locs()); 5072 locs());
5073 __ Drop(ArgumentCount()); // Discard arguments. 5073 __ Drop(ArgumentCount()); // Discard arguments.
5074 } 5074 }
5075 5075
5076
5077 LocationSummary* CreateClosureInstr::MakeLocationSummary(bool opt) const {
5078 return MakeCallSummary();
5079 }
5080
5081
5082 void CreateClosureInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5083 const Function& closure_function = function();
5084 ASSERT(!closure_function.IsImplicitStaticClosureFunction());
5085 const Code& stub = Code::Handle(
5086 StubCode::GetAllocationStubForClosure(closure_function));
5087 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint());
5088 compiler->GenerateCall(token_pos(),
5089 &label,
5090 PcDescriptors::kOther,
5091 locs());
5092 __ Drop(2); // Discard type arguments and receiver.
5093 }
5094
5095 } // namespace dart 5076 } // namespace dart
5096 5077
5097 #undef __ 5078 #undef __
5098 5079
5099 #endif // defined TARGET_ARCH_X64 5080 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698