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

Unified Diff: src/parsing/parse-info.cc

Issue 2413673002: Mark ParseInfo as eval in the constructors (Closed)
Patch Set: fix Created 4 years, 2 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 | « src/compiler.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parse-info.cc
diff --git a/src/parsing/parse-info.cc b/src/parsing/parse-info.cc
index 1667ad5742043f37d93d091f48f97d280f637fd6..ce8d67f5e96c5767d197f807d3f963a409c13bb5 100644
--- a/src/parsing/parse-info.cc
+++ b/src/parsing/parse-info.cc
@@ -53,9 +53,8 @@ ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared)
Handle<Script> script(Script::cast(shared->script()));
set_script(script);
- if (!script.is_null() && script->type() == Script::TYPE_NATIVE) {
- set_native();
- }
+ set_native(script->type() == Script::TYPE_NATIVE);
+ set_eval(script->compilation_type() == Script::COMPILATION_TYPE_EVAL);
Handle<HeapObject> scope_info(shared->outer_scope_info());
if (!scope_info->IsTheHole(isolate()) &&
@@ -73,9 +72,8 @@ ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) {
set_unicode_cache(isolate_->unicode_cache());
set_script(script);
- if (script->type() == Script::TYPE_NATIVE) {
- set_native();
- }
+ set_native(script->type() == Script::TYPE_NATIVE);
+ set_eval(script->compilation_type() == Script::COMPILATION_TYPE_EVAL);
}
ParseInfo::~ParseInfo() {
« no previous file with comments | « src/compiler.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698