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

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

Issue 1554183002: VM compiler: Remove dead strict-compare instructions in optimized code. (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 | « no previous file | runtime/vm/parser.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/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/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/constant_propagator.h" 10 #include "vm/constant_propagator.h"
(...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 flow_graph->CopyDeoptTarget(this, bit_and); 2515 flow_graph->CopyDeoptTarget(this, bit_and);
2516 SetComparison(test); 2516 SetComparison(test);
2517 bit_and->RemoveFromGraph(); 2517 bit_and->RemoveFromGraph();
2518 } 2518 }
2519 } 2519 }
2520 return this; 2520 return this;
2521 } 2521 }
2522 2522
2523 2523
2524 Definition* StrictCompareInstr::Canonicalize(FlowGraph* flow_graph) { 2524 Definition* StrictCompareInstr::Canonicalize(FlowGraph* flow_graph) {
2525 if (!HasUses()) return NULL;
2525 bool negated = false; 2526 bool negated = false;
2526 Definition* replacement = CanonicalizeStrictCompare(this, &negated); 2527 Definition* replacement = CanonicalizeStrictCompare(this, &negated);
2527 if (negated && replacement->IsComparison()) { 2528 if (negated && replacement->IsComparison()) {
2528 ASSERT(replacement != this); 2529 ASSERT(replacement != this);
2529 replacement->AsComparison()->NegateComparison(); 2530 replacement->AsComparison()->NegateComparison();
2530 } 2531 }
2531 return replacement; 2532 return replacement;
2532 } 2533 }
2533 2534
2534 2535
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
3678 set_native_c_function(native_function); 3679 set_native_c_function(native_function);
3679 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3680 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3680 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3681 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3681 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3682 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3682 set_is_bootstrap_native(is_bootstrap_native); 3683 set_is_bootstrap_native(is_bootstrap_native);
3683 } 3684 }
3684 3685
3685 #undef __ 3686 #undef __
3686 3687
3687 } // namespace dart 3688 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698