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

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

Issue 239923004: Allow merging of monomorphic accesses to tracked fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 8 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 INC_STAT(removed_); 376 INC_STAT(removed_);
377 } else if (value != instr) { 377 } else if (value != instr) {
378 instr->DeleteAndReplaceWith(value); 378 instr->DeleteAndReplaceWith(value);
379 INC_STAT(redundant_); 379 INC_STAT(redundant_);
380 } 380 }
381 } 381 }
382 382
383 void ReduceLoadNamedField(HLoadNamedField* instr) { 383 void ReduceLoadNamedField(HLoadNamedField* instr) {
384 // Reduce a load of the map field when it is known to be a constant. 384 // Reduce a load of the map field when it is known to be a constant.
385 if (!IsMapAccess(instr->access())) { 385 if (!IsMapAccess(instr->access())) {
386 // Check if we introduce a map here. 386 // Check if we introduce field maps here.
387 if (!instr->map().IsNull()) { 387 if (instr->map_set().size() != 0) {
388 Insert(instr, instr, instr->map()); 388 Insert(instr, instr, instr->map_set().Copy(phase_->zone()));
389 } 389 }
390 return; 390 return;
391 } 391 }
392 392
393 HValue* object = instr->object()->ActualValue(); 393 HValue* object = instr->object()->ActualValue();
394 MapSet maps = FindMaps(object); 394 MapSet maps = FindMaps(object);
395 if (maps == NULL || maps->size() != 1) return; // Not a constant. 395 if (maps == NULL || maps->size() != 1) return; // Not a constant.
396 396
397 Unique<Map> map = maps->at(0); 397 Unique<Map> map = maps->at(0);
398 HConstant* constant = HConstant::CreateAndInsertBefore( 398 HConstant* constant = HConstant::CreateAndInsertBefore(
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 PRINT_STAT(removed_cho); 742 PRINT_STAT(removed_cho);
743 PRINT_STAT(narrowed); 743 PRINT_STAT(narrowed);
744 PRINT_STAT(loads); 744 PRINT_STAT(loads);
745 PRINT_STAT(empty); 745 PRINT_STAT(empty);
746 PRINT_STAT(compares_true); 746 PRINT_STAT(compares_true);
747 PRINT_STAT(compares_false); 747 PRINT_STAT(compares_false);
748 PRINT_STAT(transitions); 748 PRINT_STAT(transitions);
749 } 749 }
750 750
751 } } // namespace v8::internal 751 } } // 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