|
@@ -23,6 +23,29 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.HLGenerationOutput);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "compile",
|
|
|
+protocol: 'protocol',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+_st(self["@sourceCodes"])._do_((function(methodSourceCode){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+$1=_st(self["@targetClass"])._includesSelector_(_st(methodSourceCode)._selector());
|
|
|
+if(! smalltalk.assert($1)){
|
|
|
+return _st(self["@targetClass"])._compile_protocol_(_st(methodSourceCode)._sourceCode(),self["@protocol"]);
|
|
|
+};
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({methodSourceCode:methodSourceCode},$ctx1,1)})}));
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"compile",{},smalltalk.HLGenerationOutput)})},
|
|
|
+args: [],
|
|
|
+source: "compile\x0a\x09sourceCodes do: [ :methodSourceCode |\x0a\x09\x09(targetClass includesSelector: methodSourceCode selector)\x0a\x09\x09\x09ifFalse: [ \x0a\x09\x09\x09\x09targetClass \x0a\x09\x09\x09\x09\x09compile: methodSourceCode sourceCode\x0a\x09\x09\x09\x09\x09protocol: protocol ] ]",
|
|
|
+messageSends: ["do:", "ifFalse:", "includesSelector:", "selector", "compile:protocol:", "sourceCode"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.HLGenerationOutput);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "initialize",
|
|
@@ -75,29 +98,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.HLGenerationOutput);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "serialize",
|
|
|
-protocol: 'protocol',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1;
|
|
|
-_st(self["@sourceCodes"])._do_((function(methodSourceCode){
|
|
|
-return smalltalk.withContext(function($ctx2) {
|
|
|
-$1=_st(self["@targetClass"])._includesSelector_(_st(methodSourceCode)._selector());
|
|
|
-if(! smalltalk.assert($1)){
|
|
|
-return _st(self["@targetClass"])._compile_protocol_(_st(methodSourceCode)._sourceCode(),self["@protocol"]);
|
|
|
-};
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({methodSourceCode:methodSourceCode},$ctx1,1)})}));
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"serialize",{},smalltalk.HLGenerationOutput)})},
|
|
|
-args: [],
|
|
|
-source: "serialize\x0a\x09sourceCodes do: [ :methodSourceCode |\x0a\x09\x09(targetClass includesSelector: methodSourceCode selector)\x0a\x09\x09\x09ifFalse: [ \x0a\x09\x09\x09\x09targetClass \x0a\x09\x09\x09\x09\x09compile: methodSourceCode sourceCode\x0a\x09\x09\x09\x09\x09protocol: protocol ] ]",
|
|
|
-messageSends: ["do:", "ifFalse:", "includesSelector:", "selector", "compile:protocol:", "sourceCode"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.HLGenerationOutput);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "sourceCodes",
|
|
@@ -226,7 +226,7 @@ smalltalk.HLGenerator);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
-selector: "compile",
|
|
|
+selector: "generate",
|
|
|
protocol: 'protocol',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
@@ -238,9 +238,9 @@ self._error_("class should not be nil");
|
|
|
} else {
|
|
|
$1;
|
|
|
};
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"compile",{},smalltalk.HLGenerator)})},
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"generate",{},smalltalk.HLGenerator)})},
|
|
|
args: [],
|
|
|
-source: "compile\x0a\x0a\x09output targetClass ifNil: [ self error: 'class should not be nil'].",
|
|
|
+source: "generate\x0a\x09output targetClass ifNil: [ self error: 'class should not be nil'].",
|
|
|
messageSends: ["ifNil:", "targetClass", "error:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -332,20 +332,20 @@ smalltalk.HLAccessorsGenerator);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
-selector: "compile",
|
|
|
+selector: "generate",
|
|
|
protocol: 'protocol',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1,$2;
|
|
|
-smalltalk.HLAccessorsGenerator.superclass.fn.prototype._compile.apply(_st(self), []);
|
|
|
+smalltalk.HLAccessorsGenerator.superclass.fn.prototype._generate.apply(_st(self), []);
|
|
|
$1=_st(self["@output"])._targetClass();
|
|
|
_st($1)._accessorsSourceCodesWith_(self);
|
|
|
$2=_st($1)._accessorProtocolWith_(self);
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"compile",{},smalltalk.HLAccessorsGenerator)})},
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"generate",{},smalltalk.HLAccessorsGenerator)})},
|
|
|
args: [],
|
|
|
-source: "compile\x0a\x09super compile.\x0a\x09\x0a\x09output targetClass \x0a\x09\x09accessorsSourceCodesWith: self;\x0a\x09\x09accessorProtocolWith: self",
|
|
|
-messageSends: ["compile", "accessorsSourceCodesWith:", "targetClass", "accessorProtocolWith:"],
|
|
|
+source: "generate\x0a\x09super generate.\x0a\x09\x0a\x09output targetClass \x0a\x09\x09accessorsSourceCodesWith: self;\x0a\x09\x09accessorProtocolWith: self",
|
|
|
+messageSends: ["generate", "accessorsSourceCodesWith:", "targetClass", "accessorProtocolWith:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.HLAccessorsGenerator);
|
|
@@ -416,27 +416,6 @@ smalltalk.HLAccessorsGenerator);
|
|
|
|
|
|
smalltalk.addClass('HLInitializeGenerator', smalltalk.HLGenerator, [], 'Helios-Helpers');
|
|
|
smalltalk.HLInitializeGenerator.comment="I am used to double-dispatch the `initialize` method(s) generation.\x0a\x0aUsage:\x0a\x0a ^ HLInitializeGenerator new\x0a class: aClass;\x0a generate;\x0a output\x0a\x0aI am a disposable object";
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "compile",
|
|
|
-protocol: 'protocol',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1,$2;
|
|
|
-smalltalk.HLInitializeGenerator.superclass.fn.prototype._compile.apply(_st(self), []);
|
|
|
-$1=_st(self["@output"])._targetClass();
|
|
|
-_st($1)._initializeSourceCodesWith_(self);
|
|
|
-_st($1)._initializeIndexWith_(self);
|
|
|
-$2=_st($1)._initializeProtocolWith_(self);
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"compile",{},smalltalk.HLInitializeGenerator)})},
|
|
|
-args: [],
|
|
|
-source: "compile\x0a\x09super compile.\x0a\x09\x0a\x09output targetClass \x0a\x09\x09initializeSourceCodesWith: self;\x0a\x09\x09initializeIndexWith: self;\x0a\x09\x09initializeProtocolWith: self",
|
|
|
-messageSends: ["compile", "initializeSourceCodesWith:", "targetClass", "initializeIndexWith:", "initializeProtocolWith:"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.HLInitializeGenerator);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "computeIndexForObject",
|
|
@@ -466,6 +445,27 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.HLInitializeGenerator);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "generate",
|
|
|
+protocol: 'protocol',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1,$2;
|
|
|
+smalltalk.HLInitializeGenerator.superclass.fn.prototype._generate.apply(_st(self), []);
|
|
|
+$1=_st(self["@output"])._targetClass();
|
|
|
+_st($1)._initializeSourceCodesWith_(self);
|
|
|
+_st($1)._initializeIndexWith_(self);
|
|
|
+$2=_st($1)._initializeProtocolWith_(self);
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"generate",{},smalltalk.HLInitializeGenerator)})},
|
|
|
+args: [],
|
|
|
+source: "generate\x0a\x09super generate.\x0a\x09\x0a\x09output targetClass \x0a\x09\x09initializeSourceCodesWith: self;\x0a\x09\x09initializeIndexWith: self;\x0a\x09\x09initializeProtocolWith: self",
|
|
|
+messageSends: ["generate", "initializeSourceCodesWith:", "targetClass", "initializeIndexWith:", "initializeProtocolWith:"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.HLInitializeGenerator);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "generateInitializeCodeForObject",
|