[root]/groovy/groovy-core/src/main/org/codehaus/groovy/ast/stmt
this commit contains the reimplementation of the scoping. The complete scoping is removed from the ACG. Additionally some code from the ACG is transfered in a Helper that manges labels, scopes and variable creation in a stack. All checks from JSRVariableScopeCodeVisitor are transfered into the ClassCompletion verifier or the new VariableScopeVisitor. Additionally some checks for labels were added with the LabelVerifier. ACG was changed so a DeclarationExpression will no longer create a local variable and if a variable is a filed or protperty accessed from inside a closure ACG will no longer try to access that field directly. Instead the closure has to resolve these cases at runtime.
Note: this commit should pass the tests but is imcomplete due to missing tests.
41 lines of code changed in:
this committ removes the class org.codehaus.groovy.ast.Type completely and transferes its functuanality to ClassNode and ClassHelper. A ClassNode can now be a primitive type or any other type created with an class file available. ClassNodes can now be primary, which means they are the a result of a class definiton in a file - unlike a ClassNode created from a Class. All phases till actual class creation should work on ClassNode instead of Class. So all Class handling code in ACG is transformed to ahndle ClassNode instead. A ClassNode can contain a redirect now. This is used when multiple names point to the same ClassNode. This mechanism was used instead of a replacing like with the Type class. This was needed because all class resolving code is transfered into a single phase right after creation of the groovy ast and to avoid creation of huge amounts of code to replace a ClassNode in statements and expressions.
The Compiler is now able to enqueue source files. This means when ever a compiler phase found out it is necessary to compile another source file it can put this file into the compiler using the addSource method of CompilationUnit and leave the rest to the compiler. The compiler will then go back to the initialization phase and proceed to the goal phase ignoring all already handled files but the new added file.
45 lines of code changed in:
This patch removes many string descriptons of types from the class generator and enfocres the usage of the class Type instead. A new interface is introduced for nodes which are possible variables
4 lines of code changed in:
visitor support for catch statements
1 lines of code changed in:
Fixed switch statement
7 lines of code changed in:
added code for static method dispatching. The main changes are in AsmClassGenerator2, which deprecates AsmClssGenerator, and all the Expression subclasses and nodes that deal with type information. Some changes are not really related to call dispatching, but I have included them in the batch. The early-binding mode is turned off by default (see AsmClassGenerator2, line 200) the default mode checks for -Dstatic.dispatching=true and turns on early-binding accordingly.
4 lines of code changed in:
overrode the super class' default getText()
3 lines of code changed in:
Return null for void return statements when return type not explicitly declared.
Also fixed a problem when there was no final return statement on void methods.
1 lines of code changed in:
applied Chris's changes to the parser for triple quoted strings and to improve the interactive shell
1 lines of code changed in:
Applied parser changes from Chris which include...
further refactoring/cleanup of the parser, added
(parser-/ast-only) support for labels, added (untested,
parser-/ast-only) support for defaulted parameters, changes to the
handling of blocks, and the wiring-up of the error handling system for
the Groovyc Ant task.
14 lines of code changed in:
New For loop which handles JDK 1.5 style for loops using : or in along with an optional type
Added support for subscript operator on objects as a dynamic alternative to property access
Fixed a few warnings
8 lines of code changed in:
fix for GROOVY-209
8 lines of code changed in:
test case & fix for GROOVY-123
4 lines of code changed in:
added a couple of helper methods to the AST
6 lines of code changed in:
Fixed Rod's bug where typed expressions barf. Added his test case as a unit test
1 lines of code changed in:
Nearly got the Switch statement working. Its fairly close.
Also added the matches() methods to Groovy along with unit tests as the basis of switch functionality
4 lines of code changed in:
Added the front end parsing for switch, throw, break, continue and synchronize
316 lines of code changed in:
* applied Sam's patch to tidy up the MetaClass
* added early implementation of Sequences (for 0..n or 1..n cardinalities)
* added a keystroke for the swing console
* started some early implementations of an SQL facade for gdo
9 lines of code changed in:
Deleted the old & dead interpreter (we can now use GroovyShell as an interpreter instead) and added the swiitch statement to the AST
169 lines of code changed in:
Added support for the running of Groovy scripts without a class required
So you can now compile & run the following script...
println("Hello world")
who-hoo!
4 lines of code changed in:
(4 more)