| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <iosfwd> | 8 #include <iosfwd> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3102 static const int kFirstCaptureOffset = kLastInputOffset + kPointerSize; | 3102 static const int kFirstCaptureOffset = kLastInputOffset + kPointerSize; |
| 3103 | 3103 |
| 3104 // Every match info is guaranteed to have enough space to store two captures. | 3104 // Every match info is guaranteed to have enough space to store two captures. |
| 3105 static const int kInitialCaptureIndices = 2; | 3105 static const int kInitialCaptureIndices = 2; |
| 3106 | 3106 |
| 3107 private: | 3107 private: |
| 3108 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMatchInfo); | 3108 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMatchInfo); |
| 3109 }; | 3109 }; |
| 3110 | 3110 |
| 3111 #define FRAME_ARRAY_FIELD_LIST(V) \ | 3111 #define FRAME_ARRAY_FIELD_LIST(V) \ |
| 3112 V(WasmObject, Object) \ | 3112 V(WasmInstance, Object) \ |
| 3113 V(WasmFunctionIndex, Smi) \ | 3113 V(WasmFunctionIndex, Smi) \ |
| 3114 V(Receiver, Object) \ | 3114 V(Receiver, Object) \ |
| 3115 V(Function, JSFunction) \ | 3115 V(Function, JSFunction) \ |
| 3116 V(Code, AbstractCode) \ | 3116 V(Code, AbstractCode) \ |
| 3117 V(Offset, Smi) \ | 3117 V(Offset, Smi) \ |
| 3118 V(Flags, Smi) | 3118 V(Flags, Smi) |
| 3119 | 3119 |
| 3120 // Container object for data collected during simple stack trace captures. | 3120 // Container object for data collected during simple stack trace captures. |
| 3121 class FrameArray : public FixedArray { | 3121 class FrameArray : public FixedArray { |
| 3122 public: | 3122 public: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3137 static const int kIsAsmJsWasmFrame = 1 << 1; | 3137 static const int kIsAsmJsWasmFrame = 1 << 1; |
| 3138 static const int kIsStrict = 1 << 2; | 3138 static const int kIsStrict = 1 << 2; |
| 3139 static const int kForceConstructor = 1 << 3; | 3139 static const int kForceConstructor = 1 << 3; |
| 3140 | 3140 |
| 3141 static Handle<FrameArray> AppendJSFrame(Handle<FrameArray> in, | 3141 static Handle<FrameArray> AppendJSFrame(Handle<FrameArray> in, |
| 3142 Handle<Object> receiver, | 3142 Handle<Object> receiver, |
| 3143 Handle<JSFunction> function, | 3143 Handle<JSFunction> function, |
| 3144 Handle<AbstractCode> code, int offset, | 3144 Handle<AbstractCode> code, int offset, |
| 3145 int flags); | 3145 int flags); |
| 3146 static Handle<FrameArray> AppendWasmFrame(Handle<FrameArray> in, | 3146 static Handle<FrameArray> AppendWasmFrame(Handle<FrameArray> in, |
| 3147 Handle<Object> wasm_object, | 3147 Handle<Object> wasm_instance, |
| 3148 int wasm_function_index, | 3148 int wasm_function_index, |
| 3149 Handle<AbstractCode> code, | 3149 Handle<AbstractCode> code, |
| 3150 int offset, int flags); | 3150 int offset, int flags); |
| 3151 | 3151 |
| 3152 DECLARE_CAST(FrameArray) | 3152 DECLARE_CAST(FrameArray) |
| 3153 | 3153 |
| 3154 private: | 3154 private: |
| 3155 // The underlying fixed array embodies a captured stack trace. Frame i | 3155 // The underlying fixed array embodies a captured stack trace. Frame i |
| 3156 // occupies indices | 3156 // occupies indices |
| 3157 // | 3157 // |
| 3158 // kFirstIndex + 1 + [i * kElementsPerFrame, (i + 1) * kElementsPerFrame[, | 3158 // kFirstIndex + 1 + [i * kElementsPerFrame, (i + 1) * kElementsPerFrame[, |
| 3159 // | 3159 // |
| 3160 // with internal offsets as below: | 3160 // with internal offsets as below: |
| 3161 | 3161 |
| 3162 static const int kWasmObjectOffset = 0; | 3162 static const int kWasmInstanceOffset = 0; |
| 3163 static const int kWasmFunctionIndexOffset = 1; | 3163 static const int kWasmFunctionIndexOffset = 1; |
| 3164 | 3164 |
| 3165 static const int kReceiverOffset = 0; | 3165 static const int kReceiverOffset = 0; |
| 3166 static const int kFunctionOffset = 1; | 3166 static const int kFunctionOffset = 1; |
| 3167 | 3167 |
| 3168 static const int kCodeOffset = 2; | 3168 static const int kCodeOffset = 2; |
| 3169 static const int kOffsetOffset = 3; | 3169 static const int kOffsetOffset = 3; |
| 3170 | 3170 |
| 3171 static const int kFlagsOffset = 4; | 3171 static const int kFlagsOffset = 4; |
| 3172 | 3172 |
| (...skipping 3912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7085 | 7085 |
| 7086 // [flags]: Holds an exciting bitfield. | 7086 // [flags]: Holds an exciting bitfield. |
| 7087 DECL_INT_ACCESSORS(flags) | 7087 DECL_INT_ACCESSORS(flags) |
| 7088 | 7088 |
| 7089 // [source_url]: sourceURL from magic comment | 7089 // [source_url]: sourceURL from magic comment |
| 7090 DECL_ACCESSORS(source_url, Object) | 7090 DECL_ACCESSORS(source_url, Object) |
| 7091 | 7091 |
| 7092 // [source_mapping_url]: sourceMappingURL magic comment | 7092 // [source_mapping_url]: sourceMappingURL magic comment |
| 7093 DECL_ACCESSORS(source_mapping_url, Object) | 7093 DECL_ACCESSORS(source_mapping_url, Object) |
| 7094 | 7094 |
| 7095 // [wasm_object]: the wasm object this script belongs to. | 7095 // [wasm_instance]: the wasm instance this script belongs to. |
| 7096 // This must only be called if the type of this script is TYPE_WASM. | 7096 // This must only be called if the type of this script is TYPE_WASM. |
| 7097 DECL_ACCESSORS(wasm_object, JSObject) | 7097 DECL_ACCESSORS(wasm_instance, JSObject) |
| 7098 | 7098 |
| 7099 // [wasm_function_index]: the wasm function index this script belongs to. | 7099 // [wasm_function_index]: the wasm function index this script belongs to. |
| 7100 // This must only be called if the type of this script is TYPE_WASM. | 7100 // This must only be called if the type of this script is TYPE_WASM. |
| 7101 DECL_INT_ACCESSORS(wasm_function_index) | 7101 DECL_INT_ACCESSORS(wasm_function_index) |
| 7102 | 7102 |
| 7103 // [compilation_type]: how the the script was compiled. Encoded in the | 7103 // [compilation_type]: how the the script was compiled. Encoded in the |
| 7104 // 'flags' field. | 7104 // 'flags' field. |
| 7105 inline CompilationType compilation_type(); | 7105 inline CompilationType compilation_type(); |
| 7106 inline void set_compilation_type(CompilationType type); | 7106 inline void set_compilation_type(CompilationType type); |
| 7107 | 7107 |
| (...skipping 4622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11730 } | 11730 } |
| 11731 return value; | 11731 return value; |
| 11732 } | 11732 } |
| 11733 }; | 11733 }; |
| 11734 | 11734 |
| 11735 | 11735 |
| 11736 } // NOLINT, false-positive due to second-order macros. | 11736 } // NOLINT, false-positive due to second-order macros. |
| 11737 } // NOLINT, false-positive due to second-order macros. | 11737 } // NOLINT, false-positive due to second-order macros. |
| 11738 | 11738 |
| 11739 #endif // V8_OBJECTS_H_ | 11739 #endif // V8_OBJECTS_H_ |
| OLD | NEW |