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

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

Issue 10827387: Reenable elimination of strict equals when right side is true. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | runtime/vm/intermediate_language.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.h" 5 #include "vm/flow_graph.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 ASSERT(input_value->IsUse()); 333 ASSERT(input_value->IsUse());
334 env->RemoveLast(); 334 env->RemoveLast();
335 335
336 BindInstr* as_bind = v->AsUse()->definition()->AsBind(); 336 BindInstr* as_bind = v->AsUse()->definition()->AsBind();
337 if ((as_bind != NULL) && 337 if ((as_bind != NULL) &&
338 (as_bind->computation()->IsLoadLocal() || 338 (as_bind->computation()->IsLoadLocal() ||
339 as_bind->computation()->IsStoreLocal())) { 339 as_bind->computation()->IsStoreLocal())) {
340 // Assert exactly one use. 340 // Assert exactly one use.
341 ASSERT(as_bind->use_list() == v); 341 ASSERT(as_bind->use_list() == v);
342 ASSERT(as_bind->use_list()->next_use() == NULL); 342 ASSERT(as_bind->use_list()->next_use() == NULL);
343 // Remove the use, its defintion and copy the environment value. 343 // Remove the use, its definition and copy the environment value.
344 v->RemoveFromUseList(); 344 v->RemoveFromUseList();
345 as_bind->RemoveFromGraph(); 345 as_bind->RemoveFromGraph();
346 current->SetInputAt(i, CopyValue(input_value)); 346 current->SetInputAt(i, CopyValue(input_value));
347 } 347 }
348 } 348 }
349 349
350 // Drop pushed arguments for calls. 350 // Drop pushed arguments for calls.
351 for (intptr_t j = 0; j < current->ArgumentCount(); j++) { 351 for (intptr_t j = 0; j < current->ArgumentCount(); j++) {
352 env->RemoveLast(); 352 env->RemoveLast();
353 } 353 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 459 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
460 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 460 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
461 OS::SNPrint(chars, len, kFormat, function_name, reason); 461 OS::SNPrint(chars, len, kFormat, function_name, reason);
462 const Error& error = Error::Handle( 462 const Error& error = Error::Handle(
463 LanguageError::New(String::Handle(String::New(chars)))); 463 LanguageError::New(String::Handle(String::New(chars))));
464 Isolate::Current()->long_jump_base()->Jump(1, error); 464 Isolate::Current()->long_jump_base()->Jump(1, error);
465 } 465 }
466 466
467 467
468 } // namespace dart 468 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698