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 6880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6891 // function from which eval was called. | 6891 // function from which eval was called. |
6892 DECL_ACCESSORS(eval_from_shared, Object) | 6892 DECL_ACCESSORS(eval_from_shared, Object) |
6893 | 6893 |
6894 // [eval_from_instructions_offset]: the instruction offset in the code for the | 6894 // [eval_from_instructions_offset]: the instruction offset in the code for the |
6895 // function from which eval was called where eval was called. | 6895 // function from which eval was called where eval was called. |
6896 DECL_ACCESSORS(eval_from_instructions_offset, Smi) | 6896 DECL_ACCESSORS(eval_from_instructions_offset, Smi) |
6897 | 6897 |
6898 // [flags]: Holds an exciting bitfield. | 6898 // [flags]: Holds an exciting bitfield. |
6899 DECL_ACCESSORS(flags, Smi) | 6899 DECL_ACCESSORS(flags, Smi) |
6900 | 6900 |
| 6901 // [source_url]: sourceURL from magic comment |
| 6902 DECL_ACCESSORS(source_url, Object) |
| 6903 |
| 6904 // [source_url]: sourceMappingURL magic comment |
| 6905 DECL_ACCESSORS(source_mapping_url, Object) |
| 6906 |
6901 // [compilation_type]: how the the script was compiled. Encoded in the | 6907 // [compilation_type]: how the the script was compiled. Encoded in the |
6902 // 'flags' field. | 6908 // 'flags' field. |
6903 inline CompilationType compilation_type(); | 6909 inline CompilationType compilation_type(); |
6904 inline void set_compilation_type(CompilationType type); | 6910 inline void set_compilation_type(CompilationType type); |
6905 | 6911 |
6906 // [compilation_state]: determines whether the script has already been | 6912 // [compilation_state]: determines whether the script has already been |
6907 // compiled. Encoded in the 'flags' field. | 6913 // compiled. Encoded in the 'flags' field. |
6908 inline CompilationState compilation_state(); | 6914 inline CompilationState compilation_state(); |
6909 inline void set_compilation_state(CompilationState state); | 6915 inline void set_compilation_state(CompilationState state); |
6910 | 6916 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6947 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; | 6953 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; |
6948 static const int kWrapperOffset = kContextOffset + kPointerSize; | 6954 static const int kWrapperOffset = kContextOffset + kPointerSize; |
6949 static const int kTypeOffset = kWrapperOffset + kPointerSize; | 6955 static const int kTypeOffset = kWrapperOffset + kPointerSize; |
6950 static const int kLineEndsOffset = kTypeOffset + kPointerSize; | 6956 static const int kLineEndsOffset = kTypeOffset + kPointerSize; |
6951 static const int kIdOffset = kLineEndsOffset + kPointerSize; | 6957 static const int kIdOffset = kLineEndsOffset + kPointerSize; |
6952 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; | 6958 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; |
6953 static const int kEvalFrominstructionsOffsetOffset = | 6959 static const int kEvalFrominstructionsOffsetOffset = |
6954 kEvalFromSharedOffset + kPointerSize; | 6960 kEvalFromSharedOffset + kPointerSize; |
6955 static const int kFlagsOffset = | 6961 static const int kFlagsOffset = |
6956 kEvalFrominstructionsOffsetOffset + kPointerSize; | 6962 kEvalFrominstructionsOffsetOffset + kPointerSize; |
6957 static const int kSize = kFlagsOffset + kPointerSize; | 6963 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; |
| 6964 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; |
| 6965 static const int kSize = kSourceMappingUrlOffset + kPointerSize; |
6958 | 6966 |
6959 private: | 6967 private: |
6960 int GetLineNumberWithArray(int code_pos); | 6968 int GetLineNumberWithArray(int code_pos); |
6961 | 6969 |
6962 // Bit positions in the flags field. | 6970 // Bit positions in the flags field. |
6963 static const int kCompilationTypeBit = 0; | 6971 static const int kCompilationTypeBit = 0; |
6964 static const int kCompilationStateBit = 1; | 6972 static const int kCompilationStateBit = 1; |
6965 static const int kIsSharedCrossOriginBit = 2; | 6973 static const int kIsSharedCrossOriginBit = 2; |
6966 | 6974 |
6967 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 6975 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
(...skipping 4206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11174 } else { | 11182 } else { |
11175 value &= ~(1 << bit_position); | 11183 value &= ~(1 << bit_position); |
11176 } | 11184 } |
11177 return value; | 11185 return value; |
11178 } | 11186 } |
11179 }; | 11187 }; |
11180 | 11188 |
11181 } } // namespace v8::internal | 11189 } } // namespace v8::internal |
11182 | 11190 |
11183 #endif // V8_OBJECTS_H_ | 11191 #endif // V8_OBJECTS_H_ |
OLD | NEW |