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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 873973003: Add missing FrameState for Runtime_CreateArrayLiteral. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Port to other architectures. Created 5 years, 11 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/ast.h ('k') | src/compiler/linkage.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 // Create node to deep-copy the literal boilerplate. 1192 // Create node to deep-copy the literal boilerplate.
1193 expr->BuildConstantElements(isolate()); 1193 expr->BuildConstantElements(isolate());
1194 Node* literals_array = 1194 Node* literals_array =
1195 BuildLoadObjectField(closure, JSFunction::kLiteralsOffset); 1195 BuildLoadObjectField(closure, JSFunction::kLiteralsOffset);
1196 Node* literal_index = jsgraph()->Constant(expr->literal_index()); 1196 Node* literal_index = jsgraph()->Constant(expr->literal_index());
1197 Node* constants = jsgraph()->Constant(expr->constant_elements()); 1197 Node* constants = jsgraph()->Constant(expr->constant_elements());
1198 Node* flags = jsgraph()->Constant(expr->ComputeFlags()); 1198 Node* flags = jsgraph()->Constant(expr->ComputeFlags());
1199 const Operator* op = 1199 const Operator* op =
1200 javascript()->CallRuntime(Runtime::kCreateArrayLiteral, 4); 1200 javascript()->CallRuntime(Runtime::kCreateArrayLiteral, 4);
1201 Node* literal = NewNode(op, literals_array, literal_index, constants, flags); 1201 Node* literal = NewNode(op, literals_array, literal_index, constants, flags);
1202 PrepareFrameState(literal, expr->CreateLiteralId(),
1203 OutputFrameStateCombine::Push());
1202 1204
1203 // The array and the literal index are both expected on the operand stack 1205 // The array and the literal index are both expected on the operand stack
1204 // during computation of the element values. 1206 // during computation of the element values.
1205 environment()->Push(literal); 1207 environment()->Push(literal);
1206 environment()->Push(literal_index); 1208 environment()->Push(literal_index);
1207 1209
1208 // Create nodes to evaluate all the non-constant subexpressions and to store 1210 // Create nodes to evaluate all the non-constant subexpressions and to store
1209 // them into the newly cloned array. 1211 // them into the newly cloned array.
1210 for (int i = 0; i < expr->values()->length(); i++) { 1212 for (int i = 0; i < expr->values()->length(); i++) {
1211 Expression* subexpr = expr->values()->at(i); 1213 Expression* subexpr = expr->values()->at(i);
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 2434
2433 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( 2435 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop(
2434 IterationStatement* stmt) { 2436 IterationStatement* stmt) {
2435 if (loop_assignment_analysis_ == NULL) return NULL; 2437 if (loop_assignment_analysis_ == NULL) return NULL;
2436 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); 2438 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt);
2437 } 2439 }
2438 2440
2439 } // namespace compiler 2441 } // namespace compiler
2440 } // namespace internal 2442 } // namespace internal
2441 } // namespace v8 2443 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698