| OLD | NEW |
| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 5369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5380 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5380 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5381 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); | 5381 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); |
| 5382 const ExternalLabel label(cls().ToCString(), stub.EntryPoint()); | 5382 const ExternalLabel label(cls().ToCString(), stub.EntryPoint()); |
| 5383 compiler->GenerateCall(token_pos(), | 5383 compiler->GenerateCall(token_pos(), |
| 5384 &label, | 5384 &label, |
| 5385 PcDescriptors::kOther, | 5385 PcDescriptors::kOther, |
| 5386 locs()); | 5386 locs()); |
| 5387 __ Drop(ArgumentCount()); // Discard arguments. | 5387 __ Drop(ArgumentCount()); // Discard arguments. |
| 5388 } | 5388 } |
| 5389 | 5389 |
| 5390 | |
| 5391 LocationSummary* CreateClosureInstr::MakeLocationSummary(bool opt) const { | |
| 5392 return MakeCallSummary(); | |
| 5393 } | |
| 5394 | |
| 5395 | |
| 5396 void CreateClosureInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 5397 const Function& closure_function = function(); | |
| 5398 ASSERT(!closure_function.IsImplicitStaticClosureFunction()); | |
| 5399 const Code& stub = Code::Handle( | |
| 5400 StubCode::GetAllocationStubForClosure(closure_function)); | |
| 5401 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint()); | |
| 5402 compiler->GenerateCall(token_pos(), | |
| 5403 &label, | |
| 5404 PcDescriptors::kOther, | |
| 5405 locs()); | |
| 5406 __ Drop(2); // Discard type arguments and receiver. | |
| 5407 } | |
| 5408 | |
| 5409 } // namespace dart | 5390 } // namespace dart |
| 5410 | 5391 |
| 5411 #undef __ | 5392 #undef __ |
| 5412 | 5393 |
| 5413 #endif // defined TARGET_ARCH_IA32 | 5394 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |