mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 13:39:25 +00:00
LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16
This has quite a lot of fall out. But the majority of it is just type or UDL substitution, where the changes just fall through to other function calls. By changing property key storage to UTF-16, the main affected areas are: * NativeFunction names must now be UTF-16 * Bytecode identifiers must now be UTF-16 * Module/binding names must now be UTF-16
This commit is contained in:
parent
cd276235d7
commit
0efa98a57a
Notes:
github-actions[bot]
2025-08-05 11:08:30 +00:00
Author: https://github.com/trflynn89
Commit: 0efa98a57a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5698
131 changed files with 766 additions and 726 deletions
|
@ -22,11 +22,11 @@ public:
|
|||
// in Table 18 and share the same specifications for all of those methods except for
|
||||
// GetBindingValue, DeleteBinding, HasThisBinding and GetThisBinding.
|
||||
// In addition, module Environment Records support the methods listed in Table 24.
|
||||
virtual ThrowCompletionOr<Value> get_binding_value(VM&, FlyString const& name, bool strict) override;
|
||||
virtual ThrowCompletionOr<bool> delete_binding(VM&, FlyString const& name) override;
|
||||
virtual ThrowCompletionOr<Value> get_binding_value(VM&, Utf16FlyString const& name, bool strict) override;
|
||||
virtual ThrowCompletionOr<bool> delete_binding(VM&, Utf16FlyString const& name) override;
|
||||
virtual bool has_this_binding() const final { return true; }
|
||||
virtual ThrowCompletionOr<Value> get_this_binding(VM&) const final;
|
||||
ThrowCompletionOr<void> create_import_binding(FlyString name, Module* module, FlyString binding_name);
|
||||
ThrowCompletionOr<void> create_import_binding(Utf16FlyString name, Module* module, Utf16FlyString binding_name);
|
||||
|
||||
private:
|
||||
explicit ModuleEnvironment(Environment* outer_environment);
|
||||
|
@ -34,13 +34,13 @@ private:
|
|||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
struct IndirectBinding {
|
||||
FlyString name;
|
||||
Utf16FlyString name;
|
||||
GC::Ptr<Module> module;
|
||||
FlyString binding_name;
|
||||
Utf16FlyString binding_name;
|
||||
};
|
||||
IndirectBinding const* get_indirect_binding(FlyString const& name) const;
|
||||
IndirectBinding const* get_indirect_binding(Utf16FlyString const& name) const;
|
||||
|
||||
virtual Optional<BindingAndIndex> find_binding_and_index(FlyString const& name) const override;
|
||||
virtual Optional<BindingAndIndex> find_binding_and_index(Utf16FlyString const& name) const override;
|
||||
|
||||
// FIXME: Since we always access this via the name this could be a map.
|
||||
Vector<IndirectBinding> m_indirect_bindings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue