resin 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/amber/css/amber-normalize.css +73 -73
  2. data/amber/css/amber-normalize.less +1 -1
  3. data/amber/css/amber.css +106 -106
  4. data/amber/css/helios.css +242 -0
  5. data/amber/images/hsplitter.png +0 -0
  6. data/amber/images/vsplitter.png +0 -0
  7. data/amber/js/Benchfib.deploy.js +116 -38
  8. data/amber/js/Benchfib.js +120 -42
  9. data/amber/js/Canvas.deploy.js +674 -403
  10. data/amber/js/Canvas.js +682 -411
  11. data/amber/js/Compiler-AST.deploy.js +1150 -0
  12. data/amber/js/Compiler-AST.js +1591 -0
  13. data/amber/js/Compiler-Core.deploy.js +1562 -0
  14. data/amber/js/Compiler-Core.js +1972 -0
  15. data/amber/js/Compiler-Exceptions.deploy.js +114 -0
  16. data/amber/js/Compiler-Exceptions.js +161 -0
  17. data/amber/js/Compiler-IR.deploy.js +2326 -0
  18. data/amber/js/Compiler-IR.js +3146 -0
  19. data/amber/js/Compiler-Inlining.deploy.js +1147 -0
  20. data/amber/js/Compiler-Inlining.js +1514 -0
  21. data/amber/js/Compiler-Semantic.deploy.js +1207 -0
  22. data/amber/js/Compiler-Semantic.js +1628 -0
  23. data/amber/js/Compiler-Tests.deploy.js +646 -60
  24. data/amber/js/Compiler-Tests.js +843 -82
  25. data/amber/js/Compiler.deploy.js +1097 -159
  26. data/amber/js/Compiler.js +1414 -161
  27. data/amber/js/Examples.deploy.js +31 -15
  28. data/amber/js/Examples.js +33 -17
  29. data/amber/js/Helios-Announcements.deploy.js +127 -0
  30. data/amber/js/Helios-Announcements.js +157 -0
  31. data/amber/js/Helios-Browser.deploy.js +1473 -0
  32. data/amber/js/Helios-Browser.js +1953 -0
  33. data/amber/js/Helios-Commands.deploy.js +403 -0
  34. data/amber/js/Helios-Commands.js +563 -0
  35. data/amber/js/Helios-Core.deploy.js +1070 -0
  36. data/amber/js/Helios-Core.js +1445 -0
  37. data/amber/js/Helios-Environments.deploy.js +132 -0
  38. data/amber/js/Helios-Environments.js +179 -0
  39. data/amber/js/Helios-Inspector.deploy.js +855 -0
  40. data/amber/js/Helios-Inspector.js +1155 -0
  41. data/amber/js/Helios-KeyBindings.deploy.js +753 -0
  42. data/amber/js/Helios-KeyBindings.js +1023 -0
  43. data/amber/js/Helios-Layout.deploy.js +383 -0
  44. data/amber/js/Helios-Layout.js +523 -0
  45. data/amber/js/Helios-Workspace.deploy.js +799 -0
  46. data/amber/js/Helios-Workspace.js +1074 -0
  47. data/amber/js/IDE.deploy.js +2541 -1490
  48. data/amber/js/IDE.js +2721 -1660
  49. data/amber/js/Importer-Exporter.deploy.js +671 -0
  50. data/amber/js/Importer-Exporter.js +816 -0
  51. data/amber/js/Kernel-Announcements.deploy.js +137 -20
  52. data/amber/js/Kernel-Announcements.js +176 -22
  53. data/amber/js/Kernel-Classes.deploy.js +555 -168
  54. data/amber/js/Kernel-Classes.js +662 -205
  55. data/amber/js/Kernel-Collections.deploy.js +1403 -618
  56. data/amber/js/Kernel-Collections.js +1545 -690
  57. data/amber/js/Kernel-Exceptions.deploy.js +109 -45
  58. data/amber/js/Kernel-Exceptions.js +123 -49
  59. data/amber/js/Kernel-Methods.deploy.js +196 -81
  60. data/amber/js/Kernel-Methods.js +214 -89
  61. data/amber/js/Kernel-Objects.deploy.js +1542 -1117
  62. data/amber/js/Kernel-Objects.js +1593 -1148
  63. data/amber/js/Kernel-Tests.deploy.js +1725 -772
  64. data/amber/js/Kernel-Tests.js +2301 -1123
  65. data/amber/js/Kernel-Transcript.deploy.js +23 -25
  66. data/amber/js/Kernel-Transcript.js +24 -26
  67. data/amber/js/SUnit.deploy.js +204 -131
  68. data/amber/js/SUnit.js +222 -139
  69. data/amber/js/Spaces.deploy.js +240 -0
  70. data/amber/js/Spaces.js +326 -0
  71. data/amber/js/amber.js +26 -7
  72. data/amber/js/boot.js +65 -47
  73. data/amber/js/init.js +1 -1
  74. data/amber/js/lib/CodeMirror/amber.css +21 -21
  75. data/amber/js/lib/CodeMirror/codemirror.css +119 -13
  76. data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
  77. data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
  78. data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
  79. data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
  80. data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
  81. data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
  82. data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
  83. data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
  84. data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
  85. data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
  86. data/amber/st/Compiler-AST.st +505 -0
  87. data/amber/st/Compiler-Core.st +835 -0
  88. data/amber/st/Compiler-Exceptions.st +87 -0
  89. data/amber/st/Compiler-IR.st +1097 -0
  90. data/amber/st/Compiler-Inlining.st +650 -0
  91. data/amber/st/Compiler-Semantic.st +558 -0
  92. data/amber/st/Compiler-Tests.st +285 -381
  93. data/amber/st/Compiler.st +725 -2
  94. data/amber/st/Helios-Announcements.st +104 -0
  95. data/amber/st/Helios-Browser.st +708 -0
  96. data/amber/st/Helios-Commands.st +223 -0
  97. data/amber/st/Helios-Core.st +532 -0
  98. data/amber/st/Helios-Environments.st +98 -0
  99. data/amber/st/Helios-Inspector.st +367 -0
  100. data/amber/st/Helios-KeyBindings.st +337 -0
  101. data/amber/st/Helios-Layout.st +199 -0
  102. data/amber/st/Helios-Workspace.st +367 -0
  103. data/amber/st/IDE.st +75 -53
  104. data/amber/st/Importer-Exporter.st +386 -0
  105. data/amber/st/Kernel-Announcements.st +92 -0
  106. data/amber/st/Kernel-Classes.st +137 -15
  107. data/amber/st/Kernel-Collections.st +137 -47
  108. data/amber/st/Kernel-Exceptions.st +14 -0
  109. data/amber/st/Kernel-Methods.st +9 -1
  110. data/amber/st/Kernel-Objects.st +29 -5
  111. data/amber/st/Kernel-Tests.st +545 -199
  112. data/amber/st/SUnit.st +10 -0
  113. data/amber/st/Spaces.st +142 -0
  114. data/lib/resin/app.rb +1 -1
  115. metadata +86 -31
  116. data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
  117. data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
@@ -0,0 +1,114 @@
1
+ smalltalk.addPackage('Compiler-Exceptions', {});
2
+ smalltalk.addClass('CompilerError', smalltalk.Error, [], 'Compiler-Exceptions');
3
+
4
+
5
+ smalltalk.addClass('ParseError', smalltalk.CompilerError, [], 'Compiler-Exceptions');
6
+
7
+
8
+ smalltalk.addClass('SemanticError', smalltalk.CompilerError, [], 'Compiler-Exceptions');
9
+
10
+
11
+ smalltalk.addClass('InliningError', smalltalk.SemanticError, [], 'Compiler-Exceptions');
12
+
13
+
14
+ smalltalk.addClass('InvalidAssignmentError', smalltalk.SemanticError, ['variableName'], 'Compiler-Exceptions');
15
+ smalltalk.addMethod(
16
+ "_messageText",
17
+ smalltalk.method({
18
+ selector: "messageText",
19
+ fn: function (){
20
+ var self=this;
21
+ var $1;
22
+ $1=smalltalk.send(" Invalid assignment to variable: ","__comma",[smalltalk.send(self,"_variableName",[])]);
23
+ return $1;
24
+ }
25
+ }),
26
+ smalltalk.InvalidAssignmentError);
27
+
28
+ smalltalk.addMethod(
29
+ "_variableName",
30
+ smalltalk.method({
31
+ selector: "variableName",
32
+ fn: function (){
33
+ var self=this;
34
+ return self["@variableName"];
35
+ }
36
+ }),
37
+ smalltalk.InvalidAssignmentError);
38
+
39
+ smalltalk.addMethod(
40
+ "_variableName_",
41
+ smalltalk.method({
42
+ selector: "variableName:",
43
+ fn: function (aString){
44
+ var self=this;
45
+ self["@variableName"]=aString;
46
+ return self}
47
+ }),
48
+ smalltalk.InvalidAssignmentError);
49
+
50
+
51
+
52
+ smalltalk.addClass('ShadowingVariableError', smalltalk.SemanticError, ['variableName'], 'Compiler-Exceptions');
53
+ smalltalk.addMethod(
54
+ "_messageText",
55
+ smalltalk.method({
56
+ selector: "messageText",
57
+ fn: function (){
58
+ var self=this;
59
+ var $1;
60
+ $1=smalltalk.send(smalltalk.send("Variable shadowing error: ","__comma",[smalltalk.send(self,"_variableName",[])]),"__comma",[" is already defined"]);
61
+ return $1;
62
+ }
63
+ }),
64
+ smalltalk.ShadowingVariableError);
65
+
66
+ smalltalk.addMethod(
67
+ "_variableName",
68
+ smalltalk.method({
69
+ selector: "variableName",
70
+ fn: function (){
71
+ var self=this;
72
+ return self["@variableName"];
73
+ }
74
+ }),
75
+ smalltalk.ShadowingVariableError);
76
+
77
+ smalltalk.addMethod(
78
+ "_variableName_",
79
+ smalltalk.method({
80
+ selector: "variableName:",
81
+ fn: function (aString){
82
+ var self=this;
83
+ self["@variableName"]=aString;
84
+ return self}
85
+ }),
86
+ smalltalk.ShadowingVariableError);
87
+
88
+
89
+
90
+ smalltalk.addClass('UnknownVariableError', smalltalk.SemanticError, ['variableName'], 'Compiler-Exceptions');
91
+ smalltalk.addMethod(
92
+ "_variableName",
93
+ smalltalk.method({
94
+ selector: "variableName",
95
+ fn: function (){
96
+ var self=this;
97
+ return self["@variableName"];
98
+ }
99
+ }),
100
+ smalltalk.UnknownVariableError);
101
+
102
+ smalltalk.addMethod(
103
+ "_variableName_",
104
+ smalltalk.method({
105
+ selector: "variableName:",
106
+ fn: function (aString){
107
+ var self=this;
108
+ self["@variableName"]=aString;
109
+ return self}
110
+ }),
111
+ smalltalk.UnknownVariableError);
112
+
113
+
114
+
@@ -0,0 +1,161 @@
1
+ smalltalk.addPackage('Compiler-Exceptions', {});
2
+ smalltalk.addClass('CompilerError', smalltalk.Error, [], 'Compiler-Exceptions');
3
+ smalltalk.CompilerError.comment="I am the common superclass of all compiling errors."
4
+
5
+
6
+ smalltalk.addClass('ParseError', smalltalk.CompilerError, [], 'Compiler-Exceptions');
7
+ smalltalk.ParseError.comment="Instance of ParseError are signaled on any parsing error. \x0aSee `Smalltalk >> #parse:`"
8
+
9
+
10
+ smalltalk.addClass('SemanticError', smalltalk.CompilerError, [], 'Compiler-Exceptions');
11
+ smalltalk.SemanticError.comment="I represent an abstract semantic error thrown by the SemanticAnalyzer.\x0aSemantic errors can be unknown variable errors, etc.\x0aSee my subclasses for concrete errors.\x0a\x0aThe IDE should catch instances of Semantic error to deal with them when compiling"
12
+
13
+
14
+ smalltalk.addClass('InliningError', smalltalk.SemanticError, [], 'Compiler-Exceptions');
15
+ smalltalk.InliningError.comment="Instances of InliningError are signaled when using an `InliningCodeGenerator`in a `Compiler`."
16
+
17
+
18
+ smalltalk.addClass('InvalidAssignmentError', smalltalk.SemanticError, ['variableName'], 'Compiler-Exceptions');
19
+ smalltalk.InvalidAssignmentError.comment="I get signaled when a pseudo variable gets assigned."
20
+ smalltalk.addMethod(
21
+ "_messageText",
22
+ smalltalk.method({
23
+ selector: "messageText",
24
+ category: 'accessing',
25
+ fn: function (){
26
+ var self=this;
27
+ var $1;
28
+ $1=smalltalk.send(" Invalid assignment to variable: ","__comma",[smalltalk.send(self,"_variableName",[])]);
29
+ return $1;
30
+ },
31
+ args: [],
32
+ source: "messageText\x0a\x09^ ' Invalid assignment to variable: ', self variableName",
33
+ messageSends: [",", "variableName"],
34
+ referencedClasses: []
35
+ }),
36
+ smalltalk.InvalidAssignmentError);
37
+
38
+ smalltalk.addMethod(
39
+ "_variableName",
40
+ smalltalk.method({
41
+ selector: "variableName",
42
+ category: 'accessing',
43
+ fn: function (){
44
+ var self=this;
45
+ return self["@variableName"];
46
+ },
47
+ args: [],
48
+ source: "variableName\x0a\x09^ variableName",
49
+ messageSends: [],
50
+ referencedClasses: []
51
+ }),
52
+ smalltalk.InvalidAssignmentError);
53
+
54
+ smalltalk.addMethod(
55
+ "_variableName_",
56
+ smalltalk.method({
57
+ selector: "variableName:",
58
+ category: 'accessing',
59
+ fn: function (aString){
60
+ var self=this;
61
+ self["@variableName"]=aString;
62
+ return self},
63
+ args: ["aString"],
64
+ source: "variableName: aString\x0a\x09variableName := aString",
65
+ messageSends: [],
66
+ referencedClasses: []
67
+ }),
68
+ smalltalk.InvalidAssignmentError);
69
+
70
+
71
+
72
+ smalltalk.addClass('ShadowingVariableError', smalltalk.SemanticError, ['variableName'], 'Compiler-Exceptions');
73
+ smalltalk.ShadowingVariableError.comment="I get signaled when a variable in a block or method scope shadows a variable of the same name in an outer scope."
74
+ smalltalk.addMethod(
75
+ "_messageText",
76
+ smalltalk.method({
77
+ selector: "messageText",
78
+ category: 'accessing',
79
+ fn: function (){
80
+ var self=this;
81
+ var $1;
82
+ $1=smalltalk.send(smalltalk.send("Variable shadowing error: ","__comma",[smalltalk.send(self,"_variableName",[])]),"__comma",[" is already defined"]);
83
+ return $1;
84
+ },
85
+ args: [],
86
+ source: "messageText\x0a\x09^ 'Variable shadowing error: ', self variableName, ' is already defined'",
87
+ messageSends: [",", "variableName"],
88
+ referencedClasses: []
89
+ }),
90
+ smalltalk.ShadowingVariableError);
91
+
92
+ smalltalk.addMethod(
93
+ "_variableName",
94
+ smalltalk.method({
95
+ selector: "variableName",
96
+ category: 'accessing',
97
+ fn: function (){
98
+ var self=this;
99
+ return self["@variableName"];
100
+ },
101
+ args: [],
102
+ source: "variableName\x0a\x09^ variableName",
103
+ messageSends: [],
104
+ referencedClasses: []
105
+ }),
106
+ smalltalk.ShadowingVariableError);
107
+
108
+ smalltalk.addMethod(
109
+ "_variableName_",
110
+ smalltalk.method({
111
+ selector: "variableName:",
112
+ category: 'accessing',
113
+ fn: function (aString){
114
+ var self=this;
115
+ self["@variableName"]=aString;
116
+ return self},
117
+ args: ["aString"],
118
+ source: "variableName: aString\x0a\x09variableName := aString",
119
+ messageSends: [],
120
+ referencedClasses: []
121
+ }),
122
+ smalltalk.ShadowingVariableError);
123
+
124
+
125
+
126
+ smalltalk.addClass('UnknownVariableError', smalltalk.SemanticError, ['variableName'], 'Compiler-Exceptions');
127
+ smalltalk.UnknownVariableError.comment="I get signaled when a variable is not defined.\x0aThe default behavior is to allow it, as this is how Amber currently is able to seamlessly send messages to JavaScript objects."
128
+ smalltalk.addMethod(
129
+ "_variableName",
130
+ smalltalk.method({
131
+ selector: "variableName",
132
+ category: 'accessing',
133
+ fn: function (){
134
+ var self=this;
135
+ return self["@variableName"];
136
+ },
137
+ args: [],
138
+ source: "variableName\x0a\x09^ variableName",
139
+ messageSends: [],
140
+ referencedClasses: []
141
+ }),
142
+ smalltalk.UnknownVariableError);
143
+
144
+ smalltalk.addMethod(
145
+ "_variableName_",
146
+ smalltalk.method({
147
+ selector: "variableName:",
148
+ category: 'accessing',
149
+ fn: function (aString){
150
+ var self=this;
151
+ self["@variableName"]=aString;
152
+ return self},
153
+ args: ["aString"],
154
+ source: "variableName: aString\x0a\x09variableName := aString",
155
+ messageSends: [],
156
+ referencedClasses: []
157
+ }),
158
+ smalltalk.UnknownVariableError);
159
+
160
+
161
+
@@ -0,0 +1,2326 @@
1
+ smalltalk.addPackage('Compiler-IR', {});
2
+ smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler-IR');
3
+ smalltalk.addMethod(
4
+ "_alias_",
5
+ smalltalk.method({
6
+ selector: "alias:",
7
+ fn: function (aNode){
8
+ var self=this;
9
+ var $1,$2,$3,$4,$5,$6;
10
+ var variable;
11
+ $1=smalltalk.send(aNode,"_isValueNode",[]);
12
+ if(smalltalk.assert($1)){
13
+ $2=smalltalk.send(self,"_visit_",[aNode]);
14
+ return $2;
15
+ };
16
+ $3=smalltalk.send((smalltalk.IRVariable || IRVariable),"_new",[]);
17
+ smalltalk.send($3,"_variable_",[smalltalk.send(smalltalk.send((smalltalk.AliasVar || AliasVar),"_new",[]),"_name_",[smalltalk.send("$","__comma",[smalltalk.send(self,"_nextAlias",[])])])]);
18
+ $4=smalltalk.send($3,"_yourself",[]);
19
+ variable=$4;
20
+ $5=smalltalk.send((smalltalk.IRAssignment || IRAssignment),"_new",[]);
21
+ smalltalk.send($5,"_add_",[variable]);
22
+ smalltalk.send($5,"_add_",[smalltalk.send(self,"_visit_",[aNode])]);
23
+ $6=smalltalk.send($5,"_yourself",[]);
24
+ smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[$6]);
25
+ smalltalk.send(smalltalk.send(smalltalk.send(self,"_method",[]),"_internalVariables",[]),"_add_",[variable]);
26
+ return variable;
27
+ }
28
+ }),
29
+ smalltalk.IRASTTranslator);
30
+
31
+ smalltalk.addMethod(
32
+ "_method",
33
+ smalltalk.method({
34
+ selector: "method",
35
+ fn: function (){
36
+ var self=this;
37
+ return self["@method"];
38
+ }
39
+ }),
40
+ smalltalk.IRASTTranslator);
41
+
42
+ smalltalk.addMethod(
43
+ "_method_",
44
+ smalltalk.method({
45
+ selector: "method:",
46
+ fn: function (anIRMethod){
47
+ var self=this;
48
+ self["@method"]=anIRMethod;
49
+ return self}
50
+ }),
51
+ smalltalk.IRASTTranslator);
52
+
53
+ smalltalk.addMethod(
54
+ "_nextAlias",
55
+ smalltalk.method({
56
+ selector: "nextAlias",
57
+ fn: function (){
58
+ var self=this;
59
+ var $1;
60
+ if(($receiver = self["@nextAlias"]) == nil || $receiver == undefined){
61
+ self["@nextAlias"]=(0);
62
+ self["@nextAlias"];
63
+ } else {
64
+ self["@nextAlias"];
65
+ };
66
+ self["@nextAlias"]=smalltalk.send(self["@nextAlias"],"__plus",[(1)]);
67
+ $1=smalltalk.send(self["@nextAlias"],"_asString",[]);
68
+ return $1;
69
+ }
70
+ }),
71
+ smalltalk.IRASTTranslator);
72
+
73
+ smalltalk.addMethod(
74
+ "_sequence",
75
+ smalltalk.method({
76
+ selector: "sequence",
77
+ fn: function (){
78
+ var self=this;
79
+ return self["@sequence"];
80
+ }
81
+ }),
82
+ smalltalk.IRASTTranslator);
83
+
84
+ smalltalk.addMethod(
85
+ "_sequence_",
86
+ smalltalk.method({
87
+ selector: "sequence:",
88
+ fn: function (anIRSequence){
89
+ var self=this;
90
+ self["@sequence"]=anIRSequence;
91
+ return self}
92
+ }),
93
+ smalltalk.IRASTTranslator);
94
+
95
+ smalltalk.addMethod(
96
+ "_source",
97
+ smalltalk.method({
98
+ selector: "source",
99
+ fn: function (){
100
+ var self=this;
101
+ return self["@source"];
102
+ }
103
+ }),
104
+ smalltalk.IRASTTranslator);
105
+
106
+ smalltalk.addMethod(
107
+ "_source_",
108
+ smalltalk.method({
109
+ selector: "source:",
110
+ fn: function (aString){
111
+ var self=this;
112
+ self["@source"]=aString;
113
+ return self}
114
+ }),
115
+ smalltalk.IRASTTranslator);
116
+
117
+ smalltalk.addMethod(
118
+ "_theClass",
119
+ smalltalk.method({
120
+ selector: "theClass",
121
+ fn: function (){
122
+ var self=this;
123
+ return self["@theClass"];
124
+ }
125
+ }),
126
+ smalltalk.IRASTTranslator);
127
+
128
+ smalltalk.addMethod(
129
+ "_theClass_",
130
+ smalltalk.method({
131
+ selector: "theClass:",
132
+ fn: function (aClass){
133
+ var self=this;
134
+ self["@theClass"]=aClass;
135
+ return self}
136
+ }),
137
+ smalltalk.IRASTTranslator);
138
+
139
+ smalltalk.addMethod(
140
+ "_visitAssignmentNode_",
141
+ smalltalk.method({
142
+ selector: "visitAssignmentNode:",
143
+ fn: function (aNode){
144
+ var self=this;
145
+ var $1,$2;
146
+ var left;
147
+ var right;
148
+ var assignment;
149
+ right=smalltalk.send(self,"_visit_",[smalltalk.send(aNode,"_right",[])]);
150
+ left=smalltalk.send(self,"_visit_",[smalltalk.send(aNode,"_left",[])]);
151
+ $1=smalltalk.send((smalltalk.IRAssignment || IRAssignment),"_new",[]);
152
+ smalltalk.send($1,"_add_",[left]);
153
+ smalltalk.send($1,"_add_",[right]);
154
+ $2=smalltalk.send($1,"_yourself",[]);
155
+ smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[$2]);
156
+ return left;
157
+ }
158
+ }),
159
+ smalltalk.IRASTTranslator);
160
+
161
+ smalltalk.addMethod(
162
+ "_visitBlockNode_",
163
+ smalltalk.method({
164
+ selector: "visitBlockNode:",
165
+ fn: function (aNode){
166
+ var self=this;
167
+ var $1,$2,$3,$4;
168
+ var closure;
169
+ $1=smalltalk.send((smalltalk.IRClosure || IRClosure),"_new",[]);
170
+ smalltalk.send($1,"_arguments_",[smalltalk.send(aNode,"_parameters",[])]);
171
+ smalltalk.send($1,"_scope_",[smalltalk.send(aNode,"_scope",[])]);
172
+ $2=smalltalk.send($1,"_yourself",[]);
173
+ closure=$2;
174
+ smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_temps",[]),"_do_",[(function(each){
175
+ $3=smalltalk.send((smalltalk.IRTempDeclaration || IRTempDeclaration),"_new",[]);
176
+ smalltalk.send($3,"_name_",[smalltalk.send(each,"_name",[])]);
177
+ $4=smalltalk.send($3,"_yourself",[]);
178
+ return smalltalk.send(closure,"_add_",[$4]);
179
+ })]);
180
+ smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
181
+ return smalltalk.send(closure,"_add_",[smalltalk.send(self,"_visit_",[each])]);
182
+ })]);
183
+ return closure;
184
+ }
185
+ }),
186
+ smalltalk.IRASTTranslator);
187
+
188
+ smalltalk.addMethod(
189
+ "_visitBlockSequenceNode_",
190
+ smalltalk.method({
191
+ selector: "visitBlockSequenceNode:",
192
+ fn: function (aNode){
193
+ var self=this;
194
+ var $2,$3,$4,$1;
195
+ $1=smalltalk.send(self,"_withSequence_do_",[smalltalk.send((smalltalk.IRBlockSequence || IRBlockSequence),"_new",[]),(function(){
196
+ return smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_ifNotEmpty_",[(function(){
197
+ smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_allButLast",[]),"_do_",[(function(each){
198
+ return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[smalltalk.send(self,"_visit_",[each])]);
199
+ })]);
200
+ $2=smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[]),"_isReturnNode",[]);
201
+ if(smalltalk.assert($2)){
202
+ return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[])])]);
203
+ } else {
204
+ $3=smalltalk.send((smalltalk.IRBlockReturn || IRBlockReturn),"_new",[]);
205
+ smalltalk.send($3,"_add_",[smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[])])]);
206
+ $4=smalltalk.send($3,"_yourself",[]);
207
+ return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[$4]);
208
+ };
209
+ })]);
210
+ })]);
211
+ return $1;
212
+ }
213
+ }),
214
+ smalltalk.IRASTTranslator);
215
+
216
+ smalltalk.addMethod(
217
+ "_visitCascadeNode_",
218
+ smalltalk.method({
219
+ selector: "visitCascadeNode:",
220
+ fn: function (aNode){
221
+ var self=this;
222
+ var $1,$2;
223
+ var alias;
224
+ $1=smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_isValueNode",[]);
225
+ if(! smalltalk.assert($1)){
226
+ alias=smalltalk.send(self,"_alias_",[smalltalk.send(aNode,"_receiver",[])]);
227
+ alias;
228
+ smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
229
+ return smalltalk.send(each,"_receiver_",[smalltalk.send(smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]),"_binding_",[smalltalk.send(alias,"_variable",[])])]);
230
+ })]);
231
+ };
232
+ smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_allButLast",[]),"_do_",[(function(each){
233
+ return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[smalltalk.send(self,"_visit_",[each])]);
234
+ })]);
235
+ $2=smalltalk.send(self,"_alias_",[smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_last",[])]);
236
+ return $2;
237
+ }
238
+ }),
239
+ smalltalk.IRASTTranslator);
240
+
241
+ smalltalk.addMethod(
242
+ "_visitDynamicArrayNode_",
243
+ smalltalk.method({
244
+ selector: "visitDynamicArrayNode:",
245
+ fn: function (aNode){
246
+ var self=this;
247
+ var array;
248
+ array=smalltalk.send((smalltalk.IRDynamicArray || IRDynamicArray),"_new",[]);
249
+ smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
250
+ return smalltalk.send(array,"_add_",[smalltalk.send(self,"_visit_",[each])]);
251
+ })]);
252
+ return array;
253
+ }
254
+ }),
255
+ smalltalk.IRASTTranslator);
256
+
257
+ smalltalk.addMethod(
258
+ "_visitDynamicDictionaryNode_",
259
+ smalltalk.method({
260
+ selector: "visitDynamicDictionaryNode:",
261
+ fn: function (aNode){
262
+ var self=this;
263
+ var dictionary;
264
+ dictionary=smalltalk.send((smalltalk.IRDynamicDictionary || IRDynamicDictionary),"_new",[]);
265
+ smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
266
+ return smalltalk.send(dictionary,"_add_",[smalltalk.send(self,"_visit_",[each])]);
267
+ })]);
268
+ return dictionary;
269
+ }
270
+ }),
271
+ smalltalk.IRASTTranslator);
272
+
273
+ smalltalk.addMethod(
274
+ "_visitJSStatementNode_",
275
+ smalltalk.method({
276
+ selector: "visitJSStatementNode:",
277
+ fn: function (aNode){
278
+ var self=this;
279
+ var $2,$3,$1;
280
+ $2=smalltalk.send((smalltalk.IRVerbatim || IRVerbatim),"_new",[]);
281
+ smalltalk.send($2,"_source_",[smalltalk.send(aNode,"_source",[])]);
282
+ $3=smalltalk.send($2,"_yourself",[]);
283
+ $1=$3;
284
+ return $1;
285
+ }
286
+ }),
287
+ smalltalk.IRASTTranslator);
288
+
289
+ smalltalk.addMethod(
290
+ "_visitMethodNode_",
291
+ smalltalk.method({
292
+ selector: "visitMethodNode:",
293
+ fn: function (aNode){
294
+ var self=this;
295
+ var $1,$2,$3,$4,$5,$6,$7,$8;
296
+ $1=smalltalk.send((smalltalk.IRMethod || IRMethod),"_new",[]);
297
+ smalltalk.send($1,"_source_",[smalltalk.send(self,"_source",[])]);
298
+ smalltalk.send($1,"_arguments_",[smalltalk.send(aNode,"_arguments",[])]);
299
+ smalltalk.send($1,"_selector_",[smalltalk.send(aNode,"_selector",[])]);
300
+ smalltalk.send($1,"_messageSends_",[smalltalk.send(aNode,"_messageSends",[])]);
301
+ smalltalk.send($1,"_classReferences_",[smalltalk.send(aNode,"_classReferences",[])]);
302
+ smalltalk.send($1,"_scope_",[smalltalk.send(aNode,"_scope",[])]);
303
+ $2=smalltalk.send($1,"_yourself",[]);
304
+ smalltalk.send(self,"_method_",[$2]);
305
+ smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_temps",[]),"_do_",[(function(each){
306
+ $3=smalltalk.send((smalltalk.IRTempDeclaration || IRTempDeclaration),"_new",[]);
307
+ smalltalk.send($3,"_name_",[smalltalk.send(each,"_name",[])]);
308
+ $4=smalltalk.send($3,"_yourself",[]);
309
+ return smalltalk.send(smalltalk.send(self,"_method",[]),"_add_",[$4]);
310
+ })]);
311
+ smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
312
+ return smalltalk.send(smalltalk.send(self,"_method",[]),"_add_",[smalltalk.send(self,"_visit_",[each])]);
313
+ })]);
314
+ $5=smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_hasLocalReturn",[]);
315
+ if(! smalltalk.assert($5)){
316
+ $6=smalltalk.send((smalltalk.IRVariable || IRVariable),"_new",[]);
317
+ smalltalk.send($6,"_variable_",[smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_scope",[]),"_pseudoVars",[]),"_at_",["self"])]);
318
+ $7=smalltalk.send($6,"_yourself",[]);
319
+ smalltalk.send(smalltalk.send(smalltalk.send(self,"_method",[]),"_add_",[smalltalk.send((smalltalk.IRReturn || IRReturn),"_new",[])]),"_add_",[$7]);
320
+ };
321
+ $8=smalltalk.send(self,"_method",[]);
322
+ return $8;
323
+ }
324
+ }),
325
+ smalltalk.IRASTTranslator);
326
+
327
+ smalltalk.addMethod(
328
+ "_visitReturnNode_",
329
+ smalltalk.method({
330
+ selector: "visitReturnNode:",
331
+ fn: function (aNode){
332
+ var self=this;
333
+ var $1;
334
+ var return_;
335
+ $1=smalltalk.send(aNode,"_nonLocalReturn",[]);
336
+ if(smalltalk.assert($1)){
337
+ return_=smalltalk.send((smalltalk.IRNonLocalReturn || IRNonLocalReturn),"_new",[]);
338
+ } else {
339
+ return_=smalltalk.send((smalltalk.IRReturn || IRReturn),"_new",[]);
340
+ };
341
+ smalltalk.send(return_,"_scope_",[smalltalk.send(aNode,"_scope",[])]);
342
+ smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
343
+ return smalltalk.send(return_,"_add_",[smalltalk.send(self,"_alias_",[each])]);
344
+ })]);
345
+ return return_;
346
+ }
347
+ }),
348
+ smalltalk.IRASTTranslator);
349
+
350
+ smalltalk.addMethod(
351
+ "_visitSendNode_",
352
+ smalltalk.method({
353
+ selector: "visitSendNode:",
354
+ fn: function (aNode){
355
+ var self=this;
356
+ var $1,$2,$3,$4;
357
+ var send;
358
+ var receiver;
359
+ var arguments;
360
+ send=smalltalk.send((smalltalk.IRSend || IRSend),"_new",[]);
361
+ smalltalk.send(send,"_selector_",[smalltalk.send(aNode,"_selector",[])]);
362
+ $1=smalltalk.send(send,"_index_",[smalltalk.send(aNode,"_index",[])]);
363
+ $2=smalltalk.send(aNode,"_superSend",[]);
364
+ if(smalltalk.assert($2)){
365
+ smalltalk.send(send,"_classSend_",[smalltalk.send(smalltalk.send(self,"_theClass",[]),"_superclass",[])]);
366
+ };
367
+ $3=smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_shouldBeInlined",[]),"_or_",[(function(){
368
+ return smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_shouldBeAliased",[]);
369
+ })]);
370
+ if(smalltalk.assert($3)){
371
+ receiver=smalltalk.send(self,"_alias_",[smalltalk.send(aNode,"_receiver",[])]);
372
+ } else {
373
+ receiver=smalltalk.send(self,"_visit_",[smalltalk.send(aNode,"_receiver",[])]);
374
+ };
375
+ arguments=smalltalk.send(smalltalk.send(aNode,"_arguments",[]),"_collect_",[(function(each){
376
+ $4=smalltalk.send(each,"_shouldBeInlined",[]);
377
+ if(smalltalk.assert($4)){
378
+ return smalltalk.send(self,"_alias_",[each]);
379
+ } else {
380
+ return smalltalk.send(self,"_visit_",[each]);
381
+ };
382
+ })]);
383
+ smalltalk.send(send,"_add_",[receiver]);
384
+ smalltalk.send(arguments,"_do_",[(function(each){
385
+ return smalltalk.send(send,"_add_",[each]);
386
+ })]);
387
+ return send;
388
+ }
389
+ }),
390
+ smalltalk.IRASTTranslator);
391
+
392
+ smalltalk.addMethod(
393
+ "_visitSequenceNode_",
394
+ smalltalk.method({
395
+ selector: "visitSequenceNode:",
396
+ fn: function (aNode){
397
+ var self=this;
398
+ var $2,$1;
399
+ $1=smalltalk.send(self,"_withSequence_do_",[smalltalk.send((smalltalk.IRSequence || IRSequence),"_new",[]),(function(){
400
+ return smalltalk.send(smalltalk.send(aNode,"_nodes",[]),"_do_",[(function(each){
401
+ var instruction;
402
+ instruction=smalltalk.send(self,"_visit_",[each]);
403
+ instruction;
404
+ $2=smalltalk.send(instruction,"_isVariable",[]);
405
+ if(! smalltalk.assert($2)){
406
+ return smalltalk.send(smalltalk.send(self,"_sequence",[]),"_add_",[instruction]);
407
+ };
408
+ })]);
409
+ })]);
410
+ return $1;
411
+ }
412
+ }),
413
+ smalltalk.IRASTTranslator);
414
+
415
+ smalltalk.addMethod(
416
+ "_visitValueNode_",
417
+ smalltalk.method({
418
+ selector: "visitValueNode:",
419
+ fn: function (aNode){
420
+ var self=this;
421
+ var $2,$3,$1;
422
+ $2=smalltalk.send((smalltalk.IRValue || IRValue),"_new",[]);
423
+ smalltalk.send($2,"_value_",[smalltalk.send(aNode,"_value",[])]);
424
+ $3=smalltalk.send($2,"_yourself",[]);
425
+ $1=$3;
426
+ return $1;
427
+ }
428
+ }),
429
+ smalltalk.IRASTTranslator);
430
+
431
+ smalltalk.addMethod(
432
+ "_visitVariableNode_",
433
+ smalltalk.method({
434
+ selector: "visitVariableNode:",
435
+ fn: function (aNode){
436
+ var self=this;
437
+ var $2,$3,$1;
438
+ $2=smalltalk.send((smalltalk.IRVariable || IRVariable),"_new",[]);
439
+ smalltalk.send($2,"_variable_",[smalltalk.send(aNode,"_binding",[])]);
440
+ $3=smalltalk.send($2,"_yourself",[]);
441
+ $1=$3;
442
+ return $1;
443
+ }
444
+ }),
445
+ smalltalk.IRASTTranslator);
446
+
447
+ smalltalk.addMethod(
448
+ "_withSequence_do_",
449
+ smalltalk.method({
450
+ selector: "withSequence:do:",
451
+ fn: function (aSequence,aBlock){
452
+ var self=this;
453
+ var outerSequence;
454
+ outerSequence=smalltalk.send(self,"_sequence",[]);
455
+ smalltalk.send(self,"_sequence_",[aSequence]);
456
+ smalltalk.send(aBlock,"_value",[]);
457
+ smalltalk.send(self,"_sequence_",[outerSequence]);
458
+ return aSequence;
459
+ }
460
+ }),
461
+ smalltalk.IRASTTranslator);
462
+
463
+
464
+
465
+ smalltalk.addClass('IRInstruction', smalltalk.Object, ['parent', 'instructions'], 'Compiler-IR');
466
+ smalltalk.addMethod(
467
+ "_accept_",
468
+ smalltalk.method({
469
+ selector: "accept:",
470
+ fn: function (aVisitor){
471
+ var self=this;
472
+ var $1;
473
+ $1=smalltalk.send(aVisitor,"_visitIRInstruction_",[self]);
474
+ return $1;
475
+ }
476
+ }),
477
+ smalltalk.IRInstruction);
478
+
479
+ smalltalk.addMethod(
480
+ "_add_",
481
+ smalltalk.method({
482
+ selector: "add:",
483
+ fn: function (anObject){
484
+ var self=this;
485
+ var $1;
486
+ smalltalk.send(anObject,"_parent_",[self]);
487
+ $1=smalltalk.send(smalltalk.send(self,"_instructions",[]),"_add_",[anObject]);
488
+ return $1;
489
+ }
490
+ }),
491
+ smalltalk.IRInstruction);
492
+
493
+ smalltalk.addMethod(
494
+ "_canBeAssigned",
495
+ smalltalk.method({
496
+ selector: "canBeAssigned",
497
+ fn: function (){
498
+ var self=this;
499
+ return true;
500
+ }
501
+ }),
502
+ smalltalk.IRInstruction);
503
+
504
+ smalltalk.addMethod(
505
+ "_instructions",
506
+ smalltalk.method({
507
+ selector: "instructions",
508
+ fn: function (){
509
+ var self=this;
510
+ var $1;
511
+ if(($receiver = self["@instructions"]) == nil || $receiver == undefined){
512
+ self["@instructions"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
513
+ $1=self["@instructions"];
514
+ } else {
515
+ $1=self["@instructions"];
516
+ };
517
+ return $1;
518
+ }
519
+ }),
520
+ smalltalk.IRInstruction);
521
+
522
+ smalltalk.addMethod(
523
+ "_isClosure",
524
+ smalltalk.method({
525
+ selector: "isClosure",
526
+ fn: function (){
527
+ var self=this;
528
+ return false;
529
+ }
530
+ }),
531
+ smalltalk.IRInstruction);
532
+
533
+ smalltalk.addMethod(
534
+ "_isInlined",
535
+ smalltalk.method({
536
+ selector: "isInlined",
537
+ fn: function (){
538
+ var self=this;
539
+ return false;
540
+ }
541
+ }),
542
+ smalltalk.IRInstruction);
543
+
544
+ smalltalk.addMethod(
545
+ "_isLocalReturn",
546
+ smalltalk.method({
547
+ selector: "isLocalReturn",
548
+ fn: function (){
549
+ var self=this;
550
+ return false;
551
+ }
552
+ }),
553
+ smalltalk.IRInstruction);
554
+
555
+ smalltalk.addMethod(
556
+ "_isReturn",
557
+ smalltalk.method({
558
+ selector: "isReturn",
559
+ fn: function (){
560
+ var self=this;
561
+ return false;
562
+ }
563
+ }),
564
+ smalltalk.IRInstruction);
565
+
566
+ smalltalk.addMethod(
567
+ "_isSend",
568
+ smalltalk.method({
569
+ selector: "isSend",
570
+ fn: function (){
571
+ var self=this;
572
+ return false;
573
+ }
574
+ }),
575
+ smalltalk.IRInstruction);
576
+
577
+ smalltalk.addMethod(
578
+ "_isSequence",
579
+ smalltalk.method({
580
+ selector: "isSequence",
581
+ fn: function (){
582
+ var self=this;
583
+ return false;
584
+ }
585
+ }),
586
+ smalltalk.IRInstruction);
587
+
588
+ smalltalk.addMethod(
589
+ "_isTempDeclaration",
590
+ smalltalk.method({
591
+ selector: "isTempDeclaration",
592
+ fn: function (){
593
+ var self=this;
594
+ return false;
595
+ }
596
+ }),
597
+ smalltalk.IRInstruction);
598
+
599
+ smalltalk.addMethod(
600
+ "_isVariable",
601
+ smalltalk.method({
602
+ selector: "isVariable",
603
+ fn: function (){
604
+ var self=this;
605
+ return false;
606
+ }
607
+ }),
608
+ smalltalk.IRInstruction);
609
+
610
+ smalltalk.addMethod(
611
+ "_parent",
612
+ smalltalk.method({
613
+ selector: "parent",
614
+ fn: function (){
615
+ var self=this;
616
+ return self["@parent"];
617
+ }
618
+ }),
619
+ smalltalk.IRInstruction);
620
+
621
+ smalltalk.addMethod(
622
+ "_parent_",
623
+ smalltalk.method({
624
+ selector: "parent:",
625
+ fn: function (anIRInstruction){
626
+ var self=this;
627
+ self["@parent"]=anIRInstruction;
628
+ return self}
629
+ }),
630
+ smalltalk.IRInstruction);
631
+
632
+ smalltalk.addMethod(
633
+ "_remove",
634
+ smalltalk.method({
635
+ selector: "remove",
636
+ fn: function (){
637
+ var self=this;
638
+ smalltalk.send(smalltalk.send(self,"_parent",[]),"_remove_",[self]);
639
+ return self}
640
+ }),
641
+ smalltalk.IRInstruction);
642
+
643
+ smalltalk.addMethod(
644
+ "_remove_",
645
+ smalltalk.method({
646
+ selector: "remove:",
647
+ fn: function (anIRInstruction){
648
+ var self=this;
649
+ smalltalk.send(smalltalk.send(self,"_instructions",[]),"_remove_",[anIRInstruction]);
650
+ return self}
651
+ }),
652
+ smalltalk.IRInstruction);
653
+
654
+ smalltalk.addMethod(
655
+ "_replace_with_",
656
+ smalltalk.method({
657
+ selector: "replace:with:",
658
+ fn: function (anIRInstruction,anotherIRInstruction){
659
+ var self=this;
660
+ smalltalk.send(anotherIRInstruction,"_parent_",[self]);
661
+ smalltalk.send(smalltalk.send(self,"_instructions",[]),"_at_put_",[smalltalk.send(smalltalk.send(self,"_instructions",[]),"_indexOf_",[anIRInstruction]),anotherIRInstruction]);
662
+ return self}
663
+ }),
664
+ smalltalk.IRInstruction);
665
+
666
+ smalltalk.addMethod(
667
+ "_replaceWith_",
668
+ smalltalk.method({
669
+ selector: "replaceWith:",
670
+ fn: function (anIRInstruction){
671
+ var self=this;
672
+ smalltalk.send(smalltalk.send(self,"_parent",[]),"_replace_with_",[self,anIRInstruction]);
673
+ return self}
674
+ }),
675
+ smalltalk.IRInstruction);
676
+
677
+
678
+ smalltalk.addMethod(
679
+ "_on_",
680
+ smalltalk.method({
681
+ selector: "on:",
682
+ fn: function (aBuilder){
683
+ var self=this;
684
+ var $2,$3,$1;
685
+ $2=smalltalk.send(self,"_new",[]);
686
+ smalltalk.send($2,"_builder_",[aBuilder]);
687
+ $3=smalltalk.send($2,"_yourself",[]);
688
+ $1=$3;
689
+ return $1;
690
+ }
691
+ }),
692
+ smalltalk.IRInstruction.klass);
693
+
694
+
695
+ smalltalk.addClass('IRAssignment', smalltalk.IRInstruction, [], 'Compiler-IR');
696
+ smalltalk.addMethod(
697
+ "_accept_",
698
+ smalltalk.method({
699
+ selector: "accept:",
700
+ fn: function (aVisitor){
701
+ var self=this;
702
+ var $1;
703
+ $1=smalltalk.send(aVisitor,"_visitIRAssignment_",[self]);
704
+ return $1;
705
+ }
706
+ }),
707
+ smalltalk.IRAssignment);
708
+
709
+
710
+
711
+ smalltalk.addClass('IRDynamicArray', smalltalk.IRInstruction, [], 'Compiler-IR');
712
+ smalltalk.addMethod(
713
+ "_accept_",
714
+ smalltalk.method({
715
+ selector: "accept:",
716
+ fn: function (aVisitor){
717
+ var self=this;
718
+ var $1;
719
+ $1=smalltalk.send(aVisitor,"_visitIRDynamicArray_",[self]);
720
+ return $1;
721
+ }
722
+ }),
723
+ smalltalk.IRDynamicArray);
724
+
725
+
726
+
727
+ smalltalk.addClass('IRDynamicDictionary', smalltalk.IRInstruction, [], 'Compiler-IR');
728
+ smalltalk.addMethod(
729
+ "_accept_",
730
+ smalltalk.method({
731
+ selector: "accept:",
732
+ fn: function (aVisitor){
733
+ var self=this;
734
+ var $1;
735
+ $1=smalltalk.send(aVisitor,"_visitIRDynamicDictionary_",[self]);
736
+ return $1;
737
+ }
738
+ }),
739
+ smalltalk.IRDynamicDictionary);
740
+
741
+
742
+
743
+ smalltalk.addClass('IRScopedInstruction', smalltalk.IRInstruction, ['scope'], 'Compiler-IR');
744
+ smalltalk.addMethod(
745
+ "_scope",
746
+ smalltalk.method({
747
+ selector: "scope",
748
+ fn: function (){
749
+ var self=this;
750
+ return self["@scope"];
751
+ }
752
+ }),
753
+ smalltalk.IRScopedInstruction);
754
+
755
+ smalltalk.addMethod(
756
+ "_scope_",
757
+ smalltalk.method({
758
+ selector: "scope:",
759
+ fn: function (aScope){
760
+ var self=this;
761
+ self["@scope"]=aScope;
762
+ return self}
763
+ }),
764
+ smalltalk.IRScopedInstruction);
765
+
766
+
767
+
768
+ smalltalk.addClass('IRClosure', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler-IR');
769
+ smalltalk.addMethod(
770
+ "_accept_",
771
+ smalltalk.method({
772
+ selector: "accept:",
773
+ fn: function (aVisitor){
774
+ var self=this;
775
+ var $1;
776
+ $1=smalltalk.send(aVisitor,"_visitIRClosure_",[self]);
777
+ return $1;
778
+ }
779
+ }),
780
+ smalltalk.IRClosure);
781
+
782
+ smalltalk.addMethod(
783
+ "_arguments",
784
+ smalltalk.method({
785
+ selector: "arguments",
786
+ fn: function (){
787
+ var self=this;
788
+ var $1;
789
+ if(($receiver = self["@arguments"]) == nil || $receiver == undefined){
790
+ $1=[];
791
+ } else {
792
+ $1=self["@arguments"];
793
+ };
794
+ return $1;
795
+ }
796
+ }),
797
+ smalltalk.IRClosure);
798
+
799
+ smalltalk.addMethod(
800
+ "_arguments_",
801
+ smalltalk.method({
802
+ selector: "arguments:",
803
+ fn: function (aCollection){
804
+ var self=this;
805
+ self["@arguments"]=aCollection;
806
+ return self}
807
+ }),
808
+ smalltalk.IRClosure);
809
+
810
+ smalltalk.addMethod(
811
+ "_isClosure",
812
+ smalltalk.method({
813
+ selector: "isClosure",
814
+ fn: function (){
815
+ var self=this;
816
+ return true;
817
+ }
818
+ }),
819
+ smalltalk.IRClosure);
820
+
821
+ smalltalk.addMethod(
822
+ "_scope_",
823
+ smalltalk.method({
824
+ selector: "scope:",
825
+ fn: function (aScope){
826
+ var self=this;
827
+ smalltalk.send(self,"_scope_",[aScope],smalltalk.IRScopedInstruction);
828
+ smalltalk.send(aScope,"_instruction_",[self]);
829
+ return self}
830
+ }),
831
+ smalltalk.IRClosure);
832
+
833
+ smalltalk.addMethod(
834
+ "_sequence",
835
+ smalltalk.method({
836
+ selector: "sequence",
837
+ fn: function (){
838
+ var self=this;
839
+ var $1;
840
+ $1=smalltalk.send(smalltalk.send(self,"_instructions",[]),"_last",[]);
841
+ return $1;
842
+ }
843
+ }),
844
+ smalltalk.IRClosure);
845
+
846
+
847
+
848
+ smalltalk.addClass('IRMethod', smalltalk.IRScopedInstruction, ['source', 'selector', 'classReferences', 'messageSends', 'arguments', 'internalVariables'], 'Compiler-IR');
849
+ smalltalk.addMethod(
850
+ "_accept_",
851
+ smalltalk.method({
852
+ selector: "accept:",
853
+ fn: function (aVisitor){
854
+ var self=this;
855
+ var $1;
856
+ $1=smalltalk.send(aVisitor,"_visitIRMethod_",[self]);
857
+ return $1;
858
+ }
859
+ }),
860
+ smalltalk.IRMethod);
861
+
862
+ smalltalk.addMethod(
863
+ "_arguments",
864
+ smalltalk.method({
865
+ selector: "arguments",
866
+ fn: function (){
867
+ var self=this;
868
+ return self["@arguments"];
869
+ }
870
+ }),
871
+ smalltalk.IRMethod);
872
+
873
+ smalltalk.addMethod(
874
+ "_arguments_",
875
+ smalltalk.method({
876
+ selector: "arguments:",
877
+ fn: function (aCollection){
878
+ var self=this;
879
+ self["@arguments"]=aCollection;
880
+ return self}
881
+ }),
882
+ smalltalk.IRMethod);
883
+
884
+ smalltalk.addMethod(
885
+ "_classReferences",
886
+ smalltalk.method({
887
+ selector: "classReferences",
888
+ fn: function (){
889
+ var self=this;
890
+ return self["@classReferences"];
891
+ }
892
+ }),
893
+ smalltalk.IRMethod);
894
+
895
+ smalltalk.addMethod(
896
+ "_classReferences_",
897
+ smalltalk.method({
898
+ selector: "classReferences:",
899
+ fn: function (aCollection){
900
+ var self=this;
901
+ self["@classReferences"]=aCollection;
902
+ return self}
903
+ }),
904
+ smalltalk.IRMethod);
905
+
906
+ smalltalk.addMethod(
907
+ "_internalVariables",
908
+ smalltalk.method({
909
+ selector: "internalVariables",
910
+ fn: function (){
911
+ var self=this;
912
+ var $1;
913
+ if(($receiver = self["@internalVariables"]) == nil || $receiver == undefined){
914
+ self["@internalVariables"]=smalltalk.send((smalltalk.Set || Set),"_new",[]);
915
+ $1=self["@internalVariables"];
916
+ } else {
917
+ $1=self["@internalVariables"];
918
+ };
919
+ return $1;
920
+ }
921
+ }),
922
+ smalltalk.IRMethod);
923
+
924
+ smalltalk.addMethod(
925
+ "_messageSends",
926
+ smalltalk.method({
927
+ selector: "messageSends",
928
+ fn: function (){
929
+ var self=this;
930
+ return self["@messageSends"];
931
+ }
932
+ }),
933
+ smalltalk.IRMethod);
934
+
935
+ smalltalk.addMethod(
936
+ "_messageSends_",
937
+ smalltalk.method({
938
+ selector: "messageSends:",
939
+ fn: function (aCollection){
940
+ var self=this;
941
+ self["@messageSends"]=aCollection;
942
+ return self}
943
+ }),
944
+ smalltalk.IRMethod);
945
+
946
+ smalltalk.addMethod(
947
+ "_scope_",
948
+ smalltalk.method({
949
+ selector: "scope:",
950
+ fn: function (aScope){
951
+ var self=this;
952
+ smalltalk.send(self,"_scope_",[aScope],smalltalk.IRScopedInstruction);
953
+ smalltalk.send(aScope,"_instruction_",[self]);
954
+ return self}
955
+ }),
956
+ smalltalk.IRMethod);
957
+
958
+ smalltalk.addMethod(
959
+ "_selector",
960
+ smalltalk.method({
961
+ selector: "selector",
962
+ fn: function (){
963
+ var self=this;
964
+ return self["@selector"];
965
+ }
966
+ }),
967
+ smalltalk.IRMethod);
968
+
969
+ smalltalk.addMethod(
970
+ "_selector_",
971
+ smalltalk.method({
972
+ selector: "selector:",
973
+ fn: function (aString){
974
+ var self=this;
975
+ self["@selector"]=aString;
976
+ return self}
977
+ }),
978
+ smalltalk.IRMethod);
979
+
980
+ smalltalk.addMethod(
981
+ "_source",
982
+ smalltalk.method({
983
+ selector: "source",
984
+ fn: function (){
985
+ var self=this;
986
+ return self["@source"];
987
+ }
988
+ }),
989
+ smalltalk.IRMethod);
990
+
991
+ smalltalk.addMethod(
992
+ "_source_",
993
+ smalltalk.method({
994
+ selector: "source:",
995
+ fn: function (aString){
996
+ var self=this;
997
+ self["@source"]=aString;
998
+ return self}
999
+ }),
1000
+ smalltalk.IRMethod);
1001
+
1002
+
1003
+
1004
+ smalltalk.addClass('IRReturn', smalltalk.IRScopedInstruction, [], 'Compiler-IR');
1005
+ smalltalk.addMethod(
1006
+ "_accept_",
1007
+ smalltalk.method({
1008
+ selector: "accept:",
1009
+ fn: function (aVisitor){
1010
+ var self=this;
1011
+ var $1;
1012
+ $1=smalltalk.send(aVisitor,"_visitIRReturn_",[self]);
1013
+ return $1;
1014
+ }
1015
+ }),
1016
+ smalltalk.IRReturn);
1017
+
1018
+ smalltalk.addMethod(
1019
+ "_canBeAssigned",
1020
+ smalltalk.method({
1021
+ selector: "canBeAssigned",
1022
+ fn: function (){
1023
+ var self=this;
1024
+ return false;
1025
+ }
1026
+ }),
1027
+ smalltalk.IRReturn);
1028
+
1029
+ smalltalk.addMethod(
1030
+ "_isBlockReturn",
1031
+ smalltalk.method({
1032
+ selector: "isBlockReturn",
1033
+ fn: function (){
1034
+ var self=this;
1035
+ return false;
1036
+ }
1037
+ }),
1038
+ smalltalk.IRReturn);
1039
+
1040
+ smalltalk.addMethod(
1041
+ "_isLocalReturn",
1042
+ smalltalk.method({
1043
+ selector: "isLocalReturn",
1044
+ fn: function (){
1045
+ var self=this;
1046
+ return true;
1047
+ }
1048
+ }),
1049
+ smalltalk.IRReturn);
1050
+
1051
+ smalltalk.addMethod(
1052
+ "_isNonLocalReturn",
1053
+ smalltalk.method({
1054
+ selector: "isNonLocalReturn",
1055
+ fn: function (){
1056
+ var self=this;
1057
+ var $1;
1058
+ $1=smalltalk.send(smalltalk.send(self,"_isLocalReturn",[]),"_not",[]);
1059
+ return $1;
1060
+ }
1061
+ }),
1062
+ smalltalk.IRReturn);
1063
+
1064
+ smalltalk.addMethod(
1065
+ "_isReturn",
1066
+ smalltalk.method({
1067
+ selector: "isReturn",
1068
+ fn: function (){
1069
+ var self=this;
1070
+ return true;
1071
+ }
1072
+ }),
1073
+ smalltalk.IRReturn);
1074
+
1075
+
1076
+
1077
+ smalltalk.addClass('IRBlockReturn', smalltalk.IRReturn, [], 'Compiler-IR');
1078
+ smalltalk.addMethod(
1079
+ "_accept_",
1080
+ smalltalk.method({
1081
+ selector: "accept:",
1082
+ fn: function (aVisitor){
1083
+ var self=this;
1084
+ var $1;
1085
+ $1=smalltalk.send(aVisitor,"_visitIRBlockReturn_",[self]);
1086
+ return $1;
1087
+ }
1088
+ }),
1089
+ smalltalk.IRBlockReturn);
1090
+
1091
+ smalltalk.addMethod(
1092
+ "_isBlockReturn",
1093
+ smalltalk.method({
1094
+ selector: "isBlockReturn",
1095
+ fn: function (){
1096
+ var self=this;
1097
+ return true;
1098
+ }
1099
+ }),
1100
+ smalltalk.IRBlockReturn);
1101
+
1102
+
1103
+
1104
+ smalltalk.addClass('IRNonLocalReturn', smalltalk.IRReturn, [], 'Compiler-IR');
1105
+ smalltalk.addMethod(
1106
+ "_accept_",
1107
+ smalltalk.method({
1108
+ selector: "accept:",
1109
+ fn: function (aVisitor){
1110
+ var self=this;
1111
+ var $1;
1112
+ $1=smalltalk.send(aVisitor,"_visitIRNonLocalReturn_",[self]);
1113
+ return $1;
1114
+ }
1115
+ }),
1116
+ smalltalk.IRNonLocalReturn);
1117
+
1118
+ smalltalk.addMethod(
1119
+ "_isLocalReturn",
1120
+ smalltalk.method({
1121
+ selector: "isLocalReturn",
1122
+ fn: function (){
1123
+ var self=this;
1124
+ return false;
1125
+ }
1126
+ }),
1127
+ smalltalk.IRNonLocalReturn);
1128
+
1129
+
1130
+
1131
+ smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler-IR');
1132
+ smalltalk.addMethod(
1133
+ "_accept_",
1134
+ smalltalk.method({
1135
+ selector: "accept:",
1136
+ fn: function (aVisitor){
1137
+ var self=this;
1138
+ var $1;
1139
+ $1=smalltalk.send(aVisitor,"_visitIRSend_",[self]);
1140
+ return $1;
1141
+ }
1142
+ }),
1143
+ smalltalk.IRSend);
1144
+
1145
+ smalltalk.addMethod(
1146
+ "_classSend",
1147
+ smalltalk.method({
1148
+ selector: "classSend",
1149
+ fn: function (){
1150
+ var self=this;
1151
+ return self["@classSend"];
1152
+ }
1153
+ }),
1154
+ smalltalk.IRSend);
1155
+
1156
+ smalltalk.addMethod(
1157
+ "_classSend_",
1158
+ smalltalk.method({
1159
+ selector: "classSend:",
1160
+ fn: function (aClass){
1161
+ var self=this;
1162
+ self["@classSend"]=aClass;
1163
+ return self}
1164
+ }),
1165
+ smalltalk.IRSend);
1166
+
1167
+ smalltalk.addMethod(
1168
+ "_index",
1169
+ smalltalk.method({
1170
+ selector: "index",
1171
+ fn: function (){
1172
+ var self=this;
1173
+ return self["@index"];
1174
+ }
1175
+ }),
1176
+ smalltalk.IRSend);
1177
+
1178
+ smalltalk.addMethod(
1179
+ "_index_",
1180
+ smalltalk.method({
1181
+ selector: "index:",
1182
+ fn: function (anInteger){
1183
+ var self=this;
1184
+ self["@index"]=anInteger;
1185
+ return self}
1186
+ }),
1187
+ smalltalk.IRSend);
1188
+
1189
+ smalltalk.addMethod(
1190
+ "_isSend",
1191
+ smalltalk.method({
1192
+ selector: "isSend",
1193
+ fn: function (){
1194
+ var self=this;
1195
+ return true;
1196
+ }
1197
+ }),
1198
+ smalltalk.IRSend);
1199
+
1200
+ smalltalk.addMethod(
1201
+ "_selector",
1202
+ smalltalk.method({
1203
+ selector: "selector",
1204
+ fn: function (){
1205
+ var self=this;
1206
+ return self["@selector"];
1207
+ }
1208
+ }),
1209
+ smalltalk.IRSend);
1210
+
1211
+ smalltalk.addMethod(
1212
+ "_selector_",
1213
+ smalltalk.method({
1214
+ selector: "selector:",
1215
+ fn: function (aString){
1216
+ var self=this;
1217
+ self["@selector"]=aString;
1218
+ return self}
1219
+ }),
1220
+ smalltalk.IRSend);
1221
+
1222
+
1223
+
1224
+ smalltalk.addClass('IRSequence', smalltalk.IRInstruction, [], 'Compiler-IR');
1225
+ smalltalk.addMethod(
1226
+ "_accept_",
1227
+ smalltalk.method({
1228
+ selector: "accept:",
1229
+ fn: function (aVisitor){
1230
+ var self=this;
1231
+ var $1;
1232
+ $1=smalltalk.send(aVisitor,"_visitIRSequence_",[self]);
1233
+ return $1;
1234
+ }
1235
+ }),
1236
+ smalltalk.IRSequence);
1237
+
1238
+ smalltalk.addMethod(
1239
+ "_isSequence",
1240
+ smalltalk.method({
1241
+ selector: "isSequence",
1242
+ fn: function (){
1243
+ var self=this;
1244
+ return true;
1245
+ }
1246
+ }),
1247
+ smalltalk.IRSequence);
1248
+
1249
+
1250
+
1251
+ smalltalk.addClass('IRBlockSequence', smalltalk.IRSequence, [], 'Compiler-IR');
1252
+ smalltalk.addMethod(
1253
+ "_accept_",
1254
+ smalltalk.method({
1255
+ selector: "accept:",
1256
+ fn: function (aVisitor){
1257
+ var self=this;
1258
+ var $1;
1259
+ $1=smalltalk.send(aVisitor,"_visitIRBlockSequence_",[self]);
1260
+ return $1;
1261
+ }
1262
+ }),
1263
+ smalltalk.IRBlockSequence);
1264
+
1265
+
1266
+
1267
+ smalltalk.addClass('IRTempDeclaration', smalltalk.IRInstruction, ['name'], 'Compiler-IR');
1268
+ smalltalk.addMethod(
1269
+ "_accept_",
1270
+ smalltalk.method({
1271
+ selector: "accept:",
1272
+ fn: function (aVisitor){
1273
+ var self=this;
1274
+ var $1;
1275
+ $1=smalltalk.send(aVisitor,"_visitIRTempDeclaration_",[self]);
1276
+ return $1;
1277
+ }
1278
+ }),
1279
+ smalltalk.IRTempDeclaration);
1280
+
1281
+ smalltalk.addMethod(
1282
+ "_isTempDeclaration",
1283
+ smalltalk.method({
1284
+ selector: "isTempDeclaration",
1285
+ fn: function (){
1286
+ var self=this;
1287
+ return true;
1288
+ }
1289
+ }),
1290
+ smalltalk.IRTempDeclaration);
1291
+
1292
+ smalltalk.addMethod(
1293
+ "_name",
1294
+ smalltalk.method({
1295
+ selector: "name",
1296
+ fn: function (){
1297
+ var self=this;
1298
+ return self["@name"];
1299
+ }
1300
+ }),
1301
+ smalltalk.IRTempDeclaration);
1302
+
1303
+ smalltalk.addMethod(
1304
+ "_name_",
1305
+ smalltalk.method({
1306
+ selector: "name:",
1307
+ fn: function (aString){
1308
+ var self=this;
1309
+ self["@name"]=aString;
1310
+ return self}
1311
+ }),
1312
+ smalltalk.IRTempDeclaration);
1313
+
1314
+
1315
+
1316
+ smalltalk.addClass('IRValue', smalltalk.IRInstruction, ['value'], 'Compiler-IR');
1317
+ smalltalk.addMethod(
1318
+ "_accept_",
1319
+ smalltalk.method({
1320
+ selector: "accept:",
1321
+ fn: function (aVisitor){
1322
+ var self=this;
1323
+ var $1;
1324
+ $1=smalltalk.send(aVisitor,"_visitIRValue_",[self]);
1325
+ return $1;
1326
+ }
1327
+ }),
1328
+ smalltalk.IRValue);
1329
+
1330
+ smalltalk.addMethod(
1331
+ "_value",
1332
+ smalltalk.method({
1333
+ selector: "value",
1334
+ fn: function (){
1335
+ var self=this;
1336
+ return self["@value"];
1337
+ }
1338
+ }),
1339
+ smalltalk.IRValue);
1340
+
1341
+ smalltalk.addMethod(
1342
+ "_value_",
1343
+ smalltalk.method({
1344
+ selector: "value:",
1345
+ fn: function (aString){
1346
+ var self=this;
1347
+ self["@value"]=aString;
1348
+ return self}
1349
+ }),
1350
+ smalltalk.IRValue);
1351
+
1352
+
1353
+
1354
+ smalltalk.addClass('IRVariable', smalltalk.IRInstruction, ['variable'], 'Compiler-IR');
1355
+ smalltalk.addMethod(
1356
+ "_accept_",
1357
+ smalltalk.method({
1358
+ selector: "accept:",
1359
+ fn: function (aVisitor){
1360
+ var self=this;
1361
+ var $1;
1362
+ $1=smalltalk.send(aVisitor,"_visitIRVariable_",[self]);
1363
+ return $1;
1364
+ }
1365
+ }),
1366
+ smalltalk.IRVariable);
1367
+
1368
+ smalltalk.addMethod(
1369
+ "_isVariable",
1370
+ smalltalk.method({
1371
+ selector: "isVariable",
1372
+ fn: function (){
1373
+ var self=this;
1374
+ return true;
1375
+ }
1376
+ }),
1377
+ smalltalk.IRVariable);
1378
+
1379
+ smalltalk.addMethod(
1380
+ "_variable",
1381
+ smalltalk.method({
1382
+ selector: "variable",
1383
+ fn: function (){
1384
+ var self=this;
1385
+ return self["@variable"];
1386
+ }
1387
+ }),
1388
+ smalltalk.IRVariable);
1389
+
1390
+ smalltalk.addMethod(
1391
+ "_variable_",
1392
+ smalltalk.method({
1393
+ selector: "variable:",
1394
+ fn: function (aScopeVariable){
1395
+ var self=this;
1396
+ self["@variable"]=aScopeVariable;
1397
+ return self}
1398
+ }),
1399
+ smalltalk.IRVariable);
1400
+
1401
+
1402
+
1403
+ smalltalk.addClass('IRVerbatim', smalltalk.IRInstruction, ['source'], 'Compiler-IR');
1404
+ smalltalk.addMethod(
1405
+ "_accept_",
1406
+ smalltalk.method({
1407
+ selector: "accept:",
1408
+ fn: function (aVisitor){
1409
+ var self=this;
1410
+ var $1;
1411
+ $1=smalltalk.send(aVisitor,"_visitIRVerbatim_",[self]);
1412
+ return $1;
1413
+ }
1414
+ }),
1415
+ smalltalk.IRVerbatim);
1416
+
1417
+ smalltalk.addMethod(
1418
+ "_source",
1419
+ smalltalk.method({
1420
+ selector: "source",
1421
+ fn: function (){
1422
+ var self=this;
1423
+ return self["@source"];
1424
+ }
1425
+ }),
1426
+ smalltalk.IRVerbatim);
1427
+
1428
+ smalltalk.addMethod(
1429
+ "_source_",
1430
+ smalltalk.method({
1431
+ selector: "source:",
1432
+ fn: function (aString){
1433
+ var self=this;
1434
+ self["@source"]=aString;
1435
+ return self}
1436
+ }),
1437
+ smalltalk.IRVerbatim);
1438
+
1439
+
1440
+
1441
+ smalltalk.addClass('IRVisitor', smalltalk.Object, [], 'Compiler-IR');
1442
+ smalltalk.addMethod(
1443
+ "_visit_",
1444
+ smalltalk.method({
1445
+ selector: "visit:",
1446
+ fn: function (anIRInstruction){
1447
+ var self=this;
1448
+ var $1;
1449
+ $1=smalltalk.send(anIRInstruction,"_accept_",[self]);
1450
+ return $1;
1451
+ }
1452
+ }),
1453
+ smalltalk.IRVisitor);
1454
+
1455
+ smalltalk.addMethod(
1456
+ "_visitIRAssignment_",
1457
+ smalltalk.method({
1458
+ selector: "visitIRAssignment:",
1459
+ fn: function (anIRAssignment){
1460
+ var self=this;
1461
+ var $1;
1462
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRAssignment]);
1463
+ return $1;
1464
+ }
1465
+ }),
1466
+ smalltalk.IRVisitor);
1467
+
1468
+ smalltalk.addMethod(
1469
+ "_visitIRBlockReturn_",
1470
+ smalltalk.method({
1471
+ selector: "visitIRBlockReturn:",
1472
+ fn: function (anIRBlockReturn){
1473
+ var self=this;
1474
+ var $1;
1475
+ $1=smalltalk.send(self,"_visitIRReturn_",[anIRBlockReturn]);
1476
+ return $1;
1477
+ }
1478
+ }),
1479
+ smalltalk.IRVisitor);
1480
+
1481
+ smalltalk.addMethod(
1482
+ "_visitIRBlockSequence_",
1483
+ smalltalk.method({
1484
+ selector: "visitIRBlockSequence:",
1485
+ fn: function (anIRBlockSequence){
1486
+ var self=this;
1487
+ var $1;
1488
+ $1=smalltalk.send(self,"_visitIRSequence_",[anIRBlockSequence]);
1489
+ return $1;
1490
+ }
1491
+ }),
1492
+ smalltalk.IRVisitor);
1493
+
1494
+ smalltalk.addMethod(
1495
+ "_visitIRClosure_",
1496
+ smalltalk.method({
1497
+ selector: "visitIRClosure:",
1498
+ fn: function (anIRClosure){
1499
+ var self=this;
1500
+ var $1;
1501
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRClosure]);
1502
+ return $1;
1503
+ }
1504
+ }),
1505
+ smalltalk.IRVisitor);
1506
+
1507
+ smalltalk.addMethod(
1508
+ "_visitIRDynamicArray_",
1509
+ smalltalk.method({
1510
+ selector: "visitIRDynamicArray:",
1511
+ fn: function (anIRDynamicArray){
1512
+ var self=this;
1513
+ var $1;
1514
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRDynamicArray]);
1515
+ return $1;
1516
+ }
1517
+ }),
1518
+ smalltalk.IRVisitor);
1519
+
1520
+ smalltalk.addMethod(
1521
+ "_visitIRDynamicDictionary_",
1522
+ smalltalk.method({
1523
+ selector: "visitIRDynamicDictionary:",
1524
+ fn: function (anIRDynamicDictionary){
1525
+ var self=this;
1526
+ var $1;
1527
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRDynamicDictionary]);
1528
+ return $1;
1529
+ }
1530
+ }),
1531
+ smalltalk.IRVisitor);
1532
+
1533
+ smalltalk.addMethod(
1534
+ "_visitIRInlinedClosure_",
1535
+ smalltalk.method({
1536
+ selector: "visitIRInlinedClosure:",
1537
+ fn: function (anIRInlinedClosure){
1538
+ var self=this;
1539
+ var $1;
1540
+ $1=smalltalk.send(self,"_visitIRClosure_",[anIRInlinedClosure]);
1541
+ return $1;
1542
+ }
1543
+ }),
1544
+ smalltalk.IRVisitor);
1545
+
1546
+ smalltalk.addMethod(
1547
+ "_visitIRInlinedSequence_",
1548
+ smalltalk.method({
1549
+ selector: "visitIRInlinedSequence:",
1550
+ fn: function (anIRInlinedSequence){
1551
+ var self=this;
1552
+ var $1;
1553
+ $1=smalltalk.send(self,"_visitIRSequence_",[anIRInlinedSequence]);
1554
+ return $1;
1555
+ }
1556
+ }),
1557
+ smalltalk.IRVisitor);
1558
+
1559
+ smalltalk.addMethod(
1560
+ "_visitIRInstruction_",
1561
+ smalltalk.method({
1562
+ selector: "visitIRInstruction:",
1563
+ fn: function (anIRInstruction){
1564
+ var self=this;
1565
+ smalltalk.send(smalltalk.send(anIRInstruction,"_instructions",[]),"_do_",[(function(each){
1566
+ return smalltalk.send(self,"_visit_",[each]);
1567
+ })]);
1568
+ return anIRInstruction;
1569
+ }
1570
+ }),
1571
+ smalltalk.IRVisitor);
1572
+
1573
+ smalltalk.addMethod(
1574
+ "_visitIRMethod_",
1575
+ smalltalk.method({
1576
+ selector: "visitIRMethod:",
1577
+ fn: function (anIRMethod){
1578
+ var self=this;
1579
+ var $1;
1580
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRMethod]);
1581
+ return $1;
1582
+ }
1583
+ }),
1584
+ smalltalk.IRVisitor);
1585
+
1586
+ smalltalk.addMethod(
1587
+ "_visitIRNonLocalReturn_",
1588
+ smalltalk.method({
1589
+ selector: "visitIRNonLocalReturn:",
1590
+ fn: function (anIRNonLocalReturn){
1591
+ var self=this;
1592
+ var $1;
1593
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRNonLocalReturn]);
1594
+ return $1;
1595
+ }
1596
+ }),
1597
+ smalltalk.IRVisitor);
1598
+
1599
+ smalltalk.addMethod(
1600
+ "_visitIRNonLocalReturnHandling_",
1601
+ smalltalk.method({
1602
+ selector: "visitIRNonLocalReturnHandling:",
1603
+ fn: function (anIRNonLocalReturnHandling){
1604
+ var self=this;
1605
+ var $1;
1606
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRNonLocalReturnHandling]);
1607
+ return $1;
1608
+ }
1609
+ }),
1610
+ smalltalk.IRVisitor);
1611
+
1612
+ smalltalk.addMethod(
1613
+ "_visitIRReturn_",
1614
+ smalltalk.method({
1615
+ selector: "visitIRReturn:",
1616
+ fn: function (anIRReturn){
1617
+ var self=this;
1618
+ var $1;
1619
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRReturn]);
1620
+ return $1;
1621
+ }
1622
+ }),
1623
+ smalltalk.IRVisitor);
1624
+
1625
+ smalltalk.addMethod(
1626
+ "_visitIRSend_",
1627
+ smalltalk.method({
1628
+ selector: "visitIRSend:",
1629
+ fn: function (anIRSend){
1630
+ var self=this;
1631
+ var $1;
1632
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRSend]);
1633
+ return $1;
1634
+ }
1635
+ }),
1636
+ smalltalk.IRVisitor);
1637
+
1638
+ smalltalk.addMethod(
1639
+ "_visitIRSequence_",
1640
+ smalltalk.method({
1641
+ selector: "visitIRSequence:",
1642
+ fn: function (anIRSequence){
1643
+ var self=this;
1644
+ var $1;
1645
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRSequence]);
1646
+ return $1;
1647
+ }
1648
+ }),
1649
+ smalltalk.IRVisitor);
1650
+
1651
+ smalltalk.addMethod(
1652
+ "_visitIRTempDeclaration_",
1653
+ smalltalk.method({
1654
+ selector: "visitIRTempDeclaration:",
1655
+ fn: function (anIRTempDeclaration){
1656
+ var self=this;
1657
+ var $1;
1658
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRTempDeclaration]);
1659
+ return $1;
1660
+ }
1661
+ }),
1662
+ smalltalk.IRVisitor);
1663
+
1664
+ smalltalk.addMethod(
1665
+ "_visitIRValue_",
1666
+ smalltalk.method({
1667
+ selector: "visitIRValue:",
1668
+ fn: function (anIRValue){
1669
+ var self=this;
1670
+ var $1;
1671
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRValue]);
1672
+ return $1;
1673
+ }
1674
+ }),
1675
+ smalltalk.IRVisitor);
1676
+
1677
+ smalltalk.addMethod(
1678
+ "_visitIRVariable_",
1679
+ smalltalk.method({
1680
+ selector: "visitIRVariable:",
1681
+ fn: function (anIRVariable){
1682
+ var self=this;
1683
+ var $1;
1684
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRVariable]);
1685
+ return $1;
1686
+ }
1687
+ }),
1688
+ smalltalk.IRVisitor);
1689
+
1690
+ smalltalk.addMethod(
1691
+ "_visitIRVerbatim_",
1692
+ smalltalk.method({
1693
+ selector: "visitIRVerbatim:",
1694
+ fn: function (anIRVerbatim){
1695
+ var self=this;
1696
+ var $1;
1697
+ $1=smalltalk.send(self,"_visitIRInstruction_",[anIRVerbatim]);
1698
+ return $1;
1699
+ }
1700
+ }),
1701
+ smalltalk.IRVisitor);
1702
+
1703
+
1704
+
1705
+ smalltalk.addClass('IRJSTranslator', smalltalk.IRVisitor, ['stream'], 'Compiler-IR');
1706
+ smalltalk.addMethod(
1707
+ "_contents",
1708
+ smalltalk.method({
1709
+ selector: "contents",
1710
+ fn: function (){
1711
+ var self=this;
1712
+ var $1;
1713
+ $1=smalltalk.send(smalltalk.send(self,"_stream",[]),"_contents",[]);
1714
+ return $1;
1715
+ }
1716
+ }),
1717
+ smalltalk.IRJSTranslator);
1718
+
1719
+ smalltalk.addMethod(
1720
+ "_initialize",
1721
+ smalltalk.method({
1722
+ selector: "initialize",
1723
+ fn: function (){
1724
+ var self=this;
1725
+ smalltalk.send(self,"_initialize",[],smalltalk.IRVisitor);
1726
+ self["@stream"]=smalltalk.send((smalltalk.JSStream || JSStream),"_new",[]);
1727
+ return self}
1728
+ }),
1729
+ smalltalk.IRJSTranslator);
1730
+
1731
+ smalltalk.addMethod(
1732
+ "_stream",
1733
+ smalltalk.method({
1734
+ selector: "stream",
1735
+ fn: function (){
1736
+ var self=this;
1737
+ return self["@stream"];
1738
+ }
1739
+ }),
1740
+ smalltalk.IRJSTranslator);
1741
+
1742
+ smalltalk.addMethod(
1743
+ "_stream_",
1744
+ smalltalk.method({
1745
+ selector: "stream:",
1746
+ fn: function (aStream){
1747
+ var self=this;
1748
+ self["@stream"]=aStream;
1749
+ return self}
1750
+ }),
1751
+ smalltalk.IRJSTranslator);
1752
+
1753
+ smalltalk.addMethod(
1754
+ "_visitIRAssignment_",
1755
+ smalltalk.method({
1756
+ selector: "visitIRAssignment:",
1757
+ fn: function (anIRAssignment){
1758
+ var self=this;
1759
+ smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(anIRAssignment,"_instructions",[]),"_first",[])]);
1760
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAssignment",[]);
1761
+ smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(anIRAssignment,"_instructions",[]),"_last",[])]);
1762
+ return self}
1763
+ }),
1764
+ smalltalk.IRJSTranslator);
1765
+
1766
+ smalltalk.addMethod(
1767
+ "_visitIRClosure_",
1768
+ smalltalk.method({
1769
+ selector: "visitIRClosure:",
1770
+ fn: function (anIRClosure){
1771
+ var self=this;
1772
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutClosureWith_arguments_",[(function(){
1773
+ return smalltalk.send(self,"_visitIRClosure_",[anIRClosure],smalltalk.IRVisitor);
1774
+ }),smalltalk.send(anIRClosure,"_arguments",[])]);
1775
+ return self}
1776
+ }),
1777
+ smalltalk.IRJSTranslator);
1778
+
1779
+ smalltalk.addMethod(
1780
+ "_visitIRDynamicArray_",
1781
+ smalltalk.method({
1782
+ selector: "visitIRDynamicArray:",
1783
+ fn: function (anIRDynamicArray){
1784
+ var self=this;
1785
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["["]);
1786
+ smalltalk.send(smalltalk.send(anIRDynamicArray,"_instructions",[]),"_do_separatedBy_",[(function(each){
1787
+ return smalltalk.send(self,"_visit_",[each]);
1788
+ }),(function(){
1789
+ return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[","]);
1790
+ })]);
1791
+ smalltalk.send(self["@stream"],"_nextPutAll_",["]"]);
1792
+ return self}
1793
+ }),
1794
+ smalltalk.IRJSTranslator);
1795
+
1796
+ smalltalk.addMethod(
1797
+ "_visitIRDynamicDictionary_",
1798
+ smalltalk.method({
1799
+ selector: "visitIRDynamicDictionary:",
1800
+ fn: function (anIRDynamicDictionary){
1801
+ var self=this;
1802
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["smalltalk.HashedCollection._fromPairs_(["]);
1803
+ smalltalk.send(smalltalk.send(anIRDynamicDictionary,"_instructions",[]),"_do_separatedBy_",[(function(each){
1804
+ return smalltalk.send(self,"_visit_",[each]);
1805
+ }),(function(){
1806
+ return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[","]);
1807
+ })]);
1808
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["])"]);
1809
+ return self}
1810
+ }),
1811
+ smalltalk.IRJSTranslator);
1812
+
1813
+ smalltalk.addMethod(
1814
+ "_visitIRMethod_",
1815
+ smalltalk.method({
1816
+ selector: "visitIRMethod:",
1817
+ fn: function (anIRMethod){
1818
+ var self=this;
1819
+ var $1,$2;
1820
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutMethodDeclaration_with_",[anIRMethod,(function(){
1821
+ return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutFunctionWith_arguments_",[(function(){
1822
+ $1=smalltalk.send(smalltalk.send(anIRMethod,"_internalVariables",[]),"_notEmpty",[]);
1823
+ if(smalltalk.assert($1)){
1824
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutVars_",[smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod,"_internalVariables",[]),"_asArray",[]),"_collect_",[(function(each){
1825
+ return smalltalk.send(smalltalk.send(each,"_variable",[]),"_alias",[]);
1826
+ })])]);
1827
+ };
1828
+ $2=smalltalk.send(smalltalk.send(anIRMethod,"_scope",[]),"_hasNonLocalReturn",[]);
1829
+ if(smalltalk.assert($2)){
1830
+ return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutNonLocalReturnHandlingWith_",[(function(){
1831
+ return smalltalk.send(self,"_visitIRMethod_",[anIRMethod],smalltalk.IRVisitor);
1832
+ })]);
1833
+ } else {
1834
+ return smalltalk.send(self,"_visitIRMethod_",[anIRMethod],smalltalk.IRVisitor);
1835
+ };
1836
+ }),smalltalk.send(anIRMethod,"_arguments",[])]);
1837
+ })]);
1838
+ return self}
1839
+ }),
1840
+ smalltalk.IRJSTranslator);
1841
+
1842
+ smalltalk.addMethod(
1843
+ "_visitIRNonLocalReturn_",
1844
+ smalltalk.method({
1845
+ selector: "visitIRNonLocalReturn:",
1846
+ fn: function (anIRNonLocalReturn){
1847
+ var self=this;
1848
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutNonLocalReturnWith_",[(function(){
1849
+ return smalltalk.send(self,"_visitIRNonLocalReturn_",[anIRNonLocalReturn],smalltalk.IRVisitor);
1850
+ })]);
1851
+ return self}
1852
+ }),
1853
+ smalltalk.IRJSTranslator);
1854
+
1855
+ smalltalk.addMethod(
1856
+ "_visitIRReturn_",
1857
+ smalltalk.method({
1858
+ selector: "visitIRReturn:",
1859
+ fn: function (anIRReturn){
1860
+ var self=this;
1861
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutReturnWith_",[(function(){
1862
+ return smalltalk.send(self,"_visitIRReturn_",[anIRReturn],smalltalk.IRVisitor);
1863
+ })]);
1864
+ return self}
1865
+ }),
1866
+ smalltalk.IRJSTranslator);
1867
+
1868
+ smalltalk.addMethod(
1869
+ "_visitIRSend_",
1870
+ smalltalk.method({
1871
+ selector: "visitIRSend:",
1872
+ fn: function (anIRSend){
1873
+ var self=this;
1874
+ var $1;
1875
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["smalltalk.send("]);
1876
+ smalltalk.send(self,"_visit_",[smalltalk.send(smalltalk.send(anIRSend,"_instructions",[]),"_first",[])]);
1877
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(",\x22","__comma",[smalltalk.send(smalltalk.send(anIRSend,"_selector",[]),"_asSelector",[])]),"__comma",["\x22,["])]);
1878
+ smalltalk.send(smalltalk.send(smalltalk.send(anIRSend,"_instructions",[]),"_allButFirst",[]),"_do_separatedBy_",[(function(each){
1879
+ return smalltalk.send(self,"_visit_",[each]);
1880
+ }),(function(){
1881
+ return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[","]);
1882
+ })]);
1883
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["]"]);
1884
+ $1=smalltalk.send(anIRSend,"_classSend",[]);
1885
+ if(($receiver = $1) == nil || $receiver == undefined){
1886
+ $1;
1887
+ } else {
1888
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(",","__comma",[smalltalk.send(smalltalk.send(anIRSend,"_classSend",[]),"_asJavascript",[])])]);
1889
+ };
1890
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[")"]);
1891
+ return self}
1892
+ }),
1893
+ smalltalk.IRJSTranslator);
1894
+
1895
+ smalltalk.addMethod(
1896
+ "_visitIRSequence_",
1897
+ smalltalk.method({
1898
+ selector: "visitIRSequence:",
1899
+ fn: function (anIRSequence){
1900
+ var self=this;
1901
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutSequenceWith_",[(function(){
1902
+ return smalltalk.send(smalltalk.send(anIRSequence,"_instructions",[]),"_do_",[(function(each){
1903
+ return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutStatementWith_",[smalltalk.send(self,"_visit_",[each])]);
1904
+ })]);
1905
+ })]);
1906
+ return self}
1907
+ }),
1908
+ smalltalk.IRJSTranslator);
1909
+
1910
+ smalltalk.addMethod(
1911
+ "_visitIRTempDeclaration_",
1912
+ smalltalk.method({
1913
+ selector: "visitIRTempDeclaration:",
1914
+ fn: function (anIRTempDeclaration){
1915
+ var self=this;
1916
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutVar_",[smalltalk.send(smalltalk.send(anIRTempDeclaration,"_name",[]),"_asVariableName",[])]);
1917
+ return self}
1918
+ }),
1919
+ smalltalk.IRJSTranslator);
1920
+
1921
+ smalltalk.addMethod(
1922
+ "_visitIRValue_",
1923
+ smalltalk.method({
1924
+ selector: "visitIRValue:",
1925
+ fn: function (anIRValue){
1926
+ var self=this;
1927
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(anIRValue,"_value",[]),"_asJavascript",[])]);
1928
+ return self}
1929
+ }),
1930
+ smalltalk.IRJSTranslator);
1931
+
1932
+ smalltalk.addMethod(
1933
+ "_visitIRVariable_",
1934
+ smalltalk.method({
1935
+ selector: "visitIRVariable:",
1936
+ fn: function (anIRVariable){
1937
+ var self=this;
1938
+ var $1;
1939
+ $1=smalltalk.send(smalltalk.send(smalltalk.send(anIRVariable,"_variable",[]),"_name",[]),"__eq",["thisContext"]);
1940
+ if(smalltalk.assert($1)){
1941
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",["smalltalk.getThisContext()"]);
1942
+ } else {
1943
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(smalltalk.send(anIRVariable,"_variable",[]),"_alias",[])]);
1944
+ };
1945
+ return self}
1946
+ }),
1947
+ smalltalk.IRJSTranslator);
1948
+
1949
+ smalltalk.addMethod(
1950
+ "_visitIRVerbatim_",
1951
+ smalltalk.method({
1952
+ selector: "visitIRVerbatim:",
1953
+ fn: function (anIRVerbatim){
1954
+ var self=this;
1955
+ smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutStatementWith_",[(function(){
1956
+ return smalltalk.send(smalltalk.send(self,"_stream",[]),"_nextPutAll_",[smalltalk.send(anIRVerbatim,"_source",[])]);
1957
+ })]);
1958
+ return self}
1959
+ }),
1960
+ smalltalk.IRJSTranslator);
1961
+
1962
+
1963
+
1964
+ smalltalk.addClass('JSStream', smalltalk.Object, ['stream'], 'Compiler-IR');
1965
+ smalltalk.addMethod(
1966
+ "_contents",
1967
+ smalltalk.method({
1968
+ selector: "contents",
1969
+ fn: function (){
1970
+ var self=this;
1971
+ var $1;
1972
+ $1=smalltalk.send(self["@stream"],"_contents",[]);
1973
+ return $1;
1974
+ }
1975
+ }),
1976
+ smalltalk.JSStream);
1977
+
1978
+ smalltalk.addMethod(
1979
+ "_initialize",
1980
+ smalltalk.method({
1981
+ selector: "initialize",
1982
+ fn: function (){
1983
+ var self=this;
1984
+ smalltalk.send(self,"_initialize",[],smalltalk.Object);
1985
+ self["@stream"]=smalltalk.send("","_writeStream",[]);
1986
+ return self}
1987
+ }),
1988
+ smalltalk.JSStream);
1989
+
1990
+ smalltalk.addMethod(
1991
+ "_lf",
1992
+ smalltalk.method({
1993
+ selector: "lf",
1994
+ fn: function (){
1995
+ var self=this;
1996
+ smalltalk.send(self["@stream"],"_lf",[]);
1997
+ return self}
1998
+ }),
1999
+ smalltalk.JSStream);
2000
+
2001
+ smalltalk.addMethod(
2002
+ "_nextPut_",
2003
+ smalltalk.method({
2004
+ selector: "nextPut:",
2005
+ fn: function (aString){
2006
+ var self=this;
2007
+ smalltalk.send(self["@stream"],"_nextPut_",[aString]);
2008
+ return self}
2009
+ }),
2010
+ smalltalk.JSStream);
2011
+
2012
+ smalltalk.addMethod(
2013
+ "_nextPutAll_",
2014
+ smalltalk.method({
2015
+ selector: "nextPutAll:",
2016
+ fn: function (aString){
2017
+ var self=this;
2018
+ smalltalk.send(self["@stream"],"_nextPutAll_",[aString]);
2019
+ return self}
2020
+ }),
2021
+ smalltalk.JSStream);
2022
+
2023
+ smalltalk.addMethod(
2024
+ "_nextPutAssignment",
2025
+ smalltalk.method({
2026
+ selector: "nextPutAssignment",
2027
+ fn: function (){
2028
+ var self=this;
2029
+ smalltalk.send(self["@stream"],"_nextPutAll_",["="]);
2030
+ return self}
2031
+ }),
2032
+ smalltalk.JSStream);
2033
+
2034
+ smalltalk.addMethod(
2035
+ "_nextPutClosureWith_arguments_",
2036
+ smalltalk.method({
2037
+ selector: "nextPutClosureWith:arguments:",
2038
+ fn: function (aBlock,anArray){
2039
+ var self=this;
2040
+ var $1;
2041
+ smalltalk.send(self["@stream"],"_nextPutAll_",["(function("]);
2042
+ smalltalk.send(anArray,"_do_separatedBy_",[(function(each){
2043
+ return smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(each,"_asVariableName",[])]);
2044
+ }),(function(){
2045
+ return smalltalk.send(self["@stream"],"_nextPut_",[","]);
2046
+ })]);
2047
+ smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2048
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2049
+ smalltalk.send(aBlock,"_value",[]);
2050
+ smalltalk.send(self["@stream"],"_nextPutAll_",["})"]);
2051
+ return self}
2052
+ }),
2053
+ smalltalk.JSStream);
2054
+
2055
+ smalltalk.addMethod(
2056
+ "_nextPutFunctionWith_arguments_",
2057
+ smalltalk.method({
2058
+ selector: "nextPutFunctionWith:arguments:",
2059
+ fn: function (aBlock,anArray){
2060
+ var self=this;
2061
+ var $1,$2;
2062
+ smalltalk.send(self["@stream"],"_nextPutAll_",["fn: function("]);
2063
+ smalltalk.send(anArray,"_do_separatedBy_",[(function(each){
2064
+ return smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(each,"_asVariableName",[])]);
2065
+ }),(function(){
2066
+ return smalltalk.send(self["@stream"],"_nextPut_",[","]);
2067
+ })]);
2068
+ smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2069
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2070
+ smalltalk.send(self["@stream"],"_nextPutAll_",["var self=this;"]);
2071
+ $2=smalltalk.send(self["@stream"],"_lf",[]);
2072
+ smalltalk.send(aBlock,"_value",[]);
2073
+ smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2074
+ return self}
2075
+ }),
2076
+ smalltalk.JSStream);
2077
+
2078
+ smalltalk.addMethod(
2079
+ "_nextPutIf_with_",
2080
+ smalltalk.method({
2081
+ selector: "nextPutIf:with:",
2082
+ fn: function (aBlock,anotherBlock){
2083
+ var self=this;
2084
+ var $1;
2085
+ smalltalk.send(self["@stream"],"_nextPutAll_",["if("]);
2086
+ smalltalk.send(aBlock,"_value",[]);
2087
+ smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2088
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2089
+ smalltalk.send(anotherBlock,"_value",[]);
2090
+ smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2091
+ return self}
2092
+ }),
2093
+ smalltalk.JSStream);
2094
+
2095
+ smalltalk.addMethod(
2096
+ "_nextPutIfElse_with_with_",
2097
+ smalltalk.method({
2098
+ selector: "nextPutIfElse:with:with:",
2099
+ fn: function (aBlock,ifBlock,elseBlock){
2100
+ var self=this;
2101
+ var $1,$2;
2102
+ smalltalk.send(self["@stream"],"_nextPutAll_",["if("]);
2103
+ smalltalk.send(aBlock,"_value",[]);
2104
+ smalltalk.send(self["@stream"],"_nextPutAll_",["){"]);
2105
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2106
+ smalltalk.send(ifBlock,"_value",[]);
2107
+ smalltalk.send(self["@stream"],"_nextPutAll_",["} else {"]);
2108
+ $2=smalltalk.send(self["@stream"],"_lf",[]);
2109
+ smalltalk.send(elseBlock,"_value",[]);
2110
+ smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2111
+ return self}
2112
+ }),
2113
+ smalltalk.JSStream);
2114
+
2115
+ smalltalk.addMethod(
2116
+ "_nextPutMethodDeclaration_with_",
2117
+ smalltalk.method({
2118
+ selector: "nextPutMethodDeclaration:with:",
2119
+ fn: function (aMethod,aBlock){
2120
+ var self=this;
2121
+ var $1,$2,$3;
2122
+ smalltalk.send(self["@stream"],"_nextPutAll_",["smalltalk.method({"]);
2123
+ smalltalk.send(self["@stream"],"_lf",[]);
2124
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: \x22","__comma",[smalltalk.send(aMethod,"_selector",[])]),"__comma",["\x22,"])]);
2125
+ smalltalk.send(self["@stream"],"_lf",[]);
2126
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("source: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_source",[]),"_asJavascript",[])]),"__comma",[","])]);
2127
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2128
+ smalltalk.send(aBlock,"_value",[]);
2129
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send(",","__comma",[smalltalk.send((smalltalk.String || String),"_lf",[])]),"__comma",["messageSends: "])]);
2130
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_messageSends",[]),"_asArray",[]),"_asJavascript",[]),"__comma",[","])]);
2131
+ smalltalk.send(self["@stream"],"_lf",[]);
2132
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("args: ","__comma",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_arguments",[]),"_collect_",[(function(each){
2133
+ return smalltalk.send(each,"_value",[]);
2134
+ })]),"_asArray",[]),"_asJavascript",[])]),"__comma",[","])]);
2135
+ smalltalk.send(self["@stream"],"_lf",[]);
2136
+ $2=smalltalk.send(self["@stream"],"_nextPutAll_",["referencedClasses: ["]);
2137
+ smalltalk.send(smalltalk.send(aMethod,"_classReferences",[]),"_do_separatedBy_",[(function(each){
2138
+ return smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(each,"_asJavascript",[])]);
2139
+ }),(function(){
2140
+ return smalltalk.send(self["@stream"],"_nextPutAll_",[","]);
2141
+ })]);
2142
+ smalltalk.send(self["@stream"],"_nextPutAll_",["]"]);
2143
+ $3=smalltalk.send(self["@stream"],"_nextPutAll_",["})"]);
2144
+ return self}
2145
+ }),
2146
+ smalltalk.JSStream);
2147
+
2148
+ smalltalk.addMethod(
2149
+ "_nextPutNonLocalReturnHandlingWith_",
2150
+ smalltalk.method({
2151
+ selector: "nextPutNonLocalReturnHandlingWith:",
2152
+ fn: function (aBlock){
2153
+ var self=this;
2154
+ var $1,$2;
2155
+ smalltalk.send(self["@stream"],"_nextPutAll_",["var $early={};"]);
2156
+ smalltalk.send(self["@stream"],"_lf",[]);
2157
+ smalltalk.send(self["@stream"],"_nextPutAll_",["try {"]);
2158
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2159
+ smalltalk.send(aBlock,"_value",[]);
2160
+ smalltalk.send(self["@stream"],"_nextPutAll_",["}"]);
2161
+ smalltalk.send(self["@stream"],"_lf",[]);
2162
+ smalltalk.send(self["@stream"],"_nextPutAll_",["catch(e) {if(e===$early)return e[0]; throw e}"]);
2163
+ $2=smalltalk.send(self["@stream"],"_lf",[]);
2164
+ return self}
2165
+ }),
2166
+ smalltalk.JSStream);
2167
+
2168
+ smalltalk.addMethod(
2169
+ "_nextPutNonLocalReturnWith_",
2170
+ smalltalk.method({
2171
+ selector: "nextPutNonLocalReturnWith:",
2172
+ fn: function (aBlock){
2173
+ var self=this;
2174
+ smalltalk.send(self["@stream"],"_nextPutAll_",["throw $early=["]);
2175
+ smalltalk.send(aBlock,"_value",[]);
2176
+ smalltalk.send(self["@stream"],"_nextPutAll_",["]"]);
2177
+ return self}
2178
+ }),
2179
+ smalltalk.JSStream);
2180
+
2181
+ smalltalk.addMethod(
2182
+ "_nextPutReturn",
2183
+ smalltalk.method({
2184
+ selector: "nextPutReturn",
2185
+ fn: function (){
2186
+ var self=this;
2187
+ smalltalk.send(self["@stream"],"_nextPutAll_",["return "]);
2188
+ return self}
2189
+ }),
2190
+ smalltalk.JSStream);
2191
+
2192
+ smalltalk.addMethod(
2193
+ "_nextPutReturnWith_",
2194
+ smalltalk.method({
2195
+ selector: "nextPutReturnWith:",
2196
+ fn: function (aBlock){
2197
+ var self=this;
2198
+ smalltalk.send(self,"_nextPutReturn",[]);
2199
+ smalltalk.send(aBlock,"_value",[]);
2200
+ return self}
2201
+ }),
2202
+ smalltalk.JSStream);
2203
+
2204
+ smalltalk.addMethod(
2205
+ "_nextPutSendTo_selector_arguments_",
2206
+ smalltalk.method({
2207
+ selector: "nextPutSendTo:selector:arguments:",
2208
+ fn: function (receiver,selector,arguments){
2209
+ var self=this;
2210
+ smalltalk.send(self["@stream"],"_nextPutAll_",["smalltalk.send("]);
2211
+ smalltalk.send(receiver,"_emitOn_",[self]);
2212
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send(",\x22","__comma",[smalltalk.send(selector,"_asSelector",[])]),"__comma",["\x22,["])]);
2213
+ smalltalk.send(arguments,"_do_separatedBy_",[(function(each){
2214
+ return smalltalk.send(each,"_emitOn_",[self]);
2215
+ }),(function(){
2216
+ return smalltalk.send(self["@stream"],"_nextPutAll_",[","]);
2217
+ })]);
2218
+ smalltalk.send(self["@stream"],"_nextPutAll_",["])"]);
2219
+ return self}
2220
+ }),
2221
+ smalltalk.JSStream);
2222
+
2223
+ smalltalk.addMethod(
2224
+ "_nextPutSequenceWith_",
2225
+ smalltalk.method({
2226
+ selector: "nextPutSequenceWith:",
2227
+ fn: function (aBlock){
2228
+ var self=this;
2229
+ smalltalk.send(aBlock,"_value",[]);
2230
+ return self}
2231
+ }),
2232
+ smalltalk.JSStream);
2233
+
2234
+ smalltalk.addMethod(
2235
+ "_nextPutStatement_with_",
2236
+ smalltalk.method({
2237
+ selector: "nextPutStatement:with:",
2238
+ fn: function (anInteger,aBlock){
2239
+ var self=this;
2240
+ var $1,$2;
2241
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("case ","__comma",[smalltalk.send(anInteger,"_asString",[])]),"__comma",[":"])]);
2242
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2243
+ smalltalk.send(self,"_nextPutStatementWith_",[aBlock]);
2244
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("smalltalk.thisContext.pc=","__comma",[smalltalk.send(smalltalk.send(anInteger,"__plus",[(1)]),"_asString",[])]),"__comma",[";"])]);
2245
+ $2=smalltalk.send(self["@stream"],"_lf",[]);
2246
+ return self}
2247
+ }),
2248
+ smalltalk.JSStream);
2249
+
2250
+ smalltalk.addMethod(
2251
+ "_nextPutStatementWith_",
2252
+ smalltalk.method({
2253
+ selector: "nextPutStatementWith:",
2254
+ fn: function (aBlock){
2255
+ var self=this;
2256
+ var $1;
2257
+ smalltalk.send(aBlock,"_value",[]);
2258
+ smalltalk.send(self["@stream"],"_nextPutAll_",[";"]);
2259
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2260
+ return self}
2261
+ }),
2262
+ smalltalk.JSStream);
2263
+
2264
+ smalltalk.addMethod(
2265
+ "_nextPutVar_",
2266
+ smalltalk.method({
2267
+ selector: "nextPutVar:",
2268
+ fn: function (aString){
2269
+ var self=this;
2270
+ var $1;
2271
+ smalltalk.send(self["@stream"],"_nextPutAll_",[smalltalk.send(smalltalk.send("var ","__comma",[aString]),"__comma",[";"])]);
2272
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2273
+ return self}
2274
+ }),
2275
+ smalltalk.JSStream);
2276
+
2277
+ smalltalk.addMethod(
2278
+ "_nextPutVars_",
2279
+ smalltalk.method({
2280
+ selector: "nextPutVars:",
2281
+ fn: function (aCollection){
2282
+ var self=this;
2283
+ var $1;
2284
+ smalltalk.send(self["@stream"],"_nextPutAll_",["var "]);
2285
+ smalltalk.send(aCollection,"_do_separatedBy_",[(function(each){
2286
+ return smalltalk.send(self["@stream"],"_nextPutAll_",[each]);
2287
+ }),(function(){
2288
+ return smalltalk.send(self["@stream"],"_nextPutAll_",[","]);
2289
+ })]);
2290
+ smalltalk.send(self["@stream"],"_nextPutAll_",[";"]);
2291
+ $1=smalltalk.send(self["@stream"],"_lf",[]);
2292
+ return self}
2293
+ }),
2294
+ smalltalk.JSStream);
2295
+
2296
+
2297
+
2298
+ smalltalk.addMethod(
2299
+ "_appendToInstruction_",
2300
+ smalltalk.method({
2301
+ selector: "appendToInstruction:",
2302
+ fn: function (anIRInstruction){
2303
+ var self=this;
2304
+ smalltalk.send(anIRInstruction,"_appendBlock_",[self]);
2305
+ return self}
2306
+ }),
2307
+ smalltalk.BlockClosure);
2308
+
2309
+ smalltalk.addMethod(
2310
+ "_asVariableName",
2311
+ smalltalk.method({
2312
+ selector: "asVariableName",
2313
+ fn: function (){
2314
+ var self=this;
2315
+ var $2,$1;
2316
+ $2=smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_reservedWords",[]),"_includes_",[self]);
2317
+ if(smalltalk.assert($2)){
2318
+ $1=smalltalk.send(self,"__comma",["_"]);
2319
+ } else {
2320
+ $1=self;
2321
+ };
2322
+ return $1;
2323
+ }
2324
+ }),
2325
+ smalltalk.String);
2326
+