File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -102,15 +102,6 @@ void ExecutionContext::operator delete(void* ptr)
102102 s_execution_context_allocator->deallocate (ptr, execution_context->registers_and_constants_and_locals_and_arguments_count );
103103}
104104
105- ExecutionContext::ExecutionContext (u32 registers_and_constants_and_locals_count, u32 arguments_count)
106- {
107- registers_and_constants_and_locals_and_arguments_count = registers_and_constants_and_locals_count + arguments_count;
108- auto * registers_and_constants_and_locals_and_arguments = this ->registers_and_constants_and_locals_and_arguments ();
109- for (size_t i = 0 ; i < registers_and_constants_and_locals_count; ++i)
110- registers_and_constants_and_locals_and_arguments[i] = js_special_empty_value ();
111- arguments = { registers_and_constants_and_locals_and_arguments + registers_and_constants_and_locals_count, arguments_count };
112- }
113-
114105NonnullOwnPtr<ExecutionContext> ExecutionContext::copy () const
115106{
116107 auto copy = create (registers_and_constants_and_locals_and_arguments_count, arguments.size ());
Original file line number Diff line number Diff line change @@ -67,7 +67,14 @@ struct JS_API ExecutionContext {
6767 friend class ExecutionContextAllocator ;
6868
6969public:
70- ExecutionContext (u32 registers_and_constants_and_locals_count, u32 arguments_count);
70+ ALWAYS_INLINE ExecutionContext (u32 registers_and_constants_and_locals_count, u32 arguments_count)
71+ {
72+ registers_and_constants_and_locals_and_arguments_count = registers_and_constants_and_locals_count + arguments_count;
73+ auto * registers_and_constants_and_locals_and_arguments = this ->registers_and_constants_and_locals_and_arguments ();
74+ for (size_t i = 0 ; i < registers_and_constants_and_locals_count; ++i)
75+ registers_and_constants_and_locals_and_arguments[i] = js_special_empty_value ();
76+ arguments = { registers_and_constants_and_locals_and_arguments + registers_and_constants_and_locals_count, arguments_count };
77+ }
7178
7279 GC::Ptr<ExecutionContextRareData> rare_data () const { return m_rare_data; }
7380 GC::Ref<ExecutionContextRareData> ensure_rare_data ();
You can’t perform that action at this time.
0 commit comments