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 6909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6920 // function from which eval was called. | 6920 // function from which eval was called. |
6921 DECL_ACCESSORS(eval_from_shared, Object) | 6921 DECL_ACCESSORS(eval_from_shared, Object) |
6922 | 6922 |
6923 // [eval_from_instructions_offset]: the instruction offset in the code for the | 6923 // [eval_from_instructions_offset]: the instruction offset in the code for the |
6924 // function from which eval was called where eval was called. | 6924 // function from which eval was called where eval was called. |
6925 DECL_ACCESSORS(eval_from_instructions_offset, Smi) | 6925 DECL_ACCESSORS(eval_from_instructions_offset, Smi) |
6926 | 6926 |
6927 // [flags]: Holds an exciting bitfield. | 6927 // [flags]: Holds an exciting bitfield. |
6928 DECL_ACCESSORS(flags, Smi) | 6928 DECL_ACCESSORS(flags, Smi) |
6929 | 6929 |
| 6930 // [source_url]: sourceURL from magic comment |
| 6931 DECL_ACCESSORS(source_url, Object) |
| 6932 |
| 6933 // [source_url]: sourceMappingURL magic comment |
| 6934 DECL_ACCESSORS(source_mapping_url, Object) |
| 6935 |
6930 // [compilation_type]: how the the script was compiled. Encoded in the | 6936 // [compilation_type]: how the the script was compiled. Encoded in the |
6931 // 'flags' field. | 6937 // 'flags' field. |
6932 inline CompilationType compilation_type(); | 6938 inline CompilationType compilation_type(); |
6933 inline void set_compilation_type(CompilationType type); | 6939 inline void set_compilation_type(CompilationType type); |
6934 | 6940 |
6935 // [compilation_state]: determines whether the script has already been | 6941 // [compilation_state]: determines whether the script has already been |
6936 // compiled. Encoded in the 'flags' field. | 6942 // compiled. Encoded in the 'flags' field. |
6937 inline CompilationState compilation_state(); | 6943 inline CompilationState compilation_state(); |
6938 inline void set_compilation_state(CompilationState state); | 6944 inline void set_compilation_state(CompilationState state); |
6939 | 6945 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6976 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; | 6982 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; |
6977 static const int kWrapperOffset = kContextOffset + kPointerSize; | 6983 static const int kWrapperOffset = kContextOffset + kPointerSize; |
6978 static const int kTypeOffset = kWrapperOffset + kPointerSize; | 6984 static const int kTypeOffset = kWrapperOffset + kPointerSize; |
6979 static const int kLineEndsOffset = kTypeOffset + kPointerSize; | 6985 static const int kLineEndsOffset = kTypeOffset + kPointerSize; |
6980 static const int kIdOffset = kLineEndsOffset + kPointerSize; | 6986 static const int kIdOffset = kLineEndsOffset + kPointerSize; |
6981 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; | 6987 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; |
6982 static const int kEvalFrominstructionsOffsetOffset = | 6988 static const int kEvalFrominstructionsOffsetOffset = |
6983 kEvalFromSharedOffset + kPointerSize; | 6989 kEvalFromSharedOffset + kPointerSize; |
6984 static const int kFlagsOffset = | 6990 static const int kFlagsOffset = |
6985 kEvalFrominstructionsOffsetOffset + kPointerSize; | 6991 kEvalFrominstructionsOffsetOffset + kPointerSize; |
6986 static const int kSize = kFlagsOffset + kPointerSize; | 6992 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; |
| 6993 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; |
| 6994 static const int kSize = kSourceMappingUrlOffset + kPointerSize; |
6987 | 6995 |
6988 private: | 6996 private: |
6989 int GetLineNumberWithArray(int code_pos); | 6997 int GetLineNumberWithArray(int code_pos); |
6990 | 6998 |
6991 // Bit positions in the flags field. | 6999 // Bit positions in the flags field. |
6992 static const int kCompilationTypeBit = 0; | 7000 static const int kCompilationTypeBit = 0; |
6993 static const int kCompilationStateBit = 1; | 7001 static const int kCompilationStateBit = 1; |
6994 static const int kIsSharedCrossOriginBit = 2; | 7002 static const int kIsSharedCrossOriginBit = 2; |
6995 | 7003 |
6996 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 7004 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
(...skipping 4253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11250 } else { | 11258 } else { |
11251 value &= ~(1 << bit_position); | 11259 value &= ~(1 << bit_position); |
11252 } | 11260 } |
11253 return value; | 11261 return value; |
11254 } | 11262 } |
11255 }; | 11263 }; |
11256 | 11264 |
11257 } } // namespace v8::internal | 11265 } } // namespace v8::internal |
11258 | 11266 |
11259 #endif // V8_OBJECTS_H_ | 11267 #endif // V8_OBJECTS_H_ |
OLD | NEW |