oscript.compiler
Class CompilerScope

java.lang.Object
  extended byoscript.compiler.CompilerScope

public class CompilerScope
extends java.lang.Object

This class helps the compiler track declarations of variables within a scope, in order to optimize resolving references to variables by caching and, when possible, statically resolving the reference in order to avoid performing the normal hashtable lookup(s). It is also responsible for generating the Scope.createMember(java.lang.String, int) and Scope.lookupInScope(java.lang.String) code, so that the rest of the compiler does not need to worry about what optimization strategy (if any) is used to resolve references.

Note that this class is fairly tightly coupled to CompilerVisitor. It would be an inner class if it were not for file size issues.

Version:
0
Author:
Rob Clark (rob@ti.com)

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait