[wasm] Minor cleanup in wasm module builder
This addresses a review comment from https://github.com/WebAssembly/spec/pull/1214. R=ahaas@chromium.org Change-Id: Icd473aa16bbf35839556b052271489a2889fe0fb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257229 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68461}
This commit is contained in:
parent
cfb812e3bb
commit
6a546bd967
@ -1119,14 +1119,10 @@ class WasmModuleBuilder {
|
||||
section.emit_u64v(global.init);
|
||||
break;
|
||||
case kWasmF32:
|
||||
section.emit_u8(kExprF32Const);
|
||||
data_view.setFloat32(0, global.init, true);
|
||||
section.emit_bytes(byte_view.subarray(0, 4));
|
||||
section.emit_bytes(wasmF32Const(global.init));
|
||||
break;
|
||||
case kWasmF64:
|
||||
section.emit_u8(kExprF64Const);
|
||||
data_view.setFloat64(0, global.init, true);
|
||||
section.emit_bytes(byte_view);
|
||||
section.emit_bytes(wasmF64Const(global.init));
|
||||
break;
|
||||
case kWasmExternRef:
|
||||
section.emit_u8(kExprRefNull);
|
||||
|
Loading…
Reference in New Issue
Block a user