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 = |