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 6893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6904 // function from which eval was called. | 6904 // function from which eval was called. |
6905 DECL_ACCESSORS(eval_from_shared, Object) | 6905 DECL_ACCESSORS(eval_from_shared, Object) |
6906 | 6906 |
6907 // [eval_from_instructions_offset]: the instruction offset in the code for the | 6907 // [eval_from_instructions_offset]: the instruction offset in the code for the |
6908 // function from which eval was called where eval was called. | 6908 // function from which eval was called where eval was called. |
6909 DECL_ACCESSORS(eval_from_instructions_offset, Smi) | 6909 DECL_ACCESSORS(eval_from_instructions_offset, Smi) |
6910 | 6910 |
6911 // [flags]: Holds an exciting bitfield. | 6911 // [flags]: Holds an exciting bitfield. |
6912 DECL_ACCESSORS(flags, Smi) | 6912 DECL_ACCESSORS(flags, Smi) |
6913 | 6913 |
| 6914 // [source_url]: sourceURL from magic comment |
| 6915 DECL_ACCESSORS(source_url, Object) |
| 6916 |
| 6917 // [source_url]: sourceMappingURL magic comment |
| 6918 DECL_ACCESSORS(source_mapping_url, Object) |
| 6919 |
6914 // [compilation_type]: how the the script was compiled. Encoded in the | 6920 // [compilation_type]: how the the script was compiled. Encoded in the |
6915 // 'flags' field. | 6921 // 'flags' field. |
6916 inline CompilationType compilation_type(); | 6922 inline CompilationType compilation_type(); |
6917 inline void set_compilation_type(CompilationType type); | 6923 inline void set_compilation_type(CompilationType type); |
6918 | 6924 |
6919 // [compilation_state]: determines whether the script has already been | 6925 // [compilation_state]: determines whether the script has already been |
6920 // compiled. Encoded in the 'flags' field. | 6926 // compiled. Encoded in the 'flags' field. |
6921 inline CompilationState compilation_state(); | 6927 inline CompilationState compilation_state(); |
6922 inline void set_compilation_state(CompilationState state); | 6928 inline void set_compilation_state(CompilationState state); |
6923 | 6929 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6960 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; | 6966 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; |
6961 static const int kWrapperOffset = kContextOffset + kPointerSize; | 6967 static const int kWrapperOffset = kContextOffset + kPointerSize; |
6962 static const int kTypeOffset = kWrapperOffset + kPointerSize; | 6968 static const int kTypeOffset = kWrapperOffset + kPointerSize; |
6963 static const int kLineEndsOffset = kTypeOffset + kPointerSize; | 6969 static const int kLineEndsOffset = kTypeOffset + kPointerSize; |
6964 static const int kIdOffset = kLineEndsOffset + kPointerSize; | 6970 static const int kIdOffset = kLineEndsOffset + kPointerSize; |
6965 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; | 6971 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; |
6966 static const int kEvalFrominstructionsOffsetOffset = | 6972 static const int kEvalFrominstructionsOffsetOffset = |
6967 kEvalFromSharedOffset + kPointerSize; | 6973 kEvalFromSharedOffset + kPointerSize; |
6968 static const int kFlagsOffset = | 6974 static const int kFlagsOffset = |
6969 kEvalFrominstructionsOffsetOffset + kPointerSize; | 6975 kEvalFrominstructionsOffsetOffset + kPointerSize; |
6970 static const int kSize = kFlagsOffset + kPointerSize; | 6976 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; |
| 6977 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; |
| 6978 static const int kSize = kSourceMappingUrlOffset + kPointerSize; |
6971 | 6979 |
6972 private: | 6980 private: |
6973 int GetLineNumberWithArray(int code_pos); | 6981 int GetLineNumberWithArray(int code_pos); |
6974 | 6982 |
6975 // Bit positions in the flags field. | 6983 // Bit positions in the flags field. |
6976 static const int kCompilationTypeBit = 0; | 6984 static const int kCompilationTypeBit = 0; |
6977 static const int kCompilationStateBit = 1; | 6985 static const int kCompilationStateBit = 1; |
6978 static const int kIsSharedCrossOriginBit = 2; | 6986 static const int kIsSharedCrossOriginBit = 2; |
6979 | 6987 |
6980 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 6988 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
(...skipping 4207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11188 } else { | 11196 } else { |
11189 value &= ~(1 << bit_position); | 11197 value &= ~(1 << bit_position); |
11190 } | 11198 } |
11191 return value; | 11199 return value; |
11192 } | 11200 } |
11193 }; | 11201 }; |
11194 | 11202 |
11195 } } // namespace v8::internal | 11203 } } // namespace v8::internal |
11196 | 11204 |
11197 #endif // V8_OBJECTS_H_ | 11205 #endif // V8_OBJECTS_H_ |
OLD | NEW |