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

Unified Diff: src/parsing/parser.cc

Issue 2242583003: [Parser] Remove Variable::is_possibly_eval. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@toon_cl
Patch Set: Created 4 years, 4 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/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 0d16469f3190e582d399752cf5387926922d268a..90c162e38ea6efa3409365a2d5a0f2f8c6ac7707 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -788,7 +788,7 @@ Expression* ParserTraits::GetIterator(Expression* iterable,
factory->NewProperty(iterable, iterator_symbol_literal, pos);
Zone* zone = parser_->zone();
ZoneList<Expression*>* args = new (zone) ZoneList<Expression*>(0, zone);
- return factory->NewCall(prop, args, pos);
+ return factory->NewCall(prop, args, pos, Call::NOT_EVAL);
}
@@ -3199,7 +3199,7 @@ Expression* Parser::BuildIteratorNextResult(Expression* iterator,
ZoneList<Expression*>* next_arguments =
new (zone()) ZoneList<Expression*>(0, zone());
Expression* next_call =
- factory()->NewCall(next_property, next_arguments, pos);
+ factory()->NewCall(next_property, next_arguments, pos, Call::NOT_EVAL);
Expression* result_proxy = factory()->NewVariableProxy(result);
Expression* left =
factory()->NewAssignment(Token::ASSIGN, result_proxy, next_call, pos);
@@ -5558,12 +5558,14 @@ Expression* Parser::CloseTemplateLiteral(TemplateLiteralState* state, int start,
Expression* call_site = factory()->NewCallRuntime(
Context::GET_TEMPLATE_CALL_SITE_INDEX, args, start);
+ Call::PossiblyEval is_possibly_eval = CheckPossibleEvalCall(tag, scope());
rmcilroy 2016/08/11 21:27:59 This call updates the scopes to record the eval ca
adamk 2016/08/11 21:42:31 There used to be a call to CheckPossibleEvalCall h
rmcilroy 2016/08/12 09:18:20 The reason I added this is that when I took it out
+
// Call TagFn
ZoneList<Expression*>* call_args =
new (zone()) ZoneList<Expression*>(expressions->length() + 1, zone());
call_args->Add(call_site, zone());
call_args->AddAll(*expressions, zone());
- return factory()->NewCall(tag, call_args, pos);
+ return factory()->NewCall(tag, call_args, pos, is_possibly_eval);
}
}
@@ -6276,7 +6278,8 @@ Expression* ParserTraits::RewriteYieldStar(
Expression* input_proxy = factory->NewVariableProxy(var_input);
auto args = new (zone) ZoneList<Expression*>(1, zone);
args->Add(input_proxy, zone);
- Expression* call = factory->NewCall(next_property, args, nopos);
+ Expression* call =
+ factory->NewCall(next_property, args, nopos, Call::NOT_EVAL);
Expression* output_proxy = factory->NewVariableProxy(var_output);
Expression* assignment =
factory->NewAssignment(Token::ASSIGN, output_proxy, call, nopos);

Powered by Google App Engine
This is Rietveld 408576698