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

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

Issue 21422002: Fix performance degradation in DeltaBlue. When converting equality to strict-equality... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « no previous file | 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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 current_instruction->env(), 2909 current_instruction->env(),
2910 current_instruction); 2910 current_instruction);
2911 ASSERT((compare->kind() == Token::kEQ) || (compare->kind() == Token::kNE)); 2911 ASSERT((compare->kind() == Token::kEQ) || (compare->kind() == Token::kNE));
2912 Token::Kind strict_kind = (compare->kind() == Token::kEQ) ? 2912 Token::Kind strict_kind = (compare->kind() == Token::kEQ) ?
2913 Token::kEQ_STRICT : Token::kNE_STRICT; 2913 Token::kEQ_STRICT : Token::kNE_STRICT;
2914 StrictCompareInstr* strict_comp = 2914 StrictCompareInstr* strict_comp =
2915 new StrictCompareInstr(compare->token_pos(), 2915 new StrictCompareInstr(compare->token_pos(),
2916 strict_kind, 2916 strict_kind,
2917 compare->left()->Copy(), 2917 compare->left()->Copy(),
2918 compare->right()->Copy()); 2918 compare->right()->Copy());
2919 // Numbers override equality and are therefore not part of this conversion.
2920 strict_comp->set_needs_number_check(false);
2919 current_instruction->ReplaceWith(strict_comp, current_iterator()); 2921 current_instruction->ReplaceWith(strict_comp, current_iterator());
2920 return true; 2922 return true;
2921 } 2923 }
2922 return false; 2924 return false;
2923 } 2925 }
2924 2926
2925 2927
2926 template <typename T> 2928 template <typename T>
2927 void FlowGraphOptimizer::HandleEqualityCompare(EqualityCompareInstr* comp, 2929 void FlowGraphOptimizer::HandleEqualityCompare(EqualityCompareInstr* comp,
2928 T current_instruction) { 2930 T current_instruction) {
(...skipping 4476 matching lines...) Expand 10 before | Expand all | Expand 10 after
7405 7407
7406 // Insert materializations at environment uses. 7408 // Insert materializations at environment uses.
7407 const Class& cls = Class::Handle(alloc->constructor().Owner()); 7409 const Class& cls = Class::Handle(alloc->constructor().Owner());
7408 for (intptr_t i = 0; i < exits.length(); i++) { 7410 for (intptr_t i = 0; i < exits.length(); i++) {
7409 CreateMaterializationAt(exits[i], alloc, cls, *fields); 7411 CreateMaterializationAt(exits[i], alloc, cls, *fields);
7410 } 7412 }
7411 } 7413 }
7412 7414
7413 7415
7414 } // namespace dart 7416 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698