Bugfix: in teardown, do not remove parser if it has not been compiled.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 20 Apr 2015 18:06:31 +0100
changeset 434 840942b96eea
parent 433 6fcdf4d2c32c
child 435 3bc08fb90133
Bugfix: in teardown, do not remove parser if it has not been compiled. This leads to `Smalltalk removeClass: UndefinedObject` which is not good idea.
compiler/benchmarks/PPCBenchmark.st
--- a/compiler/benchmarks/PPCBenchmark.st	Mon Apr 20 13:24:27 2015 +0100
+++ b/compiler/benchmarks/PPCBenchmark.st	Mon Apr 20 18:06:31 2015 +0100
@@ -497,7 +497,9 @@
 !
 
 teardownJavaSyntaxCompiledC
-	parser class removeFromSystem.
+	parser notNil ifTrue:[
+	    parser class removeFromSystem.
+	].	
 "	
 	size := input inject: 0 into: [:r :e | r + e size  ].
 	Transcript crShow: 'Compiled Grammar time: ', time asString.
@@ -506,7 +508,9 @@
 !
 
 teardownSmalltalkGrammarCompiledC
-	parser class removeFromSystem.
+	parser notNil ifTrue:[
+	    parser class removeFromSystem.
+	].
 "	
 	size := input inject: 0 into: [:r :e | r + e size  ].
 	Transcript crShow: 'Compiled Grammar time: ', time asString.