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

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

Issue 747023002: Undo changes to type propagation and canonicalization from my previous CL. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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/flow_graph_type_propagator.cc ('k') | no next file » | 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/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.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 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 } else { 2044 } else {
2045 UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr( 2045 UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
2046 box_defn->value()->definition()->representation(), 2046 box_defn->value()->definition()->representation(),
2047 representation(), 2047 representation(),
2048 box_defn->value()->CopyWithType(), 2048 box_defn->value()->CopyWithType(),
2049 (representation() == kUnboxedInt32) ? 2049 (representation() == kUnboxedInt32) ?
2050 GetDeoptId() : Isolate::kNoDeoptId); 2050 GetDeoptId() : Isolate::kNoDeoptId);
2051 if ((representation() == kUnboxedInt32) && !CanDeoptimize()) { 2051 if ((representation() == kUnboxedInt32) && !CanDeoptimize()) {
2052 converter->mark_truncating(); 2052 converter->mark_truncating();
2053 } 2053 }
2054 // Only replace if the replacement has CanDeoptimize consistent with 2054 flow_graph->InsertBefore(this, converter, env(), FlowGraph::kValue);
2055 // the original instructions. We may have removed environments already. 2055 return converter;
2056 // Due to the way type propagation works currently, the CompileType of the
2057 // converter input may not be the same (more general) than the information
2058 // about the input of this unboxing instructions.
2059 if (CanDeoptimize() == converter->CanDeoptimize()) {
2060 flow_graph->InsertBefore(this, converter, env(), FlowGraph::kValue);
2061 return converter;
2062 }
2063 } 2056 }
2064 } 2057 }
2065 2058
2066 return this; 2059 return this;
2067 } 2060 }
2068 2061
2069 2062
2070 Definition* UnboxInt32Instr::Canonicalize(FlowGraph* flow_graph) { 2063 Definition* UnboxInt32Instr::Canonicalize(FlowGraph* flow_graph) {
2071 Definition* replacement = UnboxIntegerInstr::Canonicalize(flow_graph); 2064 Definition* replacement = UnboxIntegerInstr::Canonicalize(flow_graph);
2072 if (replacement != this) { 2065 if (replacement != this) {
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3376 case Token::kTRUNCDIV: return 0; 3369 case Token::kTRUNCDIV: return 0;
3377 case Token::kMOD: return 1; 3370 case Token::kMOD: return 1;
3378 default: UNIMPLEMENTED(); return -1; 3371 default: UNIMPLEMENTED(); return -1;
3379 } 3372 }
3380 } 3373 }
3381 3374
3382 3375
3383 #undef __ 3376 #undef __
3384 3377
3385 } // namespace dart 3378 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698