--- a/compiler/PPCCompiler.st Mon Sep 07 08:20:46 2015 +0100
+++ b/compiler/PPCCompiler.st Mon Sep 07 11:53:38 2015 +0100
@@ -12,38 +12,16 @@
!PPCCompiler class methodsFor:'as yet unclassified'!
-default
- ^ self universal
-!
+new
+ ^ self basicNew initialize
-new
- ^ self basicNew
- initialize;
- yourself
+ "Modified: / 07-09-2015 / 11:06:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-tokenizing
- | options |
-
- options := PPCCompilationOptions default.
- options tokenize:true.
- ^ (PPCCompiler new)
- options:options;
- yourself
+newWithOptions: options
+ ^ self new options: options
- "Modified: / 04-09-2015 / 16:21:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-universal
- | options |
-
- options := PPCCompilationOptions default.
- options tokenize:false.
- ^ (PPCCompiler new)
- options:options;
- yourself
-
- "Modified: / 04-09-2015 / 16:21:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 07-09-2015 / 11:06:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PPCCompiler methodsFor:'accessing'!
@@ -58,8 +36,8 @@
"Modified: / 26-08-2015 / 19:48:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-options: aPPCCompilationOptions
- context options: aPPCCompilationOptions
+options: options
+ context options: options
"Created: / 26-08-2015 / 19:56:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -133,9 +111,11 @@
!PPCCompiler methodsFor:'compiling'!
compile: aPPParser
+ "Compiles given parser. Return an *instance* of the compiler
+ parser which is ready to use (repeatedly)"
+
| time |
- self input: aPPParser.
-
+ self input: aPPParser.
time := [ self compile ] timeToRun.
((Smalltalk respondsTo:#isSmalltalkX) and:[Smalltalk isSmalltalkX]) ifFalse:[
"Assume Pharo"
@@ -146,6 +126,7 @@
^ ir
"Modified: / 17-08-2015 / 13:06:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 07-09-2015 / 10:49:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PPCCompiler methodsFor:'initialization'!