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

Side by Side Diff: src/wasm/wasm-function-name-table.h

Issue 2057523002: [wasm] Refactor function name table and lookup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix gc issue Created 4 years, 6 months 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/messages.cc ('k') | src/wasm/wasm-function-name-table.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_FUNCTION_NAME_TABLE_H_ 5 #ifndef V8_WASM_FUNCTION_NAME_TABLE_H_
6 #define V8_WASM_FUNCTION_NAME_TABLE_H_ 6 #define V8_WASM_FUNCTION_NAME_TABLE_H_
7 7
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 namespace wasm { 13 namespace wasm {
14 14
15 // Forward declarations for some WASM data structures. 15 // Forward declarations for some WASM data structures.
16 struct WasmModule; 16 struct WasmModule;
17 17
18 // Encode all function names of the WasmModule into one ByteArray. 18 // Encode all function names of the WasmModule into one ByteArray.
19 // Returns undefined if the array length would not fit in an integer value. 19 Handle<ByteArray> BuildFunctionNamesTable(Isolate* isolate,
20 Handle<Object> BuildFunctionNamesTable(Isolate* isolate, 20 const WasmModule* module);
21 const WasmModule* module);
22 21
23 // Extract the function name for the given func_index from the function name 22 // Extract the function name for the given func_index from the function name
24 // table. 23 // table.
25 // Returns a null handle if the respective function is unnamed (not to be 24 // Returns a null handle if the respective function is unnamed (not to be
26 // confused with empty names) or the function name is not a valid UTF-8 string. 25 // confused with empty names) or the function name is not a valid UTF-8 string.
27 MaybeHandle<String> GetWasmFunctionNameFromTable( 26 MaybeHandle<String> GetWasmFunctionNameFromTable(
28 Handle<ByteArray> wasm_names_table, uint32_t func_index); 27 Handle<ByteArray> wasm_names_table, uint32_t func_index);
29 28
30 } // namespace wasm 29 } // namespace wasm
31 } // namespace internal 30 } // namespace internal
32 } // namespace v8 31 } // namespace v8
33 32
34 #endif // V8_WASM_FUNCTION_NAME_TABLE_H_ 33 #endif // V8_WASM_FUNCTION_NAME_TABLE_H_
OLDNEW
« no previous file with comments | « src/messages.cc ('k') | src/wasm/wasm-function-name-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698