Use map transitions when defining accessor properties.
AccessorPairs can now contain map transitions, which is similar to our current handling of CONSTANT_FUNCTION/CONSTANT_TRANSITION, but generalized to a pair for holding info about the getter and the setter. This way we can achieve map sharing for objects with accessor properties, which is a prerequisite for making them fast via inlining. We fall back to the previous way of handling accessor properties when sharing is not possible or we don't handle a special case. Note: When an exisiting accessor property is redefined we could in principle move the AccessorPair out of the descriptor into the object itself (again just like the way we do something similar for CONSTANT_FUNCTION/CONSTANT_TRANSITION), but this would require a new property kind for holding a pair of values. Perhaps we can implement this later, but for now this hopefully rare case is handled like before, losing map sharing and potentially creating more maps than strictly necessary. Review URL: https://chromiumcodereview.appspot.com/10238005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Showing
Please
register
or
sign in
to comment