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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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/ic/x64/ic-x64.cc ('k') | src/interpreter/interpreter.cc » ('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-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-info.h" 10 #include "src/compilation-info.h"
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 Register receiver = register_allocator()->NewRegister(); 1199 Register receiver = register_allocator()->NewRegister();
1200 builder()->ConvertAccumulatorToObject(receiver); 1200 builder()->ConvertAccumulatorToObject(receiver);
1201 1201
1202 // Used as kRegTriple and kRegPair in ForInPrepare and ForInNext. 1202 // Used as kRegTriple and kRegPair in ForInPrepare and ForInNext.
1203 RegisterList triple = register_allocator()->NewRegisterList(3); 1203 RegisterList triple = register_allocator()->NewRegisterList(3);
1204 Register cache_length = triple[2]; 1204 Register cache_length = triple[2];
1205 builder()->ForInPrepare(receiver, triple); 1205 builder()->ForInPrepare(receiver, triple);
1206 1206
1207 // Set up loop counter 1207 // Set up loop counter
1208 Register index = register_allocator()->NewRegister(); 1208 Register index = register_allocator()->NewRegister();
1209 builder()->LoadLiteral(Smi::kZero); 1209 builder()->LoadLiteral(Smi::FromInt(0));
1210 builder()->StoreAccumulatorInRegister(index); 1210 builder()->StoreAccumulatorInRegister(index);
1211 1211
1212 // The loop 1212 // The loop
1213 VisitIterationHeader(stmt, &loop_builder); 1213 VisitIterationHeader(stmt, &loop_builder);
1214 builder()->SetExpressionAsStatementPosition(stmt->each()); 1214 builder()->SetExpressionAsStatementPosition(stmt->each());
1215 builder()->ForInContinue(index, cache_length); 1215 builder()->ForInContinue(index, cache_length);
1216 loop_builder.BreakIfFalse(); 1216 loop_builder.BreakIfFalse();
1217 FeedbackVectorSlot slot = stmt->ForInFeedbackSlot(); 1217 FeedbackVectorSlot slot = stmt->ForInFeedbackSlot();
1218 builder()->ForInNext(receiver, index, triple.Truncate(2), 1218 builder()->ForInNext(receiver, index, triple.Truncate(2),
1219 feedback_index(slot)); 1219 feedback_index(slot));
(...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 } 3165 }
3166 3166
3167 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { 3167 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() {
3168 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict 3168 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
3169 : Runtime::kStoreKeyedToSuper_Sloppy; 3169 : Runtime::kStoreKeyedToSuper_Sloppy;
3170 } 3170 }
3171 3171
3172 } // namespace interpreter 3172 } // namespace interpreter
3173 } // namespace internal 3173 } // namespace internal
3174 } // namespace v8 3174 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698