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

Side by Side Diff: src/interpreter/bytecode-peephole-optimizer.cc

Issue 2007023003: [interpreter] Address naming inconsistencies in bytecodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0056-register-only
Patch Set: Rebase. Created 4 years, 6 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
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "src/interpreter/bytecode-peephole-optimizer.h" 5 #include "src/interpreter/bytecode-peephole-optimizer.h"
6 6
7 #include "src/interpreter/constant-array-builder.h" 7 #include "src/interpreter/constant-array-builder.h"
8 #include "src/objects-inl.h" 8 #include "src/objects-inl.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // store to R occurs. 194 // store to R occurs.
195 last->source_info().Update(current->source_info()); 195 last->source_info().Update(current->source_info());
196 current->source_info().set_invalid(); 196 current->source_info().set_invalid();
197 } 197 }
198 198
199 } // namespace 199 } // namespace
200 200
201 bool BytecodePeepholeOptimizer::ChangeLdaToLdr(BytecodeNode* const current) { 201 bool BytecodePeepholeOptimizer::ChangeLdaToLdr(BytecodeNode* const current) {
202 if (current->bytecode() == Bytecode::kStar) { 202 if (current->bytecode() == Bytecode::kStar) {
203 switch (last_.bytecode()) { 203 switch (last_.bytecode()) {
204 case Bytecode::kLoadIC: 204 case Bytecode::kLdaNamedProperty:
205 TransformLdaStarToLdrLdar(Bytecode::kLdrNamedProperty, &last_, current); 205 TransformLdaStarToLdrLdar(Bytecode::kLdrNamedProperty, &last_, current);
206 return true; 206 return true;
207 case Bytecode::kKeyedLoadIC: 207 case Bytecode::kLdaKeyedProperty:
208 TransformLdaStarToLdrLdar(Bytecode::kLdrKeyedProperty, &last_, current); 208 TransformLdaStarToLdrLdar(Bytecode::kLdrKeyedProperty, &last_, current);
209 return true; 209 return true;
210 case Bytecode::kLdaGlobal: 210 case Bytecode::kLdaGlobal:
211 TransformLdaStarToLdrLdar(Bytecode::kLdrGlobal, &last_, current); 211 TransformLdaStarToLdrLdar(Bytecode::kLdrGlobal, &last_, current);
212 return true; 212 return true;
213 case Bytecode::kLdaContextSlot: 213 case Bytecode::kLdaContextSlot:
214 TransformLdaStarToLdrLdar(Bytecode::kLdrContextSlot, &last_, current); 214 TransformLdaStarToLdrLdar(Bytecode::kLdrContextSlot, &last_, current);
215 return true; 215 return true;
216 case Bytecode::kLdaUndefined: 216 case Bytecode::kLdaUndefined:
217 TransformLdaStarToLdrLdar(Bytecode::kLdrUndefined, &last_, current); 217 TransformLdaStarToLdrLdar(Bytecode::kLdrUndefined, &last_, current);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 InvalidateLast(); 307 InvalidateLast();
308 return current; 308 return current;
309 } 309 }
310 310
311 return current; 311 return current;
312 } 312 }
313 313
314 } // namespace interpreter 314 } // namespace interpreter
315 } // namespace internal 315 } // namespace internal
316 } // namespace v8 316 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698