コード例 #1
0
ファイル: BoundTreeVisitor.cs プロジェクト: pvginkel/Jint2
 public virtual void VisitSetAccessor(BoundSetAccessor node)
 {
     DefaultVisit(node);
 }
コード例 #2
0
ファイル: CodeGenerator.cs プロジェクト: pvginkel/Jint2
 private void EmitSetAccessor(BoundSetAccessor node)
 {
     // Push the target onto the stack.
     EmitExpression(node.Expression);
     // Push the identifier onto the stack.
     IL.EmitConstant(_identifierManager.ResolveIdentifier(node.Name));
     // Push the getter onto the stack.
     if (node.GetFunction != null)
         EmitExpression(node.GetFunction);
     else
         IL.Emit(OpCodes.Ldnull);
     // Push the setter onto the stack.
     if (node.SetFunction != null)
         EmitExpression(node.SetFunction);
     else
         IL.Emit(OpCodes.Ldnull);
     // Call the define accessor.
     IL.EmitCall(_objectDefineAccessor);
 }