[Wasm] Apply recent changes in TFR proposal and update v8
Type index immediate was added to call_ref and return_call_ref instructions. More details here https://github.com/WebAssembly/function-references/pull/76
This commit is contained in:
+2
-3
@@ -396,7 +396,7 @@ class BodyGenerator(
|
||||
|
||||
body.buildStructGet(context.referenceGcType(klass.symbol), WasmSymbol(0))
|
||||
body.buildStructGet(context.referenceVTableGcType(klass.symbol), WasmSymbol(vfSlot))
|
||||
body.buildInstr(WasmOp.CALL_REF)
|
||||
body.buildInstr(WasmOp.CALL_REF, WasmImmediate.TypeIdx(context.referenceFunctionType(function.symbol)))
|
||||
} else {
|
||||
val symbol = klass.symbol
|
||||
if (symbol in hierarchyDisjointUnions) {
|
||||
@@ -412,7 +412,7 @@ class BodyGenerator(
|
||||
.indexOfFirst { it.function == function }
|
||||
|
||||
body.buildStructGet(context.referenceVTableGcType(symbol), WasmSymbol(vfSlot))
|
||||
body.buildInstr(WasmOp.CALL_REF)
|
||||
body.buildInstr(WasmOp.CALL_REF, WasmImmediate.TypeIdx(context.referenceFunctionType(function.symbol)))
|
||||
} else {
|
||||
body.buildUnreachable()
|
||||
}
|
||||
@@ -877,4 +877,3 @@ class BodyGenerator(
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,4 +64,4 @@ versions.protobuf-relocated=2.6.1-1
|
||||
versions.r8=2.2.64
|
||||
versions.robolectric=4.0
|
||||
versions.nodejs=18.12.1
|
||||
versions.v8=10.7.157
|
||||
versions.v8=10.9.130
|
||||
|
||||
+3
-1
@@ -25,7 +25,9 @@ open class D8RootExtension(@Transient val rootProject: Project) : ConfigurationP
|
||||
|
||||
var installationPath by Property(gradleHome.resolve("d8"))
|
||||
var downloadBaseUrl by Property("https://storage.googleapis.com/chromium-v8/official/canary/")
|
||||
var version by Property("10.2.9")
|
||||
|
||||
// Latest version number could be found here https://storage.googleapis.com/chromium-v8/official/canary/v8-linux64-rel-latest.json
|
||||
var version by Property("10.9.130")
|
||||
var edition by Property("rel") // rel or dbg
|
||||
|
||||
val setupTaskProvider: TaskProvider<out Copy>
|
||||
|
||||
@@ -338,8 +338,8 @@ enum class WasmOp(
|
||||
// ============================================================
|
||||
// Typed Function References
|
||||
// WIP: https://github.com/WebAssembly/function-references
|
||||
CALL_REF("call_ref", 0x14),
|
||||
RETURN_CALL_REF("return_call_ref", 0x15),
|
||||
CALL_REF("call_ref", 0x14, TYPE_IDX),
|
||||
RETURN_CALL_REF("return_call_ref", 0x15, TYPE_IDX),
|
||||
REF_AS_NOT_NULL("ref.as_non_null", 0xD3),
|
||||
BR_ON_NULL("br_on_null", 0xD4, LABEL_IDX),
|
||||
BR_ON_NON_NULL("br_on_non_null", 0xD6, LABEL_IDX),
|
||||
|
||||
Reference in New Issue
Block a user