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

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

Issue 12412013: Add pass to remove empty blocks and recompute fall-through targets. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 13 matching lines...) Expand all
24 DECLARE_FLAG(bool, print_ast); 24 DECLARE_FLAG(bool, print_ast);
25 DECLARE_FLAG(bool, print_scopes); 25 DECLARE_FLAG(bool, print_scopes);
26 DECLARE_FLAG(bool, enable_type_checks); 26 DECLARE_FLAG(bool, enable_type_checks);
27 DECLARE_FLAG(bool, eliminate_type_checks); 27 DECLARE_FLAG(bool, eliminate_type_checks);
28 28
29 29
30 FlowGraphCompiler::~FlowGraphCompiler() { 30 FlowGraphCompiler::~FlowGraphCompiler() {
31 // BlockInfos are zone-allocated, so their destructors are not called. 31 // BlockInfos are zone-allocated, so their destructors are not called.
32 // Verify the labels explicitly here. 32 // Verify the labels explicitly here.
33 for (int i = 0; i < block_info_.length(); ++i) { 33 for (int i = 0; i < block_info_.length(); ++i) {
34 ASSERT(!block_info_[i]->label.IsLinked()); 34 ASSERT(!block_info_[i]->jump_label()->IsLinked());
35 ASSERT(!block_info_[i]->label.HasNear()); 35 ASSERT(!block_info_[i]->jump_label()->HasNear());
36 } 36 }
37 } 37 }
38 38
39 39
40 bool FlowGraphCompiler::SupportsUnboxedMints() { 40 bool FlowGraphCompiler::SupportsUnboxedMints() {
41 return false; 41 return false;
42 } 42 }
43 43
44 44
45 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, 45 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler,
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 1430
1431 1431
1432 void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition, 1432 void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition,
1433 FpuRegister left, 1433 FpuRegister left,
1434 FpuRegister right, 1434 FpuRegister right,
1435 BranchInstr* branch) { 1435 BranchInstr* branch) {
1436 ASSERT(branch != NULL); 1436 ASSERT(branch != NULL);
1437 assembler()->comisd(left, right); 1437 assembler()->comisd(left, right);
1438 BlockEntryInstr* nan_result = (true_condition == NOT_EQUAL) ? 1438 BlockEntryInstr* nan_result = (true_condition == NOT_EQUAL) ?
1439 branch->true_successor() : branch->false_successor(); 1439 branch->true_successor() : branch->false_successor();
1440 assembler()->j(PARITY_EVEN, GetBlockLabel(nan_result)); 1440 assembler()->j(PARITY_EVEN, GetJumpLabel(nan_result));
1441 branch->EmitBranchOnCondition(this, true_condition); 1441 branch->EmitBranchOnCondition(this, true_condition);
1442 } 1442 }
1443 1443
1444 1444
1445 1445
1446 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition, 1446 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition,
1447 FpuRegister left, 1447 FpuRegister left,
1448 FpuRegister right, 1448 FpuRegister right,
1449 Register result) { 1449 Register result) {
1450 assembler()->comisd(left, right); 1450 assembler()->comisd(left, right);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1695 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1696 __ Exchange(mem1, mem2); 1696 __ Exchange(mem1, mem2);
1697 } 1697 }
1698 1698
1699 1699
1700 #undef __ 1700 #undef __
1701 1701
1702 } // namespace dart 1702 } // namespace dart
1703 1703
1704 #endif // defined TARGET_ARCH_X64 1704 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698