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

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

Issue 2504153002: [TypeFeedbackVector] Root literal arrays in function literals slots (Closed)
Patch Set: REBASE. Created 4 years 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
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/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/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 1285
1286 1286
1287 void AstGraphBuilder::VisitFunctionLiteral(FunctionLiteral* expr) { 1287 void AstGraphBuilder::VisitFunctionLiteral(FunctionLiteral* expr) {
1288 // Find or build a shared function info. 1288 // Find or build a shared function info.
1289 Handle<SharedFunctionInfo> shared_info = 1289 Handle<SharedFunctionInfo> shared_info =
1290 Compiler::GetSharedFunctionInfo(expr, info()->script(), info()); 1290 Compiler::GetSharedFunctionInfo(expr, info()->script(), info());
1291 CHECK(!shared_info.is_null()); // TODO(mstarzinger): Set stack overflow? 1291 CHECK(!shared_info.is_null()); // TODO(mstarzinger): Set stack overflow?
1292 1292
1293 // Create node to instantiate a new closure. 1293 // Create node to instantiate a new closure.
1294 PretenureFlag pretenure = expr->pretenure() ? TENURED : NOT_TENURED; 1294 PretenureFlag pretenure = expr->pretenure() ? TENURED : NOT_TENURED;
1295 const Operator* op = javascript()->CreateClosure(shared_info, pretenure); 1295 VectorSlotPair pair = CreateVectorSlotPair(expr->LiteralFeedbackSlot());
1296 const Operator* op =
1297 javascript()->CreateClosure(shared_info, pair, pretenure);
1296 Node* value = NewNode(op); 1298 Node* value = NewNode(op);
1297 ast_context()->ProduceValue(expr, value); 1299 ast_context()->ProduceValue(expr, value);
1298 } 1300 }
1299 1301
1300 void AstGraphBuilder::VisitClassLiteral(ClassLiteral* expr) { UNREACHABLE(); } 1302 void AstGraphBuilder::VisitClassLiteral(ClassLiteral* expr) { UNREACHABLE(); }
1301 1303
1302 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { 1304 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) {
1303 UNREACHABLE(); 1305 UNREACHABLE();
1304 } 1306 }
1305 1307
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
3297 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, 3299 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment,
3298 SourcePositionTable* source_positions, int inlining_id) 3300 SourcePositionTable* source_positions, int inlining_id)
3299 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, 3301 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency,
3300 loop_assignment), 3302 loop_assignment),
3301 source_positions_(source_positions), 3303 source_positions_(source_positions),
3302 start_position_(info->shared_info()->start_position(), inlining_id) {} 3304 start_position_(info->shared_info()->start_position(), inlining_id) {}
3303 3305
3304 } // namespace compiler 3306 } // namespace compiler
3305 } // namespace internal 3307 } // namespace internal
3306 } // namespace v8 3308 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698