diff --git a/spec.html b/spec.html index 2833449..efedcea 100644 --- a/spec.html +++ b/spec.html @@ -278,11 +278,9 @@

Runtime Semantics: Evaluation

1. Let _privateIdentifier_ be StringValue of |PrivateIdentifier|. - 1. Let _privateName_ be NewPrivateName(_privateIdentifier_). 1. Let _scope_ be the running execution context's PrivateEnvironment. 1. Let _scopeEnvRec_ be _scope_'s EnvironmentRecord. - 1. Perform ! _scopeEnvRec_.InitializeBinding(_privateIdentifier_, _privateName_). - 1. Return _privateName_. + 1. Return _scopeEnvRec_.GetBindingValue(_bindingName_). Each time a class declaration executes, distinct internal Private Names are created. This means, that they cannot directly access each other's private state if a method of one is called with the other as a receiver. @@ -587,6 +585,8 @@

Runtime Semantics: ClassDefinitionEvaluation

1. If |ClassBody_opt| is present, then 1. For each element _dn_ of the PrivateBoundIdentifiers of |ClassBody_opt|, 1. Perform _classPrivateEnvRec_.CreateImmutableBinding(_dn_, *true*). + 1. Let _privateName_ be NewPrivateName(_dn_). + 1. Perform ! _classPrivateEnvRec_.InitializeBinding(_dn_, _dn_). 1. If |ClassHeritage_opt| is not present, then 1. Let _protoParent_ be the intrinsic object %ObjectPrototype%. 1. Let _constructorParent_ be the intrinsic object %FunctionPrototype%.