Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/wasm/wasm-objects.h

Issue 2512833003: [wasm] Translate locations to positions properly (Closed)
Patch Set: Address comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // UTF-8 string. 264 // UTF-8 string.
265 static MaybeHandle<String> GetFunctionName( 265 static MaybeHandle<String> GetFunctionName(
266 Handle<WasmCompiledModule> compiled_module, uint32_t func_index); 266 Handle<WasmCompiledModule> compiled_module, uint32_t func_index);
267 267
268 // Get the raw bytes of the function name of the function identified by the 268 // Get the raw bytes of the function name of the function identified by the
269 // given index. 269 // given index.
270 // Meant to be used for debugging or frame printing. 270 // Meant to be used for debugging or frame printing.
271 // Does not allocate, hence gc-safe. 271 // Does not allocate, hence gc-safe.
272 Vector<const uint8_t> GetRawFunctionName(uint32_t func_index); 272 Vector<const uint8_t> GetRawFunctionName(uint32_t func_index);
273 273
274 // Return the byte offset of the function identified by the given index.
275 // The offset will be relative to the start of the module bytes.
276 // Returns -1 if the function index is invalid.
277 int GetFunctionOffset(uint32_t func_index) const;
278
274 private: 279 private:
275 void InitId(); 280 void InitId();
276 281
277 DISALLOW_IMPLICIT_CONSTRUCTORS(WasmCompiledModule); 282 DISALLOW_IMPLICIT_CONSTRUCTORS(WasmCompiledModule);
278 }; 283 };
279 284
280 class WasmDebugInfo : public FixedArray { 285 class WasmDebugInfo : public FixedArray {
281 public: 286 public:
282 enum class Fields { kFieldCount }; 287 enum class Fields { kFieldCount };
283 288
(...skipping 27 matching lines...) Expand all
311 int func_index, int byte_offset); 316 int func_index, int byte_offset);
312 }; 317 };
313 318
314 #undef DECLARE_ACCESSORS 319 #undef DECLARE_ACCESSORS
315 #undef DECLARE_OPTIONAL_ACCESSORS 320 #undef DECLARE_OPTIONAL_ACCESSORS
316 321
317 } // namespace internal 322 } // namespace internal
318 } // namespace v8 323 } // namespace v8
319 324
320 #endif // V8_WASM_OBJECTS_H_ 325 #endif // V8_WASM_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698