Commit 6c830b48 authored by Eric Holk's avatar Eric Holk Committed by Commit Bot

[wasm cleanup] Use const in more places

Bug: v8:7109
Change-Id: Ia29472641c9906433749d55269e15a32c8984355
Reviewed-on: https://chromium-review.googlesource.com/804213Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49806}
parent d3a8dec2
......@@ -109,8 +109,8 @@ void UnpackAndRegisterProtectedInstructionsGC(Isolate* isolate,
}
}
void UnpackAndRegisterProtectedInstructions(Isolate* isolate,
wasm::NativeModule* native_module) {
void UnpackAndRegisterProtectedInstructions(
Isolate* isolate, const wasm::NativeModule* native_module) {
DisallowHeapAllocation no_gc;
for (uint32_t i = native_module->num_imported_functions(),
......@@ -171,7 +171,7 @@ WasmFunction* GetWasmFunctionForExport(Isolate* isolate,
}
void UpdateDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables,
int index, WasmFunction* function,
int index, const WasmFunction* function,
Handle<Object> code_or_foreign) {
DCHECK_EQ(0, dispatch_tables->length() % 4);
for (int i = 0; i < dispatch_tables->length(); i += 4) {
......
......@@ -247,7 +247,7 @@ struct WasmFunctionName {
: function_(function), name_(name) {}
const WasmFunction* function_;
WasmName name_;
const WasmName name_;
};
std::ostream& operator<<(std::ostream& os, const WasmFunctionName& name);
......@@ -285,14 +285,14 @@ Handle<FixedArray> DecodeLocalNames(Isolate*, Handle<WasmCompiledModule>);
WasmFunction* GetWasmFunctionForExport(Isolate* isolate, Handle<Object> target);
void UpdateDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables,
int index, WasmFunction* function,
int index, const WasmFunction* function,
Handle<Object> code_or_foreign);
void UnpackAndRegisterProtectedInstructionsGC(Isolate* isolate,
Handle<FixedArray> code_table);
void UnpackAndRegisterProtectedInstructions(Isolate* isolate,
wasm::NativeModule* native_module);
void UnpackAndRegisterProtectedInstructions(
Isolate* isolate, const wasm::NativeModule* native_module);
const char* ExternalKindName(WasmExternalKind);
......@@ -328,7 +328,7 @@ class TruncatedUserString {
private:
const char* start_;
int length_;
const int length_;
char buffer_[kMaxLen];
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment