|
1 " |
|
2 COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 All Rights Reserved |
|
4 |
|
5 This software is furnished under a license and may be used |
|
6 only in accordance with the terms of that license and with the |
|
7 inclusion of the above copyright notice. This software may not |
|
8 be provided or otherwise made available to, or used by, any |
|
9 other person. No title to or ownership of the software is |
|
10 hereby transferred. |
|
11 " |
|
12 |
|
13 Object subclass:#ProgramNodeBuilder |
|
14 instanceVariableNames:'' |
|
15 classVariableNames:'' |
|
16 poolDictionaries:'' |
|
17 category:'System-Compiler ST-80-compatibility' |
|
18 ! |
|
19 |
|
20 ProgramNodeBuilder comment:' |
|
21 COPYRIGHT (c) 1995 by Claus Gittinger |
|
22 All Rights Reserved |
|
23 |
|
24 $Header: /cvs/stx/stx/libcomp/ProgramNodeBuilder.st,v 1.1 1995-07-23 02:24:08 claus Exp $ |
|
25 '! |
|
26 |
|
27 !ProgramNodeBuilder class methodsFor:'documentation'! |
|
28 |
|
29 copyright |
|
30 " |
|
31 COPYRIGHT (c) 1995 by Claus Gittinger |
|
32 All Rights Reserved |
|
33 |
|
34 This software is furnished under a license and may be used |
|
35 only in accordance with the terms of that license and with the |
|
36 inclusion of the above copyright notice. This software may not |
|
37 be provided or otherwise made available to, or used by, any |
|
38 other person. No title to or ownership of the software is |
|
39 hereby transferred. |
|
40 " |
|
41 ! |
|
42 |
|
43 version |
|
44 " |
|
45 $Header: /cvs/stx/stx/libcomp/ProgramNodeBuilder.st,v 1.1 1995-07-23 02:24:08 claus Exp $ |
|
46 " |
|
47 ! |
|
48 |
|
49 documentation |
|
50 " |
|
51 This is a pure mimicri class. |
|
52 It is not used by ST/X, but provided to support limited |
|
53 compatibility for applications which build up codetrees, |
|
54 knowing internals of ST-80's compiler class hierarchy. |
|
55 This classes protocol is not (not meant to be) fully covering |
|
56 the corresponding ST-80's classes protocol. It maps ST-80 messages |
|
57 to corresponding ST/X messages (as far as possible). |
|
58 |
|
59 NO WARRANTY and GUARANTEE; this class may be removed without notice. |
|
60 " |
|
61 ! ! |
|
62 |
|
63 !ProgramNodeBuilder methodsFor:'tree building'! |
|
64 |
|
65 newLiteralValue:aConstantValue |
|
66 "return a treeNode for a literal constant" |
|
67 |
|
68 ^ ConstantNode value:aConstantValue |
|
69 ! |
|
70 |
|
71 newReturnValue:anExpressionNode |
|
72 "return a treeNode for a method-return" |
|
73 |
|
74 ^ ReturnNode expression:anExpressionNode |
|
75 ! |
|
76 |
|
77 newMethodSelector:sel arguments:argVars temporaries:localVars statements:statementNodes |
|
78 "mhmh - in ST/X we have no methodNodes ...." |
|
79 ^ MethodNode new |
|
80 selector:sel |
|
81 arguments:argVars |
|
82 locals:localVars |
|
83 statements:statementNodes. |
|
84 ! ! |