internal override AST PartiallyEvaluate() { this.operand1 = this.operand1.PartiallyEvaluateAsReference(); this.operand2 = this.operand2.PartiallyEvaluate(); this.binOp = new Plus(this.context, this.operand1, this.operand2); this.operand1.SetPartialValue(this.binOp); if (this.Engine.doFast) { Binding b = this.operand1 as Binding; if (b != null && b.member is JSVariableField) { TypeExpression te = ((JSVariableField)b.member).type; if (te != null && te.InferType(null) == Typeob.String) { this.operand1.context.HandleError(JSError.StringConcatIsSlow); } } } return(this); }
internal override AST PartiallyEvaluate() { base.operand1 = base.operand1.PartiallyEvaluateAsReference(); base.operand2 = base.operand2.PartiallyEvaluate(); this.binOp = new Plus(base.context, base.operand1, base.operand2); base.operand1.SetPartialValue(this.binOp); if (base.Engine.doFast) { Binding binding = base.operand1 as Binding; if ((binding != null) && (binding.member is JSVariableField)) { TypeExpression type = ((JSVariableField)binding.member).type; if ((type != null) && (type.InferType(null) == Typeob.String)) { base.operand1.context.HandleError(JSError.StringConcatIsSlow); } } } return(this); }