projects
/
hs-java.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Misc minor updates.
[hs-java.git]
/
TestGen.hs
diff --git
a/TestGen.hs
b/TestGen.hs
index 5bb8daad810cd28c777405cfe49b83387f2ffc9b..175e10b1b79a1f8a153baf35058f78d8027edf45 100644
(file)
--- a/
TestGen.hs
+++ b/
TestGen.hs
@@
-10,9
+10,6
@@
import JVM.Builder
import qualified Java.Lang
import qualified Java.IO
import qualified Java.Lang
import qualified Java.IO
-hello :: NameType Method
-hello = NameType "hello" $ MethodSignature [IntType] ReturnsVoid
-
test :: Generate ()
test = do
newMethod [ACC_PUBLIC] "<init>" [] ReturnsVoid $ do
test :: Generate ()
test = do
newMethod [ACC_PUBLIC] "<init>" [] ReturnsVoid $ do
@@
-37,13
+34,14
@@
test = do
pop
i0 RETURN
pop
i0 RETURN
- newMethod [ACC_PUBLIC, ACC_STATIC] "main" [
Array Nothing
Java.Lang.stringClass] ReturnsVoid $ do
+ newMethod [ACC_PUBLIC, ACC_STATIC] "main" [
arrayOf
Java.Lang.stringClass] ReturnsVoid $ do
iconst_5
invokeStatic "Test" hello
i0 RETURN
return ()
iconst_5
invokeStatic "Test" hello
i0 RETURN
return ()
+testClass :: Class Resolved
testClass = generate "Test" test
main = do
testClass = generate "Test" test
main = do