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

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

Issue 1589643002: Source positions for constructors and lots of async machinery (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier.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_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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 __ Bind(entry_label()); 1678 __ Bind(entry_label());
1679 const Code& stub = Code::ZoneHandle(compiler->zone(), 1679 const Code& stub = Code::ZoneHandle(compiler->zone(),
1680 StubCode::GetAllocationStubForClass(cls_)); 1680 StubCode::GetAllocationStubForClass(cls_));
1681 const StubEntry stub_entry(stub); 1681 const StubEntry stub_entry(stub);
1682 1682
1683 LocationSummary* locs = instruction_->locs(); 1683 LocationSummary* locs = instruction_->locs();
1684 1684
1685 locs->live_registers()->Remove(Location::RegisterLocation(result_)); 1685 locs->live_registers()->Remove(Location::RegisterLocation(result_));
1686 1686
1687 compiler->SaveLiveRegisters(locs); 1687 compiler->SaveLiveRegisters(locs);
1688 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. 1688 compiler->GenerateCall(Token::kNoSourcePos, // No token position.
1689 stub_entry, 1689 stub_entry,
1690 RawPcDescriptors::kOther, 1690 RawPcDescriptors::kOther,
1691 locs); 1691 locs);
1692 compiler->AddStubCallTarget(stub); 1692 compiler->AddStubCallTarget(stub);
1693 __ MoveRegister(result_, RAX); 1693 __ MoveRegister(result_, RAX);
1694 compiler->RestoreLiveRegisters(locs); 1694 compiler->RestoreLiveRegisters(locs);
1695 __ jmp(exit_label()); 1695 __ jmp(exit_label());
1696 } 1696 }
1697 1697
1698 static void Allocate(FlowGraphCompiler* compiler, 1698 static void Allocate(FlowGraphCompiler* compiler,
(...skipping 4486 matching lines...) Expand 10 before | Expand all | Expand 10 after
6185 6185
6186 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6186 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6187 if (!compiler->is_optimizing()) { 6187 if (!compiler->is_optimizing()) {
6188 if (FLAG_emit_edge_counters) { 6188 if (FLAG_emit_edge_counters) {
6189 compiler->EmitEdgeCounter(block()->preorder_number()); 6189 compiler->EmitEdgeCounter(block()->preorder_number());
6190 } 6190 }
6191 // Add a deoptimization descriptor for deoptimizing instructions that 6191 // Add a deoptimization descriptor for deoptimizing instructions that
6192 // may be inserted before this instruction. 6192 // may be inserted before this instruction.
6193 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, 6193 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
6194 GetDeoptId(), 6194 GetDeoptId(),
6195 Scanner::kNoSourcePos); 6195 Token::kNoSourcePos);
6196 } 6196 }
6197 if (HasParallelMove()) { 6197 if (HasParallelMove()) {
6198 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 6198 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
6199 } 6199 }
6200 6200
6201 // We can fall through if the successor is the next block in the list. 6201 // We can fall through if the successor is the next block in the list.
6202 // Otherwise, we need a jump. 6202 // Otherwise, we need a jump.
6203 if (!compiler->CanFallThroughTo(successor())) { 6203 if (!compiler->CanFallThroughTo(successor())) {
6204 __ jmp(compiler->GetJumpLabel(successor())); 6204 __ jmp(compiler->GetJumpLabel(successor()));
6205 } 6205 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
6437 locs->set_out(0, Location::RegisterLocation(RAX)); 6437 locs->set_out(0, Location::RegisterLocation(RAX));
6438 return locs; 6438 return locs;
6439 } 6439 }
6440 6440
6441 6441
6442 void GrowRegExpStackInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6442 void GrowRegExpStackInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6443 const Register typed_data = locs()->in(0).reg(); 6443 const Register typed_data = locs()->in(0).reg();
6444 const Register result = locs()->out(0).reg(); 6444 const Register result = locs()->out(0).reg();
6445 __ PushObject(Object::null_object()); 6445 __ PushObject(Object::null_object());
6446 __ pushq(typed_data); 6446 __ pushq(typed_data);
6447 compiler->GenerateRuntimeCall(Scanner::kNoSourcePos, // No token position. 6447 compiler->GenerateRuntimeCall(Token::kNoSourcePos, // No token position.
6448 deopt_id(), 6448 deopt_id(),
6449 kGrowRegExpStackRuntimeEntry, 6449 kGrowRegExpStackRuntimeEntry,
6450 1, 6450 1,
6451 locs()); 6451 locs());
6452 __ Drop(1); 6452 __ Drop(1);
6453 __ popq(result); 6453 __ popq(result);
6454 } 6454 }
6455 6455
6456 6456
6457 } // namespace dart 6457 } // namespace dart
6458 6458
6459 #undef __ 6459 #undef __
6460 6460
6461 #endif // defined TARGET_ARCH_X64 6461 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698