+void CYPropertyGetter::Replace(CYContext &context, CYBuilder &builder, CYExpression *self, CYExpression *name, bool protect) {
+ CYIdentifier *unique(context.Unique());
+ builder.bindings_
+ ->* $B1($B(unique, CYSuperize(context, $ CYFunctionExpression(NULL, parameters_, code_))));
+ builder.statements_
+ ->* CYDefineProperty(self, name, true, !protect, $ CYPropertyValue($S("get"), $V(unique)));
+}
+
+CYFunctionExpression *CYPropertyMethod::Constructor() {
+ return name_->Constructor() ? $ CYFunctionExpression(NULL, parameters_, code_) : NULL;
+}
+
+void CYPropertyMethod::Replace(CYContext &context, CYBuilder &builder, CYExpression *self, CYExpression *name, bool protect) {
+ CYIdentifier *unique(context.Unique());
+ builder.bindings_
+ ->* $B1($B(unique, CYSuperize(context, $ CYFunctionExpression(NULL, parameters_, code_))));
+ builder.statements_
+ ->* (!protect ? $E($ CYAssign($M(self, name), $V(unique))) :
+ CYDefineProperty(self, name, true, !protect, $ CYPropertyValue($S("value"), $V(unique), $ CYPropertyValue($S("writable"), $ CYTrue()))));
+}
+
+bool CYPropertyMethod::Update() const {
+ return true;
+}
+
+void CYPropertySetter::Replace(CYContext &context, CYBuilder &builder, CYExpression *self, CYExpression *name, bool protect) {
+ CYIdentifier *unique(context.Unique());
+ builder.bindings_
+ ->* $B1($B(unique, CYSuperize(context, $ CYFunctionExpression(NULL, parameters_, code_))));
+ builder.statements_
+ ->* CYDefineProperty(self, name, true, !protect, $ CYPropertyValue($S("set"), $V(unique)));
+}
+
+void CYPropertyValue::Replace(CYContext &context, CYBuilder &builder, CYExpression *self, CYExpression *name, bool protect) {
+ _assert(!protect);
+ CYIdentifier *unique(context.Unique());
+ builder.bindings_
+ ->* $B1($B(unique, value_));
+ builder.statements_
+ ->* $E($ CYAssign($M(self, name), $V(unique)));
+}
+
+void CYPropertyValue::Replace(CYContext &context) {
+ context.Replace(value_);