compiler/benchmarks/PPCBenchmark.st
changeset 538 16e8536f5cfb
parent 537 fb212e14d1f4
--- a/compiler/benchmarks/PPCBenchmark.st	Mon Sep 07 08:20:46 2015 +0100
+++ b/compiler/benchmarks/PPCBenchmark.st	Mon Sep 07 11:53:38 2015 +0100
@@ -3,8 +3,8 @@
 "{ NameSpace: Smalltalk }"
 
 Object subclass:#PPCBenchmark
-	instanceVariableNames:'sources report contextClass compile parser context input
-		compiler profile repetitions'
+	instanceVariableNames:'sources report contextClass compile parser context input compiler
+		profile repetitions'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Benchmarks-Core'
@@ -323,8 +323,8 @@
 benchmarkSmalltalkParserCompiled
     | time |
 
-    compiler := PPCCompiler default.
-    parser := PPSmalltalkParser new compileUsingCompiler:compiler.
+    compiler := PPCCompiler new.
+    parser := compiler compile: (PPSmalltalkParser new).
     context := PPCContext new.
     context initializeFor:parser.
     input := sources smalltalkSourcesBig.
@@ -338,6 +338,8 @@
         reportInput:input
         time:time
         name:'Smalltalk Parser Compiled'.
+
+    "Modified: / 07-09-2015 / 11:38:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !PPCBenchmark methodsFor:'benchmarks-CalipeL'!
@@ -553,23 +555,27 @@
 !
 
 setupExpressionGrammarCompiled
-    compiler := PPCCompiler universal.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: false ).
     compiler options parserName:#PPCompiledExpressionGrammar.
     compiler options scannerName:#PPCompiledExpressionScanner.
-    parser := PPExpressionGrammar new compileUsingCompiler:compiler.
+    parser := compiler compile: (PPExpressionGrammar new).
     context := self context.
     context initializeFor:parser.
     input := sources expressionSourcesMedium.
+
+    "Modified: / 07-09-2015 / 11:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupExpressionGrammarTokenized
-    compiler := PPCCompiler tokenizing.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: true ).
     compiler options parserName:#PPTokenizedExpressionGrammar.
     compiler options scannerName:#PPTokenizedExpressionScanner.
-    parser := PPExpressionGrammar new compileUsingCompiler:compiler.
+    parser := compiler compile: (PPExpressionGrammar new).
     context := self context.
     context initializeFor:parser.
     input := sources expressionSourcesMedium.
+
+    "Modified: / 07-09-2015 / 11:36:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupJavaSyntax
@@ -602,23 +608,27 @@
 !
 
 setupLL1ExpressionGrammarCompiled
-    compiler := PPCCompiler universal.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: false ).
     compiler options parserName:#PPCompiledLL1ExpressionGrammar.
     compiler options scannerName:#PPCompiledLL1ExpressionScanner.
-    parser := PPLL1ExpressionGrammar new compileUsingCompiler:compiler.
+    parser := compiler compile: (PPLL1ExpressionGrammar new).
     context := self context.
     context initializeFor:parser.
     input := sources expressionSourcesBig.
+
+    "Modified: / 07-09-2015 / 11:37:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupLL1ExpressionGrammarTokenized
-    compiler := PPCCompiler tokenizing.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: true ).
     compiler options parserName:#PPTokenizedLL1ExpressionGrammar.
     compiler options scannerName:#PPTokenizedLL1ExpressionScanner.
-    parser := PPLL1ExpressionGrammar new compileUsingCompiler:compiler.
+    parser := compiler compile: (PPLL1ExpressionGrammar new).
     context := self context.
     context initializeFor:parser.
     input := sources expressionSourcesBig.
+
+    "Modified: / 07-09-2015 / 11:36:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupLRPParser
@@ -632,13 +642,14 @@
 !
 
 setupLRPParserCompiled
-    compiler := PPCCompiler universal.
-    parser := PPCLRPParser new compileUsingCompiler:compiler.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: false ).
+    parser := compiler compile: (PPCLRPParser new).
     context := self context.
     context initializeFor:parser.
     input := PPCLRPSourcesResource current sources
 
     "Created: / 18-08-2015 / 16:35:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-09-2015 / 11:37:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupLRPParser_johanfabry_39     
@@ -665,10 +676,10 @@
 !
 
 setupSmalltalkGrammarCompiled
-    compiler := PPCCompiler universal.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: false ).
     compiler options parserName:#'PPSmalltalkGrammarC_Unviersal'.
     compiler options profile:profile.
-    parser := PPSmalltalkGrammar new compileUsingCompiler:compiler.
+    parser := compiler compile: (PPSmalltalkGrammar new).
     context := self context.
     context initializeFor:parser.
     profile ifTrue:[
@@ -676,14 +687,16 @@
     ] ifFalse:[
         input := sources smalltalkSourcesBig.
     ]
+
+    "Modified: / 07-09-2015 / 11:37:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupSmalltalkGrammarTokenized
-    compiler := PPCCompiler tokenizing.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: true ).
     compiler options parserName:#'PPSmalltalkGrammarC_Tokenizing'.
     compiler options scannerName:#'PPSmalltalkGrammarC_Scanner'.
     compiler options profile:profile.
-    parser := PPSmalltalkGrammar new compileUsingCompiler:compiler.
+    parser := compiler compile: (PPSmalltalkGrammar new).
     context := self context.
     context initializeFor:parser.
     profile ifTrue:[
@@ -691,26 +704,30 @@
     ] ifFalse:[
         input := sources smalltalkSourcesBig.
     ]
+
+    "Modified: / 07-09-2015 / 11:36:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupSmalltalkNoopParserCompiled
-    compiler := PPCCompiler universal.
-    parser := PPCSmalltalkNoopParser new compileUsingCompiler:compiler.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: false ).
+    parser := compiler compile: (PPCSmalltalkNoopParser new).
     context := PPCContext new.
     context initializeFor:parser.
     input := sources smalltalkSourcesBig.
 
     "Created: / 16-05-2015 / 09:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-09-2015 / 11:37:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupSmalltalkNoopParserTokenized
-    compiler := PPCCompiler tokenizing.
-    parser := PPCSmalltalkNoopParser new compileUsingCompiler:compiler.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: true ).
+    parser := compiler compile: (PPCSmalltalkNoopParser new).
     context := PPCContext new.
     context initializeFor:parser.
     input := sources smalltalkSourcesBig.
 
     "Created: / 16-05-2015 / 09:44:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-09-2015 / 11:36:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupSmalltalkParser
@@ -722,19 +739,23 @@
 !
 
 setupSmalltalkParserCompiled
-    compiler := PPCCompiler universal.
-    parser := PPSmalltalkParser new compileUsingCompiler:compiler.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: false ).
+    parser := compiler compile: (PPSmalltalkParser new).
     context := self context.
     context initializeFor:parser.
     input := sources smalltalkSourcesBig.
+
+    "Modified: / 07-09-2015 / 11:37:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setupSmalltalkParserTokenized
-    compiler := PPCCompiler tokenizing.
-    parser := PPSmalltalkParser new compileUsingCompiler:compiler.
+    compiler := PPCCompiler newWithOptions: #( #tokenize: true ).
+    parser := compiler compile: (PPSmalltalkParser new).
     context := self context.
     context initializeFor:parser.
     input := sources smalltalkSourcesBig.
+
+    "Modified: / 07-09-2015 / 11:36:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 teardownExpressionGrammarTokenized