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

Unified Diff: src/compiler.h

Issue 10534139: One Zone per CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 44df9e090f1e17b4ac7ef59eb1356c8b2e0cde32..588bc2466ed5b81877d1ac5928ad3291efc080aa 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -41,14 +41,17 @@ class ScriptDataImpl;
// is constructed based on the resources available at compile-time.
class CompilationInfo BASE_EMBEDDED {
public:
- explicit CompilationInfo(Handle<Script> script);
- explicit CompilationInfo(Handle<SharedFunctionInfo> shared_info);
- explicit CompilationInfo(Handle<JSFunction> closure);
+ CompilationInfo(Handle<Script> script, Zone* zone);
+ CompilationInfo(Handle<SharedFunctionInfo> shared_info, Zone* zone);
+ CompilationInfo(Handle<JSFunction> closure, Zone* zone);
Isolate* isolate() {
ASSERT(Isolate::Current() == isolate_);
return isolate_;
}
+ Zone* zone() {
+ return zone_;
+ }
bool is_lazy() const { return IsLazy::decode(flags_); }
bool is_eval() const { return IsEval::decode(flags_); }
bool is_global() const { return IsGlobal::decode(flags_); }
@@ -184,8 +187,6 @@ class CompilationInfo BASE_EMBEDDED {
NONOPT
};
- CompilationInfo() : function_(NULL) {}
-
void Initialize(Mode mode) {
mode_ = V8::UseCrankshaft() ? mode : NONOPT;
ASSERT(!script_.is_null());
@@ -254,6 +255,10 @@ class CompilationInfo BASE_EMBEDDED {
Mode mode_;
int osr_ast_id_;
+ // The zone the compilation pipeline working on this CompilationInfo
+ // allocates from.
danno 2012/06/14 14:22:19 Maybe: The zone from which the compilation pipelin
sanjoy 2012/06/15 09:24:31 Fixed.
+ Zone* zone_;
+
DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
};

Powered by Google App Engine
This is Rietveld 408576698