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

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

Issue 2289613002: [turbofan] Remove special JSForInStep and JSForInDone. (Closed)
Patch Set: Created 4 years, 3 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-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/interpreter/bytecode-flags.h" 10 #include "src/interpreter/bytecode-flags.h"
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 builder()->ForInPrepare(receiver, cache_type); 1324 builder()->ForInPrepare(receiver, cache_type);
1325 1325
1326 // Set up loop counter 1326 // Set up loop counter
1327 Register index = register_allocator()->NewRegister(); 1327 Register index = register_allocator()->NewRegister();
1328 builder()->LoadLiteral(Smi::FromInt(0)); 1328 builder()->LoadLiteral(Smi::FromInt(0));
1329 builder()->StoreAccumulatorInRegister(index); 1329 builder()->StoreAccumulatorInRegister(index);
1330 1330
1331 // The loop 1331 // The loop
1332 VisitIterationHeader(stmt, &loop_builder); 1332 VisitIterationHeader(stmt, &loop_builder);
1333 builder()->SetExpressionAsStatementPosition(stmt->each()); 1333 builder()->SetExpressionAsStatementPosition(stmt->each());
1334 builder()->ForInDone(index, cache_length); 1334 builder()->ForInContinue(index, cache_length);
1335 loop_builder.BreakIfTrue(); 1335 loop_builder.BreakIfFalse();
1336 DCHECK(Register::AreContiguous(cache_type, cache_array)); 1336 DCHECK(Register::AreContiguous(cache_type, cache_array));
1337 FeedbackVectorSlot slot = stmt->ForInFeedbackSlot(); 1337 FeedbackVectorSlot slot = stmt->ForInFeedbackSlot();
1338 builder()->ForInNext(receiver, index, cache_type, feedback_index(slot)); 1338 builder()->ForInNext(receiver, index, cache_type, feedback_index(slot));
1339 loop_builder.ContinueIfUndefined(); 1339 loop_builder.ContinueIfUndefined();
1340 VisitForInAssignment(stmt->each(), stmt->EachFeedbackSlot()); 1340 VisitForInAssignment(stmt->each(), stmt->EachFeedbackSlot());
1341 VisitIterationBody(stmt, &loop_builder); 1341 VisitIterationBody(stmt, &loop_builder);
1342 builder()->ForInStep(index); 1342 builder()->ForInStep(index);
1343 builder()->StoreAccumulatorInRegister(index); 1343 builder()->StoreAccumulatorInRegister(index);
1344 loop_builder.JumpToHeader(); 1344 loop_builder.JumpToHeader();
1345 loop_builder.EndLoop(); 1345 loop_builder.EndLoop();
(...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 return execution_context()->scope()->language_mode(); 3400 return execution_context()->scope()->language_mode();
3401 } 3401 }
3402 3402
3403 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3403 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3404 return TypeFeedbackVector::GetIndex(slot); 3404 return TypeFeedbackVector::GetIndex(slot);
3405 } 3405 }
3406 3406
3407 } // namespace interpreter 3407 } // namespace interpreter
3408 } // namespace internal 3408 } // namespace internal
3409 } // namespace v8 3409 } // 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