}
CYProperty *CYProperty::ReplaceAll(CYContext &context, CYBuilder &builder, CYExpression *self, bool update) {
- update |= name_->Computed();
+ update |= Update();
if (update)
Replace(context, builder, self, false);
if (next_ != NULL)
Replace(context, builder, self, name, protect);
}
+bool CYProperty::Update() const {
+ return name_->Computed();
+}
+
void CYPropertyGetter::Replace(CYContext &context, CYBuilder &builder, CYExpression *self, CYExpression *name, bool protect) {
CYIdentifier *unique(context.Unique());
builder.declarations_
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.declarations_
{
}
+ virtual bool Update() const;
+
CYProperty *ReplaceAll(CYContext &context, CYBuilder &builder, CYExpression *self, bool update);
void Replace(CYContext &context, CYBuilder &builder, CYExpression *self, bool protect);
{
}
+ bool Update() const override;
+
virtual CYFunctionExpression *Constructor();
virtual void Replace(CYContext &context, CYBuilder &builder, CYExpression *self, CYExpression *name, bool protect);