mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibWasm: Some more performance stuff (#8812)
* wasm: Don't try to print the function results if it traps * LibWasm: Inline some very hot functions These are mostly pretty small functions too, and they were about ~10% of runtime. * LibWasm+Everywhere: Make the instruction count limit configurable ...and enable it for LibWeb and test-wasm. Note that `wasm` will not be limited by this. * LibWasm: Remove a useless use of ScopeGuard There are no multiple exit paths in that function, so we can just put the ending logic right at the end of the function instead.
This commit is contained in:
parent
3099a6bf2a
commit
35394dbfaa
8 changed files with 49 additions and 27 deletions
|
@ -61,6 +61,9 @@ public:
|
|||
Result call(Interpreter&, FunctionAddress, Vector<Value> arguments);
|
||||
Result execute(Interpreter&);
|
||||
|
||||
void enable_instruction_count_limit() { m_should_limit_instruction_count = true; }
|
||||
bool should_limit_instruction_count() const { return m_should_limit_instruction_count; }
|
||||
|
||||
void dump_stack();
|
||||
|
||||
private:
|
||||
|
@ -69,6 +72,7 @@ private:
|
|||
Stack m_stack;
|
||||
size_t m_depth { 0 };
|
||||
InstructionPointer m_ip;
|
||||
bool m_should_limit_instruction_count { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue