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

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

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: Created 4 years, 1 month 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-generator.h ('k') | src/isolate.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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 .LoadLiteral(Smi::FromInt(encoded_flags)) 929 .LoadLiteral(Smi::FromInt(encoded_flags))
930 .StoreAccumulatorInRegister(args[1]) 930 .StoreAccumulatorInRegister(args[1])
931 .MoveRegister(Register::function_closure(), args[2]) 931 .MoveRegister(Register::function_closure(), args[2])
932 .CallRuntime(Runtime::kDeclareGlobalsForInterpreter, args); 932 .CallRuntime(Runtime::kDeclareGlobalsForInterpreter, args);
933 933
934 // Push and reset globals builder. 934 // Push and reset globals builder.
935 global_declarations_.push_back(globals_builder()); 935 global_declarations_.push_back(globals_builder());
936 globals_builder_ = new (zone()) GlobalDeclarationsBuilder(zone()); 936 globals_builder_ = new (zone()) GlobalDeclarationsBuilder(zone());
937 } 937 }
938 938
939 void BytecodeGenerator::VisitStatements(ZoneList<Statement*>* statements) { 939 void BytecodeGenerator::VisitStatements(ZoneChunkList<Statement*>* statements) {
940 for (int i = 0; i < statements->length(); i++) { 940 for (auto statement : *statements) {
941 // Allocate an outer register allocations scope for the statement. 941 // Allocate an outer register allocations scope for the statement.
942 RegisterAllocationScope allocation_scope(this); 942 RegisterAllocationScope allocation_scope(this);
943 Statement* stmt = statements->at(i); 943 Visit(statement);
944 Visit(stmt); 944 if (statement->IsJump()) break;
945 if (stmt->IsJump()) break;
946 } 945 }
947 } 946 }
948 947
949 void BytecodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) { 948 void BytecodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) {
950 builder()->SetStatementPosition(stmt); 949 builder()->SetStatementPosition(stmt);
951 VisitForEffect(stmt->expression()); 950 VisitForEffect(stmt->expression());
952 } 951 }
953 952
954 void BytecodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) { 953 void BytecodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) {
955 } 954 }
(...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after
3217 } 3216 }
3218 3217
3219 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { 3218 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() {
3220 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict 3219 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
3221 : Runtime::kStoreKeyedToSuper_Sloppy; 3220 : Runtime::kStoreKeyedToSuper_Sloppy;
3222 } 3221 }
3223 3222
3224 } // namespace interpreter 3223 } // namespace interpreter
3225 } // namespace internal 3224 } // namespace internal
3226 } // namespace v8 3225 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698