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

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

Issue 167893007: Support elements transitions in load elimination (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 s->object()->ActualValue()->id(), 91 s->object()->ActualValue()->id(),
92 s->value()->id())); 92 s->value()->id()));
93 HValue* result = store(s); 93 HValue* result = store(s);
94 if (result == NULL) { 94 if (result == NULL) {
95 // The store is redundant. Remove it. 95 // The store is redundant. Remove it.
96 TRACE((" remove S%d\n", instr->id())); 96 TRACE((" remove S%d\n", instr->id()));
97 instr->DeleteAndReplaceWith(NULL); 97 instr->DeleteAndReplaceWith(NULL);
98 } 98 }
99 break; 99 break;
100 } 100 }
101 case HValue::kTransitionElementsKind: {
102 HTransitionElementsKind* t = HTransitionElementsKind::cast(instr);
103 HValue* object = t->object()->ActualValue();
104 KillFieldInternal(object, FieldOf(JSArray::kElementsOffset), NULL);
105 KillFieldInternal(object, FieldOf(JSObject::kMapOffset), NULL);
106 break;
107 }
101 default: { 108 default: {
102 if (instr->CheckChangesFlag(kInobjectFields)) { 109 if (instr->CheckChangesFlag(kInobjectFields)) {
103 TRACE((" kill-all i%d\n", instr->id())); 110 TRACE((" kill-all i%d\n", instr->id()));
104 Kill(); 111 Kill();
105 break; 112 break;
106 } 113 }
107 if (instr->CheckChangesFlag(kMaps)) { 114 if (instr->CheckChangesFlag(kMaps)) {
108 TRACE((" kill-maps i%d\n", instr->id())); 115 TRACE((" kill-maps i%d\n", instr->id()));
109 KillOffset(JSObject::kMapOffset); 116 KillOffset(JSObject::kMapOffset);
110 } 117 }
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 } else { 526 } else {
520 // Perform only local analysis. 527 // Perform only local analysis.
521 for (int i = 0; i < graph()->blocks()->length(); i++) { 528 for (int i = 0; i < graph()->blocks()->length(); i++) {
522 table->Kill(); 529 table->Kill();
523 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); 530 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table);
524 } 531 }
525 } 532 }
526 } 533 }
527 534
528 } } // namespace v8::internal 535 } } // namespace v8::internal
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