Exemple #1
0
 public void setRootScope()
 {
     scope       = new NameBindingScope(this);
     self        = scope.declareSelf();
     super       = scope.declareSuper();
     thisContext = scope.declareThisContext();
 }
Exemple #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);
        }
Exemple #3
0
 public NameBindingScope pushScope()
 {
     if (scope == null)
     {
         setRootScope();
         return(scope);
     }
     scope = new NameBindingScope(this, scope);
     return(scope);
 }
Exemple #4
0
        public NameBindingScope popScope()
        {
            NameBindingScope poppedScope = scope;

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

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