[squirrelfish] inlining scopechainnode into scope objects
Andy Wingo
wingo at igalia.com
Mon Apr 30 09:46:54 PDT 2012
On Thu 26 Apr 2012 11:59, Andy Wingo <wingo at igalia.com> writes:
> As we discussed last week, it could be a good idea to inline
> ScopeChainNode into scope objects, effectively giving scope objects a
> pointer to the next object in the chain.
"With" objects would be on the
> chain via a wrapper object. This way we remove an indirection on
> accessing scopes and an allocation when creating them. I'm giving it a
> go, as it make some block stuff easier.
>
> So far so good. The current class hierarchy looks like:
>
> JSScopeObject: A new base class, holding the next pointer, global
> object, and global this
>
> + JSDynamicScope: A new class, wrapping "with" objects in the scope.
>
> + JSVariableObject
>
> + JSStaticScopeObject
>
> + JSActivation
>
> + JSGlobalObject
>
> Anyway, now my question: what is the deal with the "globalThis" object?
> Specifically, does it exist in a 1-to-1 relationship with the global
> object? If so, then it's fine to have globalThis be a (possibly
> settable) field of JSGlobalObject. If not, I have to rethink this plan.
>
> In the meantime I'll continue pushing forward here.
>
> Regards, & comments welcome,
>
> Andy
--
http://wingolog.org/
More information about the squirrelfish-dev
mailing list