Index: src/objects.h |
=================================================================== |
--- src/objects.h (revision 11040) |
+++ src/objects.h (working copy) |
@@ -4978,6 +4978,12 @@ |
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 @@ |
// [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 @@ |
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 = |