Commit 0389c28d authored by titzer's avatar titzer Committed by Commit bot

Move this_has_uses from ParseInfo back into CompilationInfo and renumber CompilationInfo flags.

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1028973002

Cr-Commit-Position: refs/heads/master@{#27369}
parent ec9f0a53
......@@ -62,7 +62,6 @@ PARSE_INFO_GETTER(Handle<Script>, script)
PARSE_INFO_GETTER(bool, is_eval)
PARSE_INFO_GETTER(bool, is_native)
PARSE_INFO_GETTER(bool, is_module)
PARSE_INFO_GETTER(bool, this_has_uses)
PARSE_INFO_GETTER(LanguageMode, language_mode)
PARSE_INFO_GETTER_WITH_DEFAULT(Handle<JSFunction>, closure,
Handle<JSFunction>::null())
......@@ -459,8 +458,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
: new (info()->zone()) HOptimizedGraphBuilder(info());
Timer t(this, &time_taken_to_create_graph_);
// TODO(titzer): ParseInfo::this_has_uses is only used by Crankshaft. Move.
info()->parse_info()->set_this_has_uses(false);
info()->SetThisHasUses(false);
graph_ = graph_builder_->CreateGraph();
if (isolate()->has_pending_exception()) {
......
......@@ -110,21 +110,22 @@ class CompilationInfo {
// Various configuration flags for a compilation, as well as some properties
// of the compiled code produced by a compilation.
enum Flag {
kDeferredCalling = 1 << 7,
kNonDeferredCalling = 1 << 8,
kSavesCallerDoubles = 1 << 9,
kRequiresFrame = 1 << 10,
kMustNotHaveEagerFrame = 1 << 11,
kDeoptimizationSupport = 1 << 12,
kDebug = 1 << 13,
kCompilingForDebugging = 1 << 14,
kSerializing = 1 << 16,
kContextSpecializing = 1 << 17,
kInliningEnabled = 1 << 18,
kTypingEnabled = 1 << 19,
kDisableFutureOptimization = 1 << 20,
kSplittingEnabled = 1 << 23,
kBuiltinInliningEnabled = 1 << 24
kDeferredCalling = 1 << 0,
kNonDeferredCalling = 1 << 1,
kSavesCallerDoubles = 1 << 2,
kRequiresFrame = 1 << 3,
kThisHasUses = 1 << 4,
kMustNotHaveEagerFrame = 1 << 5,
kDeoptimizationSupport = 1 << 6,
kDebug = 1 << 7,
kCompilingForDebugging = 1 << 8,
kSerializing = 1 << 9,
kContextSpecializing = 1 << 10,
kInliningEnabled = 1 << 11,
kTypingEnabled = 1 << 12,
kDisableFutureOptimization = 1 << 13,
kSplittingEnabled = 1 << 14,
kBuiltinInliningEnabled = 1 << 15
};
explicit CompilationInfo(ParseInfo* parse_info);
......@@ -140,7 +141,6 @@ class CompilationInfo {
bool is_eval() const;
bool is_native() const;
bool is_module() const;
bool this_has_uses() const;
LanguageMode language_mode() const;
Handle<JSFunction> closure() const;
FunctionLiteral* function() const;
......@@ -192,6 +192,10 @@ class CompilationInfo {
bool requires_frame() const { return GetFlag(kRequiresFrame); }
void SetThisHasUses(bool val) { SetFlag(kThisHasUses, val); }
bool this_has_uses() const { return GetFlag(kThisHasUses); }
void MarkMustNotHaveEagerFrame() { SetFlag(kMustNotHaveEagerFrame); }
bool GetMustNotHaveEagerFrame() const {
......
......@@ -5291,7 +5291,7 @@ HValue* HOptimizedGraphBuilder::BuildContextChainWalk(Variable* var) {
void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) {
if (expr->is_this()) {
current_info()->parse_info()->set_this_has_uses(true);
current_info()->SetThisHasUses(true);
}
DCHECK(!HasStackOverflow());
......
......@@ -64,7 +64,6 @@ ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared)
isolate_ = shared->GetIsolate();
set_lazy();
set_this_has_uses();
set_hash_seed(isolate_->heap()->HashSeed());
set_stack_limit(isolate_->stack_guard()->real_climit());
set_unicode_cache(isolate_->unicode_cache());
......@@ -82,7 +81,6 @@ ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared)
ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) {
isolate_ = script->GetIsolate();
set_this_has_uses();
set_hash_seed(isolate_->heap()->HashSeed());
set_stack_limit(isolate_->stack_guard()->real_climit());
set_unicode_cache(isolate_->unicode_cache());
......
......@@ -56,7 +56,6 @@ class ParseInfo {
FLAG_ACCESSOR(kNative, is_native, set_native)
FLAG_ACCESSOR(kModule, is_module, set_module)
FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing)
FLAG_ACCESSOR(kThisHasUses, this_has_uses, set_this_has_uses)
FLAG_ACCESSOR(kAstValueFactoryOwned, ast_value_factory_owned,
set_ast_value_factory_owned)
......@@ -170,8 +169,7 @@ class ParseInfo {
kModule = 1 << 8,
kAllowLazyParsing = 1 << 9,
// ---------- Output flags --------------------------
kThisHasUses = 1 << 10,
kAstValueFactoryOwned = 1 << 11
kAstValueFactoryOwned = 1 << 10
};
//------------- Inputs to parsing and scope analysis -----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment