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

Side by Side Diff: src/hydrogen-check-elimination.cc

Issue 269353003: Fix constructors for HLoadNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Deuglify code Created 6 years, 7 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 | « src/hydrogen.cc ('k') | src/hydrogen-instructions.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "hydrogen-check-elimination.h" 5 #include "hydrogen-check-elimination.h"
6 #include "hydrogen-alias-analysis.h" 6 #include "hydrogen-alias-analysis.h"
7 #include "hydrogen-flow-engine.h" 7 #include "hydrogen-flow-engine.h"
8 8
9 #define GLOBAL 1 9 #define GLOBAL 1
10 10
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } else { 333 } else {
334 // No entry; insert a new one. 334 // No entry; insert a new one.
335 Insert(object, instr, instr->maps()); 335 Insert(object, instr, instr->maps());
336 } 336 }
337 } 337 }
338 338
339 void ReduceLoadNamedField(HLoadNamedField* instr) { 339 void ReduceLoadNamedField(HLoadNamedField* instr) {
340 // Reduce a load of the map field when it is known to be a constant. 340 // Reduce a load of the map field when it is known to be a constant.
341 if (!instr->access().IsMap()) { 341 if (!instr->access().IsMap()) {
342 // Check if we introduce field maps here. 342 // Check if we introduce field maps here.
343 if (instr->maps()->size() != 0) { 343 MapSet maps = instr->maps();
344 Insert(instr, instr, instr->maps()); 344 if (maps != NULL) {
345 ASSERT_NE(0, maps->size());
346 Insert(instr, NULL, maps);
345 } 347 }
346 return; 348 return;
347 } 349 }
348 350
349 HValue* object = instr->object()->ActualValue(); 351 HValue* object = instr->object()->ActualValue();
350 MapSet maps = FindMaps(object); 352 MapSet maps = FindMaps(object);
351 if (maps == NULL || maps->size() != 1) return; // Not a constant. 353 if (maps == NULL || maps->size() != 1) return; // Not a constant.
352 354
353 Unique<Map> map = maps->at(0); 355 Unique<Map> map = maps->at(0);
354 HConstant* constant = HConstant::CreateAndInsertBefore( 356 HConstant* constant = HConstant::CreateAndInsertBefore(
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 PRINT_STAT(removed_cho); 658 PRINT_STAT(removed_cho);
657 PRINT_STAT(narrowed); 659 PRINT_STAT(narrowed);
658 PRINT_STAT(loads); 660 PRINT_STAT(loads);
659 PRINT_STAT(empty); 661 PRINT_STAT(empty);
660 PRINT_STAT(compares_true); 662 PRINT_STAT(compares_true);
661 PRINT_STAT(compares_false); 663 PRINT_STAT(compares_false);
662 PRINT_STAT(transitions); 664 PRINT_STAT(transitions);
663 } 665 }
664 666
665 } } // namespace v8::internal 667 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698