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

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

Issue 135553005: Fix issue 16592: Do not attempt to merge operations that do not have uses, otherwise we add force u… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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.h ('k') | tests/language/arithmetic_test.dart » ('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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 return false; 1412 return false;
1413 } 1413 }
1414 } 1414 }
1415 1415
1416 1416
1417 Definition* ConstantInstr::Canonicalize(FlowGraph* flow_graph) { 1417 Definition* ConstantInstr::Canonicalize(FlowGraph* flow_graph) {
1418 return HasUses() ? this : NULL; 1418 return HasUses() ? this : NULL;
1419 } 1419 }
1420 1420
1421 1421
1422 Definition* MathUnaryInstr::Canonicalize(FlowGraph* flow_graph) {
1423 return HasUses() ? this : NULL;
1424 }
1425
1426
1422 Definition* LoadFieldInstr::Canonicalize(FlowGraph* flow_graph) { 1427 Definition* LoadFieldInstr::Canonicalize(FlowGraph* flow_graph) {
1423 if (!HasUses()) return NULL; 1428 if (!HasUses()) return NULL;
1424 if (!IsImmutableLengthLoad()) return this; 1429 if (!IsImmutableLengthLoad()) return this;
1425 1430
1426 // For fixed length arrays if the array is the result of a known constructor 1431 // For fixed length arrays if the array is the result of a known constructor
1427 // call we can replace the length load with the length argument passed to 1432 // call we can replace the length load with the length argument passed to
1428 // the constructor. 1433 // the constructor.
1429 StaticCallInstr* call = instance()->definition()->AsStaticCall(); 1434 StaticCallInstr* call = instance()->definition()->AsStaticCall();
1430 if ((call != NULL) && 1435 if ((call != NULL) &&
1431 call->is_known_list_constructor() && 1436 call->is_known_list_constructor() &&
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after
3137 case Token::kTRUNCDIV: return 0; 3142 case Token::kTRUNCDIV: return 0;
3138 case Token::kMOD: return 1; 3143 case Token::kMOD: return 1;
3139 default: UNIMPLEMENTED(); return -1; 3144 default: UNIMPLEMENTED(); return -1;
3140 } 3145 }
3141 } 3146 }
3142 3147
3143 3148
3144 #undef __ 3149 #undef __
3145 3150
3146 } // namespace dart 3151 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | tests/language/arithmetic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698