Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 36611ee077710cdf4efebbc3beb8afe53bf17c52..37f94794598fe25440049bc66dd3904656796866 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -5849,11 +5849,14 @@ class Script: public Struct { |
| // [type]: the script type. |
| DECL_ACCESSORS(type, Smi) |
| - // [compilation]: how the the script was compiled. |
| - DECL_ACCESSORS(compilation_type, Smi) |
| + // [compilation_type]: how the the script was compiled. |
|
Michael Starzinger
2013/07/29 14:43:58
nit: Can we add a short sentence to the comment sa
Mike West
2013/07/29 14:52:12
Makes sense. Upcoming patchset does both.
|
| + inline CompilationType compilation_type(); |
| + inline void set_compilation_type(CompilationType type); |
| - // [is_compiled]: determines whether the script has already been compiled. |
| - DECL_ACCESSORS(compilation_state, Smi) |
| + // [compilation_state]: determines whether the script has already been |
| + // compiled. |
|
Michael Starzinger
2013/07/29 14:43:58
Likewise.
Mike West
2013/07/29 14:52:12
Done.
|
| + inline CompilationState compilation_state(); |
| + inline void set_compilation_state(CompilationState state); |
| // [line_ends]: FixedArray of line ends positions. |
| DECL_ACCESSORS(line_ends, Object) |
| @@ -5866,6 +5869,9 @@ class Script: public Struct { |
| // function from which eval was called where eval was called. |
| DECL_ACCESSORS(eval_from_instructions_offset, Smi) |
| + // [flags]: Holds an exciting bitfield. |
| + DECL_ACCESSORS(flags, Smi) |
| + |
| static inline Script* cast(Object* obj); |
| // If script source is an external string, check that the underlying |
| @@ -5884,17 +5890,19 @@ class Script: public Struct { |
| static const int kContextOffset = kDataOffset + kPointerSize; |
| static const int kWrapperOffset = kContextOffset + kPointerSize; |
| static const int kTypeOffset = kWrapperOffset + kPointerSize; |
| - static const int kCompilationTypeOffset = kTypeOffset + kPointerSize; |
| - static const int kCompilationStateOffset = |
| - kCompilationTypeOffset + kPointerSize; |
| - static const int kLineEndsOffset = kCompilationStateOffset + kPointerSize; |
| + static const int kLineEndsOffset = kTypeOffset + kPointerSize; |
| static const int kIdOffset = kLineEndsOffset + kPointerSize; |
| static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; |
| static const int kEvalFrominstructionsOffsetOffset = |
| kEvalFromSharedOffset + kPointerSize; |
| - static const int kSize = kEvalFrominstructionsOffsetOffset + kPointerSize; |
| + static const int kFlagsOffset = |
| + kEvalFrominstructionsOffsetOffset + kPointerSize; |
| + static const int kSize = kFlagsOffset + kPointerSize; |
| private: |
| + static const int kCompilationTypeBit = 0; |
|
Michael Starzinger
2013/07/29 14:43:58
nit: Lets add a one-liner comment "// Bit position
Mike West
2013/07/29 14:52:12
Done.
|
| + static const int kCompilationStateBit = 1; |
| + |
| DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
| }; |