mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
LibJS: Remove the concept of bytecode optimization levels
While this would be useful in the future for implementing a multi-tiered optimization strategy, currently a binary on/off is enough for us. This removes the confusingly on-by-default `OptimizationLevel::None` option which made the optimization pipeline a no-op even if `Bytecode::Interpreter::set_optimizations_enabled` had been called. Fixes #15982
This commit is contained in:
parent
e012565898
commit
cc9ec6693b
2 changed files with 16 additions and 36 deletions
|
@ -86,13 +86,7 @@ public:
|
|||
size_t pc() const;
|
||||
DeprecatedString debug_position() const;
|
||||
|
||||
enum class OptimizationLevel {
|
||||
None,
|
||||
Optimize,
|
||||
__Count,
|
||||
Default = None,
|
||||
};
|
||||
static Bytecode::PassManager& optimization_pipeline(OptimizationLevel = OptimizationLevel::Default);
|
||||
static Bytecode::PassManager& optimization_pipeline();
|
||||
|
||||
VM::InterpreterExecutionScope ast_interpreter_scope(Realm&);
|
||||
|
||||
|
@ -109,8 +103,6 @@ private:
|
|||
|
||||
MarkedVector<Value>& registers() { return window().registers; }
|
||||
|
||||
static AK::Array<OwnPtr<PassManager>, static_cast<UnderlyingType<Interpreter::OptimizationLevel>>(Interpreter::OptimizationLevel::__Count)> s_optimization_pipelines;
|
||||
|
||||
VM& m_vm;
|
||||
Vector<Variant<NonnullOwnPtr<RegisterWindow>, RegisterWindow*>> m_register_windows;
|
||||
Optional<BasicBlock const*> m_pending_jump;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue