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

Unified Diff: src/compiler.h

Issue 379563002: Fix issues with code serializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 3aa845858f29e439ebf1485f3621d9c9fee01c2c..b0c4e11856c3c4721c5a6a44ef31d398101fbf14 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -76,10 +76,12 @@ class CompilationInfo {
ASSERT(!is_lazy());
flags_ |= IsEval::encode(true);
}
+
void MarkAsGlobal() {
ASSERT(!is_lazy());
flags_ |= IsGlobal::encode(true);
}
+
void set_parameter_count(int parameter_count) {
ASSERT(IsStub());
parameter_count_ = parameter_count;
@@ -88,13 +90,16 @@ class CompilationInfo {
void set_this_has_uses(bool has_no_uses) {
this_has_uses_ = has_no_uses;
}
+
bool this_has_uses() {
return this_has_uses_;
}
+
void SetStrictMode(StrictMode strict_mode) {
ASSERT(this->strict_mode() == SLOPPY || this->strict_mode() == strict_mode);
flags_ = StrictModeField::update(flags_, strict_mode);
}
+
void MarkAsNative() {
flags_ |= IsNative::encode(true);
}
@@ -155,8 +160,16 @@ class CompilationInfo {
return IsDebug::decode(flags_);
}
+ void PrepareForSerializing() {
+ ASSERT(!is_lazy());
+ flags_ |= PrepareForSerializing::encode(true);
+ }
+
+ bool will_serialize() const { return PrepareForSerializing::decode(flags_); }
+
bool IsCodePreAgingActive() const {
- return FLAG_optimize_for_size && FLAG_age_code && !is_debug();
+ return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() &&
+ !is_debug();
}
void SetParseRestriction(ParseRestriction restriction) {
@@ -393,6 +406,8 @@ class CompilationInfo {
class RequiresFrame: public BitField<bool, 13, 1> {};
// If the function cannot build a frame (for unspecified reasons)
class MustNotHaveEagerFrame: public BitField<bool, 14, 1> {};
+ // If we plan to serialize the compiled code.
+ class PrepareForSerializing : public BitField<bool, 15, 1> {};
unsigned flags_;
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698