Skip to content

Commit 0f7eac3

Browse files
committed
Rename wasm_util -> bytecode_util
Signed-off-by: Takeshi Yoneda <[email protected]>
1 parent d807f06 commit 0f7eac3

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed
95.8 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "src/common/wasm_util.h"
15+
#include "src/common/bytecode_util.h"
1616
#include <cstring>
1717

1818
namespace proxy_wasm {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class BytecodeUtil {
4545
* the function name subsection in "name" custom section.
4646
* See https://webassembly.github.io/spec/core/appendix/custom.html#binary-funcnamesec for detail.
4747
* @param bytecode is the target bytecode.
48-
* @param ret the reference to store map from function indexes to function names.
48+
* @param ret is the reference to store map from function indexes to function names.
4949
* @return indicates whether parsing succeeded or not.
5050
*/
5151
static bool getFunctionNameIndex(std::string_view bytecode,
@@ -54,7 +54,7 @@ class BytecodeUtil {
5454
/**
5555
* getStrippedSource gets Wasm module without Custom Sections to save some memory in workers.
5656
* @param bytecode is the original bytecode.
57-
* @param ret the reference to the stripped bytecode.
57+
* @param ret is the reference to the stripped bytecode.
5858
* @return indicates whether parsing succeeded or not.
5959
*/
6060
static bool getStrippedSource(std::string_view bytecode, std::string &ret);

src/v8/v8.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <utility>
2626
#include <vector>
2727

28-
#include "src/common/wasm_util.h"
28+
#include "src/common/bytecode_util.h"
2929

3030
#include "v8.h"
3131
#include "v8-version.h"
@@ -290,7 +290,7 @@ bool V8::load(const std::string &code, bool allow_precompiled) {
290290
wasm::vec<byte_t> code_vec = wasm::vec<byte_t>::invalid();
291291
if (stripped.empty()) {
292292
// Use the original bytecode.
293-
code_vec = wasm::vec<byte_t>::make(code.size(), (char *)(code.data()));
293+
code_vec = wasm::vec<byte_t>::make(code.size(), code.data());
294294
} else {
295295
// Othewise use the stripped bytecode.
296296
code_vec = wasm::vec<byte_t>::make(stripped.size(), stripped.data());

src/wasmtime/wasmtime.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <vector>
2626

2727
#include "include/proxy-wasm/wasm_vm.h"
28-
#include "src/common/wasm_util.h"
28+
#include "src/common/bytecode_util.h"
2929
#include "src/wasmtime/types.h"
3030

3131
#include "wasmtime/include/wasm.h"

src/wavm/wavm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <utility>
2828
#include <vector>
2929

30-
#include "src/common/wasm_util.h"
30+
#include "src/common/bytecode_util.h"
3131

3232
#include "WAVM/IR/Module.h"
3333
#include "WAVM/IR/Operators.h"

test/common/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ load("@rules_cc//cc:defs.bzl", "cc_test")
22
load("@proxy_wasm_cpp_host//bazel:variables.bzl", "COPTS")
33

44
cc_test(
5-
name = "wasm_util_test",
6-
srcs = ["wasm_util_test.cc"],
5+
name = "bytecode_util_test",
6+
srcs = ["bytecode_util_test.cc"],
77
copts = COPTS,
88
data = [
99
"//test/test_data:abi_export.wasm",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "src/common/wasm_util.h"
15+
#include "src/common/bytecode_util.h"
1616

1717
#include <fstream>
1818
#include <iostream>

0 commit comments

Comments
 (0)