PrototypeInfo.validity_cell: adding comment
authorcbruni <cbruni@chromium.org>
Thu, 24 Sep 2015 14:09:41 +0000 (07:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 24 Sep 2015 14:10:00 +0000 (14:10 +0000)
BUG=

Review URL: https://codereview.chromium.org/1370443002

Cr-Commit-Position: refs/heads/master@{#30915}

src/objects.h

index 075cca447b63d4ac3bdbb928d2458b0583906ed9..6f849584a8feb534877d4097ec87273d31244dc2 100644 (file)
@@ -5990,6 +5990,10 @@ class PrototypeInfo : public Struct {
   inline void set_registry_slot(int slot);
   // [validity_cell]: Cell containing the validity bit for prototype chains
   // going through this object, or Smi(0) if uninitialized.
+  // When a prototype object changes its map, then both its own validity cell
+  // and those of all "downstream" prototypes are invalidated; handlers for a
+  // given receiver embed the currently valid cell for that receiver's prototype
+  // during their compilation and check it on execution.
   DECL_ACCESSORS(validity_cell, Object)
   // [constructor_name]: User-friendly name of the original constructor.
   DECL_ACCESSORS(constructor_name, Object)