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

Unified Diff: src/compilation-info.h

Issue 2399833002: Teach Scopes whether they will end up being lazily compiled or not (Closed)
Patch Set: 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
Index: src/compilation-info.h
diff --git a/src/compilation-info.h b/src/compilation-info.h
index 88477ae75ea44db5a09c7a56fe8963fac84bcd4d..ecfa645e6e17605dc1e58d68a9df335dcab5a91e 100644
--- a/src/compilation-info.h
+++ b/src/compilation-info.h
@@ -39,8 +39,8 @@ class CompilationInfo final {
kRequiresFrame = 1 << 3,
kMustNotHaveEagerFrame = 1 << 4,
kDeoptimizationSupport = 1 << 5,
- kDebug = 1 << 6,
- kSerializing = 1 << 7,
+ kAccessorInliningEnabled = 1 << 6,
+ kTypeFeedbackEnabled = 1 << 7,
kFunctionContextSpecializing = 1 << 8,
kFrameSpecializing = 1 << 9,
kNativeContextSpecializing = 1 << 10,
@@ -51,8 +51,6 @@ class CompilationInfo final {
kSourcePositionsEnabled = 1 << 15,
kBailoutOnUninitialized = 1 << 16,
kOptimizeFromBytecode = 1 << 17,
- kTypeFeedbackEnabled = 1 << 18,
- kAccessorInliningEnabled = 1 << 19,
};
CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure);
@@ -122,15 +120,15 @@ class CompilationInfo final {
// Inner functions that cannot be compiled w/o context are compiled eagerly.
// Always include deoptimization support to avoid having to recompile again.
void MarkAsDebug() {
- SetFlag(kDebug);
+ set_is_debug();
SetFlag(kDeoptimizationSupport);
}
- bool is_debug() const { return GetFlag(kDebug); }
+ bool is_debug() const;
- void PrepareForSerializing() { SetFlag(kSerializing); }
+ void PrepareForSerializing() { set_will_serialize(); }
- bool will_serialize() const { return GetFlag(kSerializing); }
+ bool will_serialize() const;
void MarkAsFunctionContextSpecializing() {
SetFlag(kFunctionContextSpecializing);
@@ -346,6 +344,9 @@ class CompilationInfo final {
bool GetFlag(Flag flag) const { return (flags_ & flag) != 0; }
+ void set_is_debug();
+ void set_will_serialize();
+
unsigned flags_;
Code::Flags code_flags_;

Powered by Google App Engine
This is Rietveld 408576698