| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_WASM_OBJECTS_H_ | 5 #ifndef V8_WASM_OBJECTS_H_ |
| 6 #define V8_WASM_OBJECTS_H_ | 6 #define V8_WASM_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "src/objects-inl.h" | 8 #include "src/objects-inl.h" |
| 9 #include "src/wasm/managed.h" | 9 #include "src/wasm/managed.h" |
| 10 | 10 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Translate from byte offset in the module to function number and byte offset | 289 // Translate from byte offset in the module to function number and byte offset |
| 290 // within that function, encoded as line and column in the position info. | 290 // within that function, encoded as line and column in the position info. |
| 291 // Returns true if the position is valid inside this module, false otherwise. | 291 // Returns true if the position is valid inside this module, false otherwise. |
| 292 bool GetPositionInfo(uint32_t position, Script::PositionInfo* info); | 292 bool GetPositionInfo(uint32_t position, Script::PositionInfo* info); |
| 293 | 293 |
| 294 // Get the asm.js source position from a byte offset. | 294 // Get the asm.js source position from a byte offset. |
| 295 // Must only be called if the associated wasm object was created from asm.js. | 295 // Must only be called if the associated wasm object was created from asm.js. |
| 296 static int GetAsmJsSourcePosition(Handle<WasmCompiledModule> debug_info, | 296 static int GetAsmJsSourcePosition(Handle<WasmCompiledModule> debug_info, |
| 297 uint32_t func_index, uint32_t byte_offset); | 297 uint32_t func_index, uint32_t byte_offset); |
| 298 | 298 |
| 299 // Get a list of all possible breakpoints within a given range of this module. |
| 300 bool GetPossibleBreakpoints( |
| 301 const DebugInterface::Location& start, |
| 302 const DebugInterface::Location& end, |
| 303 std::vector<DebugInterface::Location>* locations) const; |
| 304 |
| 299 private: | 305 private: |
| 300 void InitId(); | 306 void InitId(); |
| 301 | 307 |
| 302 DISALLOW_IMPLICIT_CONSTRUCTORS(WasmCompiledModule); | 308 DISALLOW_IMPLICIT_CONSTRUCTORS(WasmCompiledModule); |
| 303 }; | 309 }; |
| 304 | 310 |
| 305 // TODO(clemensh): Extend this object for breakpoint support, or remove it. | 311 // TODO(clemensh): Extend this object for breakpoint support, or remove it. |
| 306 class WasmDebugInfo : public FixedArray { | 312 class WasmDebugInfo : public FixedArray { |
| 307 public: | 313 public: |
| 308 enum class Fields { kFieldCount }; | 314 enum class Fields { kFieldCount }; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 }; | 376 }; |
| 371 }; | 377 }; |
| 372 | 378 |
| 373 #undef DECLARE_ACCESSORS | 379 #undef DECLARE_ACCESSORS |
| 374 #undef DECLARE_OPTIONAL_ACCESSORS | 380 #undef DECLARE_OPTIONAL_ACCESSORS |
| 375 | 381 |
| 376 } // namespace internal | 382 } // namespace internal |
| 377 } // namespace v8 | 383 } // namespace v8 |
| 378 | 384 |
| 379 #endif // V8_WASM_OBJECTS_H_ | 385 #endif // V8_WASM_OBJECTS_H_ |
| OLD | NEW |