On Tue, Sep 3, 2024 at 10:23 PM 18楼梦想改造家 <18.floor.h...@gmail.com> wrote:
>
> Hi, ben:
>
> >  That code snippet is from CodeStubAssembler::CheckForCapacityGrow(), right?
>
>  Yes.
>
> >  V8 at that point knows if it's generating machine code for holey or
> non-holey objects. It doesn't have to generate a runtime "is holey?"
> type check because it already knows and can specialize right away.
>
> How did v8 know it is holey or not if we don't have this runtime check? 
> Thanks.

Because that code path is only used for typed arrays (non-holey by
definition) or when transitioning (object is in a known state). Grep
for EmitElementStore; the call in src/builtins/builtins-handler-gen.cc
does a type check with a slow path fallback.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAHQurc8Z7Jgpd%2BNz9us%2BBZy360BMyhewDgvHnYFnq6heN5XhFg%40mail.gmail.com.

Reply via email to