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

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 3 years, 12 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/compiler.cc ('k') | src/compiler/bytecode-graph-builder.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/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 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, 3300 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment,
3299 SourcePositionTable* source_positions, int inlining_id) 3301 SourcePositionTable* source_positions, int inlining_id)
3300 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, 3302 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency,
3301 loop_assignment), 3303 loop_assignment),
3302 source_positions_(source_positions), 3304 source_positions_(source_positions),
3303 start_position_(info->shared_info()->start_position(), inlining_id) {} 3305 start_position_(info->shared_info()->start_position(), inlining_id) {}
3304 3306
3305 } // namespace compiler 3307 } // namespace compiler
3306 } // namespace internal 3308 } // namespace internal
3307 } // namespace v8 3309 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698