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

Unified Diff: src/compiler.cc

Issue 504163002: Use an enum of Flags internally in CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « src/compiler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 7918920562c2e521a55c7db3a565b4b0756aae3d..68055889dc99cac8894d32b834c17005d6ce2533 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -45,11 +45,10 @@ ScriptData::ScriptData(const byte* data, int length)
CompilationInfo::CompilationInfo(Handle<Script> script, Zone* zone)
- : flags_(StrictModeField::encode(SLOPPY)),
+ : flags_(kThisHasUses),
script_(script),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
optimization_id_(-1),
ast_value_factory_(NULL),
ast_value_factory_owned_(false) {
@@ -58,11 +57,10 @@ CompilationInfo::CompilationInfo(Handle<Script> script, Zone* zone)
CompilationInfo::CompilationInfo(Isolate* isolate, Zone* zone)
- : flags_(StrictModeField::encode(SLOPPY)),
+ : flags_(kThisHasUses),
script_(Handle<Script>::null()),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
optimization_id_(-1),
ast_value_factory_(NULL),
ast_value_factory_owned_(false) {
@@ -72,12 +70,11 @@ CompilationInfo::CompilationInfo(Isolate* isolate, Zone* zone)
CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info,
Zone* zone)
- : flags_(StrictModeField::encode(SLOPPY) | IsLazy::encode(true)),
+ : flags_(kLazy | kThisHasUses),
shared_info_(shared_info),
script_(Handle<Script>(Script::cast(shared_info->script()))),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
optimization_id_(-1),
ast_value_factory_(NULL),
ast_value_factory_owned_(false) {
@@ -86,14 +83,13 @@ CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info,
CompilationInfo::CompilationInfo(Handle<JSFunction> closure, Zone* zone)
- : flags_(StrictModeField::encode(SLOPPY) | IsLazy::encode(true)),
+ : flags_(kLazy | kThisHasUses),
closure_(closure),
shared_info_(Handle<SharedFunctionInfo>(closure->shared())),
script_(Handle<Script>(Script::cast(shared_info_->script()))),
context_(closure->context()),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
optimization_id_(-1),
ast_value_factory_(NULL),
ast_value_factory_owned_(false) {
@@ -103,10 +99,9 @@ CompilationInfo::CompilationInfo(Handle<JSFunction> closure, Zone* zone)
CompilationInfo::CompilationInfo(HydrogenCodeStub* stub, Isolate* isolate,
Zone* zone)
- : flags_(StrictModeField::encode(SLOPPY) | IsLazy::encode(true)),
+ : flags_(kLazy | kThisHasUses),
osr_ast_id_(BailoutId::None()),
parameter_count_(0),
- this_has_uses_(true),
optimization_id_(-1),
ast_value_factory_(NULL),
ast_value_factory_owned_(false) {
« no previous file with comments | « src/compiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698