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

Unified Diff: src/objects.h

Issue 9677043: Debugger: add ability to set script source from within OnBeforeCompile. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Patch for landing Created 8 years, 9 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/mirror-debugger.js ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 1d86382c8fb8f2c8db3aa9d74e70b3a98705b4bb..f45065e004af072313df9e6bf8686d3e62edcfec 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4978,6 +4978,12 @@ class Script: public Struct {
COMPILATION_TYPE_EVAL = 1
};
+ // Script compilation state.
+ enum CompilationState {
+ COMPILATION_STATE_INITIAL = 0,
+ COMPILATION_STATE_COMPILED = 1
+ };
+
// [source]: the script source.
DECL_ACCESSORS(source, Object)
@@ -5009,6 +5015,9 @@ class Script: public Struct {
// [compilation]: how the the script was compiled.
DECL_ACCESSORS(compilation_type, Smi)
+ // [is_compiled]: determines whether the script has already been compiled.
+ DECL_ACCESSORS(compilation_state, Smi)
+
// [line_ends]: FixedArray of line ends positions.
DECL_ACCESSORS(line_ends, Object)
@@ -5045,7 +5054,9 @@ class Script: public Struct {
static const int kWrapperOffset = kContextOffset + kPointerSize;
static const int kTypeOffset = kWrapperOffset + kPointerSize;
static const int kCompilationTypeOffset = kTypeOffset + kPointerSize;
- static const int kLineEndsOffset = kCompilationTypeOffset + kPointerSize;
+ static const int kCompilationStateOffset =
+ kCompilationTypeOffset + kPointerSize;
+ static const int kLineEndsOffset = kCompilationStateOffset + kPointerSize;
static const int kIdOffset = kLineEndsOffset + kPointerSize;
static const int kEvalFromSharedOffset = kIdOffset + kPointerSize;
static const int kEvalFrominstructionsOffsetOffset =
« no previous file with comments | « src/mirror-debugger.js ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698