简体   繁体   中英

JavaScript in Google Chrome V8: hidden classes

I study about Google Chrome V8, and I have a question about hidden classes. V8 creates Hidden Classes for optimization, and as far as I know, child(?) objects inherit it. But, JavaScript creates 2 object, one is Object itself, another is prototype-object. My Questions are the following:

  1. Is child inherit hidden-class and at the same time, share parent prototype-object?
  2. In JIT Compile in V8, Chrome create machine-code instead of IR. If that, is machine-code means assembly-code dependent on user-architecture?

V8 generates bytecode first, then architecture dependent machine code.

Hidden classes of objects are different as soon as a single property or order of property is different. Child and prototype do not have the same hidden class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM