hg: kulla/dev/langtools: Forward reference of methods, variables, and classes from methods implemented.
Robert Field
robert.field at oracle.com
Wed Feb 4 22:05:20 UTC 2015
Example --
-> int f() { return g(); }
| Declared method f, however, it cannot be invoked until method g() is
declared
-> f()
| Attempted to call f which cannot be invoked until method g() is declared.
-> int g() { return 55; }
| Declared method g
-> f()
| Expression value is: 55
| assigned to temporary variable $2 of type int
-> double g() { return 3.14159; }
| Replaced method g
-> f()
| Attempted to call f which cannot be invoked until this error is
addressed --
| Error:
| incompatible types: possible lossy conversion from double to int
| int f() { return g(); }
| ^--^
-> short g() { return (short) 4; }
| Replaced method g
-> f()
| Expression value is: 4
| assigned to temporary variable $6 of type int
-> void m() { System.out.println(new D()); }
| Declared method m, however, it cannot be invoked until class D is
declared
-> m()
| Attempted to call m which cannot be invoked until class D is declared.
-> class D { public String toString() { return "I'm D"; } }
| Declared class D
-> m()
I'm D
-> class D { int x; public String toString() { return "Different D"; } }
| Replaced class D
-> m()
Different D
-> double d() { return x * 1000; }
| Declared method d, however, it cannot be invoked until variable x is
declared
-> int x = 7
| Declared variable x of type int with initial value 7
-> d()
| Expression value is: 7000.0
| assigned to temporary variable $4 of type double
-> double x = 3.14159
| Replaced variable x of type double with initial value 3.14159
-> d()
| Expression value is: 3141.5899999999997
| assigned to temporary variable $5 of type double
-Robert
On 02/04/15 14:01, robert.field at oracle.com wrote:
> Changeset: 75913598bf9d
> Author: rfield
> Date: 2015-02-04 14:01 -0800
> URL: http://hg.openjdk.java.net/kulla/dev/langtools/rev/75913598bf9d
>
> Forward reference of methods, variables, and classes from methods implemented.
> Dependency tracker implemented. KISS -- false postives possible.
> Dependency mapper with lazy removal.
> Redefine/Replace crawl implemented: Changed definitions propagate to referenced definitions.
> New method on Snippet - otherCorralledErrors(): Used when already declared Snippet develops errors other then unresolved.
> Support in Repl tool for new information.
>
> ! repl/TODO
> ! repl/src/api/EvaluationState.java
> ! repl/src/impl/EvaluationStateImpl.java
> ! repl/src/impl/SnippetImpl.java
> ! repl/src/impl/SnippetMaps.java
> ! repl/src/impl/SnippetSource.java
> + repl/src/impl/TreeDependencyScanner.java
> ! repl/src/tool/Repl.java
>
More information about the kulla-dev
mailing list