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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2655853010: [TypeFeedbackVector] Combine the literals array and the feedback vector. (Closed)
Patch Set: gyp file Created 3 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 22c0a1ecef401d60c9b4785d9e0b89f0c6fb6b6d..aed828a9d9c13b715767cf0e2818b539189f9ec3 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1358,7 +1358,8 @@ void AstGraphBuilder::VisitRegExpLiteral(RegExpLiteral* expr) {
// Create node to materialize a regular expression literal.
const Operator* op = javascript()->CreateLiteralRegExp(
- expr->pattern(), expr->flags(), expr->literal_index());
+ expr->pattern(), expr->flags(),
+ TypeFeedbackVector::GetIndex(expr->literal_slot()));
Node* literal = NewNode(op, closure);
PrepareFrameState(literal, expr->id(), ast_context()->GetStateCombine());
ast_context()->ProduceValue(expr, literal);
@@ -1371,7 +1372,8 @@ void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
// Create node to deep-copy the literal boilerplate.
const Operator* op = javascript()->CreateLiteralObject(
expr->GetOrBuildConstantProperties(isolate()), expr->ComputeFlags(true),
- expr->literal_index(), expr->properties_count());
+ TypeFeedbackVector::GetIndex(expr->literal_slot()),
+ expr->properties_count());
Node* literal = NewNode(op, closure);
PrepareFrameState(literal, expr->CreateLiteralId(),
OutputFrameStateCombine::Push());
@@ -1500,7 +1502,8 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
// Create node to deep-copy the literal boilerplate.
const Operator* op = javascript()->CreateLiteralArray(
expr->GetOrBuildConstantElements(isolate()), expr->ComputeFlags(true),
- expr->literal_index(), expr->values()->length());
+ TypeFeedbackVector::GetIndex(expr->literal_slot()),
+ expr->values()->length());
Node* literal = NewNode(op, closure);
PrepareFrameState(literal, expr->CreateLiteralId(),
OutputFrameStateCombine::Push());

Powered by Google App Engine
This is Rietveld 408576698