mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibWasm: Replace the numeric operation macros with templated functions
This should make debugging and profiling much better, at little to no runtime cost. Also moves off the operator definitions to a separate header, so it should also improve the editing experience quite a bit.
This commit is contained in:
parent
799471d16f
commit
563b402f04
5 changed files with 662 additions and 357 deletions
|
@ -17,7 +17,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
Optional<Label> nth_label(size_t);
|
||||
Optional<Label> nth_label(size_t label)
|
||||
{
|
||||
auto index = nth_label_index(label);
|
||||
if (index.has_value())
|
||||
return m_stack.entries()[index.value()].get<Label>();
|
||||
return {};
|
||||
}
|
||||
Optional<size_t> nth_label_index(size_t);
|
||||
void set_frame(Frame&& frame)
|
||||
{
|
||||
m_current_frame_index = m_stack.size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue