Reviewers: Toon Verwaest,
Message:
Next step as discussed. PTAL.
https://codereview.chromium.org/1033653002/diff/1/src/bootstrapper.cc
File src/bootstrapper.cc (right):
https://codereview.chromium.org/1033653002/diff/1/src/bootstrapper.cc#newcode836
src/bootstrapper.cc:836:
js_global_object_function->initial_map()->set_is_prototype_map(true);
This makes it possible to DCHECK that we only ever install PrototypeInfo
structs on prototype maps.
https://codereview.chromium.org/1033653002/diff/1/src/heap/objects-visiting-inl.h
File src/heap/objects-visiting-inl.h (left):
https://codereview.chromium.org/1033653002/diff/1/src/heap/objects-visiting-inl.h#oldcode590
src/heap/objects-visiting-inl.h:590: heap, HeapObject::RawField(map,
Map::kTransitionsOffset));
This is covered by the VisitPointers() call in line 618 (new 614)
anyway.
https://codereview.chromium.org/1033653002/diff/1/src/objects.cc
File src/objects.cc (right):
https://codereview.chromium.org/1033653002/diff/1/src/objects.cc#newcode4499
src/objects.cc:4499: MigrateToMap(object, new_map,
expected_additional_properties);
MigrateToMap is now *the* choke point for changing an object's map.
https://codereview.chromium.org/1033653002/diff/1/src/objects.h
File src/objects.h (right):
https://codereview.chromium.org/1033653002/diff/1/src/objects.h#newcode522
src/objects.h:522: #define STRUCT_LIST(V)
\
clang-format...
Description:
Move prototype metadata from internal properties to prototype maps
The motivation is that we prefer to avoid creating internal properties, and
we
have a usable field on maps ("transitions", which is not used for prototype
maps).
This CL also ensures the invariant that prototype maps are never shared,
even if
they are in dictionary mode.
Please review this at https://codereview.chromium.org/1033653002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+199, -105 lines):
M include/v8.h
M src/bootstrapper.cc
M src/factory.h
M src/factory.cc
M src/heap-snapshot-generator.cc
M src/heap/heap.h
M src/heap/objects-visiting-inl.h
M src/isolate.cc
M src/objects.h
M src/objects.cc
M src/objects-debug.cc
M src/objects-inl.h
M src/objects-printer.cc
M test/mjsunit/fast-prototype.js
M test/mjsunit/regress/regress-put-prototype-transition.js
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.