Class ScriptRuntime.IdEnumeration

java.lang.Object
org.mozilla.javascript.ScriptRuntime.IdEnumeration
All Implemented Interfaces:
Serializable
Enclosing class:
ScriptRuntime

private static class ScriptRuntime.IdEnumeration extends Object implements Serializable
This is the enumeration needed by the for..in statement.

See ECMA 12.6.3.

IdEnumeration maintains a ObjToIntMap to make sure a given id is enumerated only once across multiple objects in a prototype chain.

XXX - ECMA delete doesn't hide properties in the prototype, but js/ref does. This means that the js/ref for..in can avoid maintaining a hash table and instead perform lookups to see if a given property has already been enumerated.

  • Field Details

  • Constructor Details

    • IdEnumeration

      private IdEnumeration()