|
@@ -109,6 +109,36 @@ return $1;
|
|
|
messageSends: ["streamContents:", "do:", "nextPutAll:", "exportPackage:", "name", "packages", "current"]}),
|
|
|
smalltalk.Exporter);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "exportAmdPackageEpilogueOn:",
|
|
|
+fn: function (aStream){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1,$2;
|
|
|
+$1=aStream;
|
|
|
+_st($1)._nextPutAll_("});");
|
|
|
+$2=_st($1)._lf();
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"exportAmdPackageEpilogueOn:",{aStream:aStream},smalltalk.Exporter)})},
|
|
|
+messageSends: ["nextPutAll:", "lf"]}),
|
|
|
+smalltalk.Exporter);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "exportAmdPackagePrologueOf:on:",
|
|
|
+fn: function (aPackage,aStream){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1,$2;
|
|
|
+$1=aStream;
|
|
|
+_st($1)._nextPutAll_("define(\x22amber/");
|
|
|
+_st($1)._nextPutAll_(_st(aPackage)._name());
|
|
|
+_st($1)._nextPutAll_("\x22, [\x22amber_vm/smalltalk\x22,\x22amber_vm/nil\x22,\x22amber_vm/_st\x22], function(smalltalk,nil,_st){");
|
|
|
+$2=_st($1)._lf();
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"exportAmdPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
|
|
|
+messageSends: ["nextPutAll:", "name", "lf"]}),
|
|
|
+smalltalk.Exporter);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "exportClass:",
|
|
@@ -268,7 +298,7 @@ $1=_st($String())._streamContents_((function(stream){
|
|
|
return smalltalk.withContext(function($ctx2) {
|
|
|
package_=_st(_st($Smalltalk())._current())._packageAt_(packageName);
|
|
|
package_;
|
|
|
-self._exportPackagePrologueOf_on_(package_,stream);
|
|
|
+self._exportAmdPackagePrologueOf_on_(package_,stream);
|
|
|
return _st((function(){
|
|
|
return smalltalk.withContext(function($ctx3) {
|
|
|
self._exportPackageDefinitionOf_on_(package_,stream);
|
|
@@ -279,12 +309,12 @@ return _st(stream)._nextPutAll_(self._exportClass_(each));
|
|
|
return self._exportPackageExtensionsOf_on_(package_,stream);
|
|
|
}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}))._ensure_((function(){
|
|
|
return smalltalk.withContext(function($ctx3) {
|
|
|
-return self._exportPackageEpilogueOn_(stream);
|
|
|
+return self._exportAmdPackageEpilogueOn_(stream);
|
|
|
}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
|
|
|
}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"exportPackage:",{packageName:packageName,package_:package_},smalltalk.Exporter)})},
|
|
|
-messageSends: ["streamContents:", "packageAt:", "current", "exportPackagePrologueOf:on:", "ensure:", "exportPackageEpilogueOn:", "exportPackageDefinitionOf:on:", "do:", "nextPutAll:", "exportClass:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"]}),
|
|
|
+messageSends: ["streamContents:", "packageAt:", "current", "exportAmdPackagePrologueOf:on:", "ensure:", "exportAmdPackageEpilogueOn:", "exportPackageDefinitionOf:on:", "do:", "nextPutAll:", "exportClass:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"]}),
|
|
|
smalltalk.Exporter);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
@@ -302,20 +332,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{
|
|
|
messageSends: ["nextPutAll:", ",", "name", "lf"]}),
|
|
|
smalltalk.Exporter);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "exportPackageEpilogueOn:",
|
|
|
-fn: function (aStream){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1,$2;
|
|
|
-$1=aStream;
|
|
|
-_st($1)._nextPutAll_("});");
|
|
|
-$2=_st($1)._lf();
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.Exporter)})},
|
|
|
-messageSends: ["nextPutAll:", "lf"]}),
|
|
|
-smalltalk.Exporter);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "exportPackageExtensionsOf:on:",
|
|
@@ -347,22 +363,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{
|
|
|
messageSends: ["name", "do:", "ifTrue:", "exportMethod:of:on:", "match:", ",", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "class", "sortedClasses:", "classes", "current"]}),
|
|
|
smalltalk.Exporter);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "exportPackagePrologueOf:on:",
|
|
|
-fn: function (aPackage,aStream){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1,$2;
|
|
|
-$1=aStream;
|
|
|
-_st($1)._nextPutAll_("define(\x22amber/");
|
|
|
-_st($1)._nextPutAll_(_st(aPackage)._name());
|
|
|
-_st($1)._nextPutAll_("\x22, [\x22amber_vm/smalltalk\x22,\x22amber_vm/nil\x22,\x22amber_vm/_st\x22], function(smalltalk,nil,_st){");
|
|
|
-$2=_st($1)._lf();
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
|
|
|
-messageSends: ["nextPutAll:", "name", "lf"]}),
|
|
|
-smalltalk.Exporter);
|
|
|
-
|
|
|
|
|
|
|
|
|
smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Importer-Exporter');
|
|
@@ -402,6 +402,26 @@ return $1;
|
|
|
messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"]}),
|
|
|
smalltalk.ChunkExporter);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "exportAmdPackageEpilogueOn:",
|
|
|
+fn: function (aStream){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"exportAmdPackageEpilogueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
|
|
|
+messageSends: []}),
|
|
|
+smalltalk.ChunkExporter);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "exportAmdPackagePrologueOf:on:",
|
|
|
+fn: function (aPackage,aStream){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"exportAmdPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
|
+messageSends: []}),
|
|
|
+smalltalk.ChunkExporter);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "exportDefinitionOf:on:",
|
|
@@ -559,16 +579,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{
|
|
|
messageSends: ["nextPutAll:", ",", "name", "lf"]}),
|
|
|
smalltalk.ChunkExporter);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "exportPackageEpilogueOn:",
|
|
|
-fn: function (aStream){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
|
|
|
-messageSends: []}),
|
|
|
-smalltalk.ChunkExporter);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "exportPackageExtensionsOf:on:",
|
|
@@ -610,16 +620,6 @@ return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{
|
|
|
messageSends: ["name", "do:", "new", "protocolsDo:", "ifTrue:", "at:put:", "match:", ",", "at:", "exportMethods:category:of:on:", "sorted:", "<=", "keys", "class", "sortedClasses:", "classes", "current"]}),
|
|
|
smalltalk.ChunkExporter);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "exportPackagePrologueOf:on:",
|
|
|
-fn: function (aPackage,aStream){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
|
-messageSends: []}),
|
|
|
-smalltalk.ChunkExporter);
|
|
|
-
|
|
|
|
|
|
|
|
|
smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Importer-Exporter');
|