Small improvement in IRFunction>>addTemps:
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 12 Aug 2009 10:22:31 +0000
changeset 21 a5d30403049c
parent 20 7d49846b36bd
child 22 6d3c5fd122e3
Small improvement in IRFunction>>addTemps:
IRFunction.st
Make.proto
Make.spec
abbrev.stc
extensions.st
libInit.cc
stx_goodies_newcompiler.st
--- a/IRFunction.st	Sat May 16 16:51:05 2009 +0000
+++ b/IRFunction.st	Wed Aug 12 10:22:31 2009 +0000
@@ -44,9 +44,10 @@
         tempMap at: key ifAbsentPut: 
             [new add: key.
             i := i + 1]].
+    new isEmpty ifTrue:[^self].
     self tempKeys: keys, new.
 
-    "Modified: / 30-03-2009 / 18:46:36 / Jan Vrany <vranyj1@fel.cvut.cz>"
+    "Modified: / 12-08-2009 / 09:22:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
 !
 
 additionalLiterals
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.spec	Wed Aug 12 10:22:31 2009 +0000
@@ -0,0 +1,88 @@
+# $Header$
+#
+# DO NOT EDIT 
+# automagically generated from the projectDefinition: stx_goodies_newcompiler.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# This file contains specifications which are common to all platforms.
+#
+
+# Do NOT CHANGE THESE DEFINITIONS
+# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
+#  to find the source code of a class and to find the library for a package)
+MODULE=stx
+MODULE_DIR=goodies/newcompiler
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -H.         : create header files locally
+#                (if removed, they will be created as common
+#  -Pxxx       : defines the package
+#  -Zxxx       : a prefix for variables within the classLib
+#  -Dxxx       : defines passed to to CC for inline C-code
+#  -Ixxx       : include path passed to CC for inline C-code
+#  +optspace   : optimized for space
+#  +optspace2  : optimized more for space
+#  +optspace3  : optimized even more for space
+#  +optinline  : generate inline code for some ST constructs
+#  +inlineNew  : additionally inline new
+#  +inlineMath : additionally inline some floatPnt math stuff
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace3
+STCLOCALOPTIMIZATIONS=+optspace3
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -warn            : no warnings
+#  -warnNonStandard : no warnings about ST/X extensions
+#  -warnEOLComments : no warnings about EOL comment extension
+#  -warnPrivacy     : no warnings about privateClass extension
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCWARNINGS=-warn
+# STCWARNINGS=-warnNonStandard
+# STCWARNINGS=-warnEOLComments
+STCWARNINGS=-warnNonStandard
+
+COMMON_OBJS= \
+    $(OUTDIR)IRBuilder.$(O) \
+    $(OUTDIR)IRBytecodeGenerator.$(O) \
+    $(OUTDIR)IRFunction.$(O) \
+    $(OUTDIR)IRInstruction.$(O) \
+    $(OUTDIR)IRInterpreter.$(O) \
+    $(OUTDIR)IRSequence.$(O) \
+    $(OUTDIR)IRStackCount.$(O) \
+    $(OUTDIR)stx_goodies_newcompiler.$(O) \
+    $(OUTDIR)IRAccess.$(O) \
+    $(OUTDIR)IRClosure.$(O) \
+    $(OUTDIR)IRConstant.$(O) \
+    $(OUTDIR)IRDecompiler.$(O) \
+    $(OUTDIR)IRDup.$(O) \
+    $(OUTDIR)IRJump.$(O) \
+    $(OUTDIR)IRLine.$(O) \
+    $(OUTDIR)IRMethod.$(O) \
+    $(OUTDIR)IRPop.$(O) \
+    $(OUTDIR)IRPrinter.$(O) \
+    $(OUTDIR)IRReturn.$(O) \
+    $(OUTDIR)IRSend.$(O) \
+    $(OUTDIR)IRTranslator.$(O) \
+    $(OUTDIR)IRBlockReturnTop.$(O) \
+    $(OUTDIR)IRInstVarAccess.$(O) \
+    $(OUTDIR)IRJumpIf.$(O) \
+    $(OUTDIR)IRJumpOverBlock.$(O) \
+    $(OUTDIR)IRLiteralVariableAccess.$(O) \
+    $(OUTDIR)IRTempAccess.$(O) \
+    $(OUTDIR)IRInstVarRead.$(O) \
+    $(OUTDIR)IRInstVarStore.$(O) \
+    $(OUTDIR)IRLiteralVariableRead.$(O) \
+    $(OUTDIR)IRLiteralVariableStore.$(O) \
+    $(OUTDIR)IRTempRead.$(O) \
+    $(OUTDIR)IRTempStore.$(O) \
+    $(OUTDIR)extensions.$(O) \
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/abbrev.stc	Wed Aug 12 10:22:31 2009 +0000
@@ -0,0 +1,35 @@
+IRBuilder IRBuilder stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRBuilderTest IRBuilderTest stx:goodies/newcompiler 'NewCompiler-IR-Tests' 2
+IRBytecodeGenerator IRBytecodeGenerator stx:goodies/newcompiler 'NewCompiler-Bytecode' 0
+IRFunction IRFunction stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRInstruction IRInstruction stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRInterpreter IRInterpreter stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRSequence IRSequence stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRStackCount IRStackCount stx:goodies/newcompiler 'NewCompiler-Bytecode' 0
+IRTransformTest IRTransformTest stx:goodies/newcompiler 'NewCompiler-IR-Tests' 2
+stx_goodies_newcompiler stx_goodies_newcompiler stx:goodies/newcompiler '* Projects & Packages *' 2
+IRAccess IRAccess stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRClosure IRClosure stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRConstant IRConstant stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRDecompiler IRDecompiler stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRDup IRDup stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRJump IRJump stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRLine IRLine stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRMethod IRMethod stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRPop IRPop stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRPrinter IRPrinter stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRReturn IRReturn stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRSend IRSend stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRTranslator IRTranslator stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRBlockReturnTop IRBlockReturnTop stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRInstVarAccess IRInstVarAccess stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRJumpIf IRJumpIf stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRJumpOverBlock IRJumpOverBlock stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRLiteralVariableAccess IRLiteralVariableAccess stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRTempAccess IRTempAccess stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRInstVarRead IRInstVarRead stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRInstVarStore IRInstVarStore stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRLiteralVariableRead IRLiteralVariableRead stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRLiteralVariableStore IRLiteralVariableStore stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRTempRead IRTempRead stx:goodies/newcompiler 'NewCompiler-IR' 0
+IRTempStore IRTempStore stx:goodies/newcompiler 'NewCompiler-IR' 0
--- a/extensions.st	Sat May 16 16:51:05 2009 +0000
+++ b/extensions.st	Wed Aug 12 10:22:31 2009 +0000
@@ -1,3 +1,4 @@
+"$Id$"
 "{ Package: 'stx:goodies/newcompiler' }"
 
 !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libInit.cc	Wed Aug 12 10:22:31 2009 +0000
@@ -0,0 +1,57 @@
+/*
+ * $Header$
+ *
+ * DO NOT EDIT 
+ * automagically generated from the projectDefinition: stx_goodies_newcompiler.
+ */
+#define __INDIRECTVMINITCALLS__
+#include <stc.h>
+
+#ifdef WIN32
+# pragma codeseg INITCODE "INITCODE"
+#endif 
+
+#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
+DLL_EXPORT void _libstx_goodies_newcompiler_Init() INIT_TEXT_SECTION;
+#endif
+
+void _libstx_goodies_newcompiler_Init(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libstx_goodies_newcompiler", _libstx_goodies_newcompiler_Init, "stx:goodies/newcompiler");
+_IRBuilder_Init(pass,__pRT__,snd);
+_IRBytecodeGenerator_Init(pass,__pRT__,snd);
+_IRFunction_Init(pass,__pRT__,snd);
+_IRInstruction_Init(pass,__pRT__,snd);
+_IRInterpreter_Init(pass,__pRT__,snd);
+_IRSequence_Init(pass,__pRT__,snd);
+_IRStackCount_Init(pass,__pRT__,snd);
+_stx_137goodies_137newcompiler_Init(pass,__pRT__,snd);
+_IRAccess_Init(pass,__pRT__,snd);
+_IRClosure_Init(pass,__pRT__,snd);
+_IRConstant_Init(pass,__pRT__,snd);
+_IRDecompiler_Init(pass,__pRT__,snd);
+_IRDup_Init(pass,__pRT__,snd);
+_IRJump_Init(pass,__pRT__,snd);
+_IRLine_Init(pass,__pRT__,snd);
+_IRMethod_Init(pass,__pRT__,snd);
+_IRPop_Init(pass,__pRT__,snd);
+_IRPrinter_Init(pass,__pRT__,snd);
+_IRReturn_Init(pass,__pRT__,snd);
+_IRSend_Init(pass,__pRT__,snd);
+_IRTranslator_Init(pass,__pRT__,snd);
+_IRBlockReturnTop_Init(pass,__pRT__,snd);
+_IRInstVarAccess_Init(pass,__pRT__,snd);
+_IRJumpIf_Init(pass,__pRT__,snd);
+_IRJumpOverBlock_Init(pass,__pRT__,snd);
+_IRLiteralVariableAccess_Init(pass,__pRT__,snd);
+_IRTempAccess_Init(pass,__pRT__,snd);
+_IRInstVarRead_Init(pass,__pRT__,snd);
+_IRInstVarStore_Init(pass,__pRT__,snd);
+_IRLiteralVariableRead_Init(pass,__pRT__,snd);
+_IRLiteralVariableStore_Init(pass,__pRT__,snd);
+_IRTempRead_Init(pass,__pRT__,snd);
+_IRTempStore_Init(pass,__pRT__,snd);
+
+_stx_137goodies_137newcompiler_extensions_Init(pass,__pRT__,snd);
+__END_PACKAGE__();
+}
--- a/stx_goodies_newcompiler.st	Sat May 16 16:51:05 2009 +0000
+++ b/stx_goodies_newcompiler.st	Wed Aug 12 10:22:31 2009 +0000
@@ -108,6 +108,15 @@
     "Created: / 11-06-2008 / 16:50:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
 ! !
 
+!stx_goodies_newcompiler class methodsFor:'description - svn'!
+
+svnRevisionNr
+    "Return a SVN revision number of myself.
+     This number is updated after a commit"
+
+    ^ "$SVN-Revision:"nil"$"
+! !
+
 !stx_goodies_newcompiler class methodsFor:'documentation'!
 
 version