| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
| 10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
| (...skipping 6761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6772 // function from which eval was called. | 6772 // function from which eval was called. |
| 6773 DECL_ACCESSORS(eval_from_shared, Object) | 6773 DECL_ACCESSORS(eval_from_shared, Object) |
| 6774 | 6774 |
| 6775 // [eval_from_instructions_offset]: the instruction offset in the code for the | 6775 // [eval_from_instructions_offset]: the instruction offset in the code for the |
| 6776 // function from which eval was called where eval was called. | 6776 // function from which eval was called where eval was called. |
| 6777 DECL_ACCESSORS(eval_from_instructions_offset, Smi) | 6777 DECL_ACCESSORS(eval_from_instructions_offset, Smi) |
| 6778 | 6778 |
| 6779 // [flags]: Holds an exciting bitfield. | 6779 // [flags]: Holds an exciting bitfield. |
| 6780 DECL_ACCESSORS(flags, Smi) | 6780 DECL_ACCESSORS(flags, Smi) |
| 6781 | 6781 |
| 6782 // [source_url]: the source url (from source map comment) |
| 6783 DECL_ACCESSORS(source_url, Object) |
| 6784 |
| 6782 // [compilation_type]: how the the script was compiled. Encoded in the | 6785 // [compilation_type]: how the the script was compiled. Encoded in the |
| 6783 // 'flags' field. | 6786 // 'flags' field. |
| 6784 inline CompilationType compilation_type(); | 6787 inline CompilationType compilation_type(); |
| 6785 inline void set_compilation_type(CompilationType type); | 6788 inline void set_compilation_type(CompilationType type); |
| 6786 | 6789 |
| 6787 // [compilation_state]: determines whether the script has already been | 6790 // [compilation_state]: determines whether the script has already been |
| 6788 // compiled. Encoded in the 'flags' field. | 6791 // compiled. Encoded in the 'flags' field. |
| 6789 inline CompilationState compilation_state(); | 6792 inline CompilationState compilation_state(); |
| 6790 inline void set_compilation_state(CompilationState state); | 6793 inline void set_compilation_state(CompilationState state); |
| 6791 | 6794 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6828 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; | 6831 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; |
| 6829 static const int kWrapperOffset = kContextOffset + kPointerSize; | 6832 static const int kWrapperOffset = kContextOffset + kPointerSize; |
| 6830 static const int kTypeOffset = kWrapperOffset + kPointerSize; | 6833 static const int kTypeOffset = kWrapperOffset + kPointerSize; |
| 6831 static const int kLineEndsOffset = kTypeOffset + kPointerSize; | 6834 static const int kLineEndsOffset = kTypeOffset + kPointerSize; |
| 6832 static const int kIdOffset = kLineEndsOffset + kPointerSize; | 6835 static const int kIdOffset = kLineEndsOffset + kPointerSize; |
| 6833 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; | 6836 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; |
| 6834 static const int kEvalFrominstructionsOffsetOffset = | 6837 static const int kEvalFrominstructionsOffsetOffset = |
| 6835 kEvalFromSharedOffset + kPointerSize; | 6838 kEvalFromSharedOffset + kPointerSize; |
| 6836 static const int kFlagsOffset = | 6839 static const int kFlagsOffset = |
| 6837 kEvalFrominstructionsOffsetOffset + kPointerSize; | 6840 kEvalFrominstructionsOffsetOffset + kPointerSize; |
| 6838 static const int kSize = kFlagsOffset + kPointerSize; | 6841 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; |
| 6842 static const int kSize = kSourceUrlOffset + kPointerSize; |
| 6839 | 6843 |
| 6840 private: | 6844 private: |
| 6841 int GetLineNumberWithArray(int code_pos); | 6845 int GetLineNumberWithArray(int code_pos); |
| 6842 | 6846 |
| 6843 // Bit positions in the flags field. | 6847 // Bit positions in the flags field. |
| 6844 static const int kCompilationTypeBit = 0; | 6848 static const int kCompilationTypeBit = 0; |
| 6845 static const int kCompilationStateBit = 1; | 6849 static const int kCompilationStateBit = 1; |
| 6846 static const int kIsSharedCrossOriginBit = 2; | 6850 static const int kIsSharedCrossOriginBit = 2; |
| 6847 | 6851 |
| 6848 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 6852 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
| (...skipping 4226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11075 } else { | 11079 } else { |
| 11076 value &= ~(1 << bit_position); | 11080 value &= ~(1 << bit_position); |
| 11077 } | 11081 } |
| 11078 return value; | 11082 return value; |
| 11079 } | 11083 } |
| 11080 }; | 11084 }; |
| 11081 | 11085 |
| 11082 } } // namespace v8::internal | 11086 } } // namespace v8::internal |
| 11083 | 11087 |
| 11084 #endif // V8_OBJECTS_H_ | 11088 #endif // V8_OBJECTS_H_ |
| OLD | NEW |