mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
LibWasm: Implement data.drop instruction
This commit is contained in:
parent
a2f42512c2
commit
53ebe607f8
Notes:
sideshowbarker
2024-07-17 20:58:35 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/53ebe607f8 Pull-request: https://github.com/SerenityOS/serenity/pull/17218 Reviewed-by: https://github.com/alimpfard ✅
@ -696,6 +696,13 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi
|
||||
}
|
||||
return;
|
||||
}
|
||||
// https://webassembly.github.io/spec/core/bikeshed/#exec-data-drop
|
||||
case Instructions::data_drop.value(): {
|
||||
auto data_index = instruction.arguments().get<DataIndex>();
|
||||
auto data_address = configuration.frame().module().datas()[data_index.value()];
|
||||
*configuration.store().get(data_address) = DataInstance({});
|
||||
return;
|
||||
}
|
||||
case Instructions::table_get.value():
|
||||
case Instructions::table_set.value():
|
||||
goto unimplemented;
|
||||
@ -1006,7 +1013,6 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi
|
||||
return unary_operation<double, i64, Operators::SaturatingTruncate<i64>>(configuration);
|
||||
case Instructions::i64_trunc_sat_f64_u.value():
|
||||
return unary_operation<double, i64, Operators::SaturatingTruncate<u64>>(configuration);
|
||||
case Instructions::data_drop.value():
|
||||
case Instructions::table_init.value():
|
||||
case Instructions::elem_drop.value():
|
||||
case Instructions::table_copy.value():
|
||||
|
Loading…
Reference in New Issue
Block a user