Пример #1
0
 public void setRootScope()
 {
     scope       = new NameBindingScope(this);
     self        = scope.declareSelf();
     super       = scope.declareSuper();
     thisContext = scope.declareThisContext();
 }
Пример #2
0
        public InstanceVariableDeclaration(NameBindingScope scope, ESSymbol name) : base(scope, name)
        {
            var namedSlotsObject = Expression.Convert(Scope.SelfParameter, TypeGuru.esNamedSlotsObjectType);

            namedSlots = Expression.Field(namedSlotsObject, "namedSlots");
            var statusFlags = Expression.Field(namedSlotsObject, "statusFlags");

            isMutable = Expression.Equal(Expression.And(statusFlags, mutabilityFlagBitConstant), zeroConstant);
        }
Пример #3
0
 public NameBindingScope pushScope()
 {
     if (scope == null)
     {
         setRootScope();
         return(scope);
     }
     scope = new NameBindingScope(this, scope);
     return(scope);
 }
Пример #4
0
        public NameBindingScope popScope()
        {
            NameBindingScope poppedScope = scope;

            if (!scope.IsRoot)
            {
                scope = scope.OuterScope;
            }
            return(poppedScope);
        }
Пример #5
0
        public NamedValueOccurrence newOccurrenceIn(NameBindingScope referencingScope)
        {
            var occurrence = new NamedValueOccurrence(this);

            occurrences.Add(occurrence);
            if (occurrence.IsFreeVariable && IsStackResident)
            {
                nonLocalOccurenceCount++;
            }
            return(occurrence);
        }
Пример #6
0
 public PseudovariableThisContext(NameBindingScope scope) : base(scope, scope.ThisContextParameter)
 {
 }
Пример #7
0
 public PseudovariableSuper(NameBindingScope scope) : base(scope, scope.SelfParameter)
 {
 }
Пример #8
0
 public Pseudovariable(NameBindingScope scope, ParameterExpression parameter) : base(scope, parameter)
 {
 }
Пример #9
0
 public ParameterDeclaration(NameBindingScope scope, ESSymbol name, Type parameterType) : base(scope, name, parameterType)
 {
 }
Пример #10
0
 public ParameterDeclaration(NameBindingScope scope, ParameterExpression parameter) : base(scope, parameter)
 {
 }
Пример #11
0
 protected StackResidentDeclaration(NameBindingScope scope, ESSymbol name) : this(scope, name, TypeGuru.objectType)
 {
 }
Пример #12
0
 protected StackResidentDeclaration(NameBindingScope scope, ParameterExpression parameter) : base(scope, parameter.Name)
 {
     this.parameter = parameter;
 }
Пример #13
0
 public bool isLocalTo(NameBindingScope aScope)
 {
     return(scope == aScope);
 }
Пример #14
0
 public NamedValueDeclaration(NameBindingScope scope, String name)
 {
     this.scope = scope;
     this.name  = name;
     nameSymbol = scope.symbolFor(name);
 }
Пример #15
0
 public AbstractNonStackResidentVariableDeclaration(NameBindingScope scope, ESSymbol name) : base(scope, name)
 {
 }
Пример #16
0
 public NonLocalVariableDeclaration(NameBindingScope scope, ESSymbol name) : base(scope, name)
 {
 }
Пример #17
0
 protected StackResidentDeclaration(NameBindingScope scope, ESSymbol name, Type parameterType) : this(scope, parameterExpressionFrom(name, parameterType))
 {
 }
Пример #18
0
 public NamespaceResidentVariableDeclaration(NamespaceObject environment, NameBindingScope scope, ESSymbol name) : base(scope, name)
 {
     getVariableCallSite = Context.getVariableValueCallSiteConstantFor(environment, name);
     setVariableCallSite = Context.setVariableValueCallSiteConstantFor(environment, name);
 }
Пример #19
0
 public NameBindingScope(CodeGenerationContext context, NameBindingScope outerScope) : this(context) {
     this.outerScope = outerScope;
 }