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

Unified Diff: runtime/vm/parser.cc

Issue 2135683002: Do not reload when we are evaluating a constant expression during compilation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index c90263909dc9b3c5aedec1d54b889f740be59732..b08d7d846fb2586692b5643dc75eeb374b68afce 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -12230,6 +12230,7 @@ StaticGetterNode* Parser::RunStaticFieldInitializer(
// not been evaluated. If the field is const, call the static getter method
// to evaluate the expression and canonicalize the value.
if (field.is_const()) {
+ NoReloadScope no_reload_scope(isolate(), thread());
field.SetStaticValue(Object::transition_sentinel());
const int kNumArguments = 0; // no arguments.
const Function& func = Function::Handle(Z,
@@ -12287,6 +12288,7 @@ RawObject* Parser::EvaluateConstConstructorCall(
const TypeArguments& type_arguments,
const Function& constructor,
ArgumentListNode* arguments) {
+ NoReloadScope no_reload_scope(isolate(), thread());
// Factories have one extra argument: the type arguments.
// Constructors have 1 extra arguments: receiver.
const int kNumExtraArgs = 1;
@@ -13801,6 +13803,7 @@ AstNode* Parser::ParseNewOperator(Token::Kind op_kind) {
String& Parser::Interpolate(const GrowableArray<AstNode*>& values) {
+ NoReloadScope no_reload_scope(isolate(), thread());
const Class& cls = Class::Handle(
Z, Library::LookupCoreClass(Symbols::StringBase()));
ASSERT(!cls.IsNull());
@@ -14148,6 +14151,7 @@ AstNode* Parser::ParsePrimary() {
// be a compile time constant.
const Instance& Parser::EvaluateConstExpr(TokenPosition expr_pos,
AstNode* expr) {
+ NoReloadScope no_reload_scope(isolate(), thread());
if (expr->IsLiteralNode()) {
return expr->AsLiteralNode()->literal();
} else if (expr->IsLoadLocalNode() &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698