Prechádzať zdrojové kódy

loadDependencies owned by Package (not as extension)

Herbert Vojčík 10 rokov pred
rodič
commit
1d0f1b6522

+ 0 - 22
js/Importer-Exporter.deploy.js

@@ -1350,28 +1350,6 @@ return $1;
 messageSends: ["at:put:", "ifNil:"]}),
 messageSends: ["at:put:", "ifNil:"]}),
 smalltalk.Package);
 smalltalk.Package);
 
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "loadDependencies",
-fn: function (){
-var self=this;
-var root;
-function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-root=_st($Object())._package();
-$1=self.__eq_eq(root);
-if(smalltalk.assert($1)){
-$2=[];
-return $2;
-} else {
-$3=[root];
-return $3;
-};
-return self}, function($ctx1) {$ctx1.fill(self,"loadDependencies",{root:root},smalltalk.Package)})},
-messageSends: ["package", "ifTrue:ifFalse:", "=="]}),
-smalltalk.Package);
-
 smalltalk.addMethod(
 smalltalk.addMethod(
 smalltalk.method({
 smalltalk.method({
 selector: "transport",
 selector: "transport",

+ 0 - 27
js/Importer-Exporter.js

@@ -1714,33 +1714,6 @@ referencedClasses: []
 }),
 }),
 smalltalk.Package);
 smalltalk.Package);
 
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "loadDependencies",
-category: '*Importer-Exporter',
-fn: function (){
-var self=this;
-var root;
-function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-root=_st($Object())._package();
-$1=self.__eq_eq(root);
-if(smalltalk.assert($1)){
-$2=[];
-return $2;
-} else {
-$3=[root];
-return $3;
-};
-return self}, function($ctx1) {$ctx1.fill(self,"loadDependencies",{root:root},smalltalk.Package)})},
-args: [],
-source: "loadDependencies\x0a\x09\x22Returns list of packages that need to be present\x0a\x09before loading this package.\x0a\x09These are determined as set of packages covering\x0a\x09all classes used either for subclassing or for defining\x0a\x09extension methods on.\x22\x0a\x09\x0a\x09\x22Fake one for now. TODO\x22\x0a\x09| root |\x0a\x09root := Object package.\x0a\x09self == root ifTrue: [ ^#() ] ifFalse: [ ^{root} ]",
-messageSends: ["package", "ifTrue:ifFalse:", "=="],
-referencedClasses: ["Object"]
-}),
-smalltalk.Package);
-
 smalltalk.addMethod(
 smalltalk.addMethod(
 smalltalk.method({
 smalltalk.method({
 selector: "transport",
 selector: "transport",

+ 22 - 0
js/Kernel-Infrastructure.deploy.js

@@ -930,6 +930,28 @@ return true;
 messageSends: []}),
 messageSends: []}),
 smalltalk.Package);
 smalltalk.Package);
 
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "loadDependencies",
+fn: function (){
+var self=this;
+var root;
+function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+root=_st($Object())._package();
+$1=self.__eq_eq(root);
+if(smalltalk.assert($1)){
+$2=[];
+return $2;
+} else {
+$3=[root];
+return $3;
+};
+return self}, function($ctx1) {$ctx1.fill(self,"loadDependencies",{root:root},smalltalk.Package)})},
+messageSends: ["package", "ifTrue:ifFalse:", "=="]}),
+smalltalk.Package);
+
 smalltalk.addMethod(
 smalltalk.addMethod(
 smalltalk.method({
 smalltalk.method({
 selector: "name",
 selector: "name",

+ 27 - 0
js/Kernel-Infrastructure.js

@@ -1243,6 +1243,33 @@ referencedClasses: []
 }),
 }),
 smalltalk.Package);
 smalltalk.Package);
 
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "loadDependencies",
+category: 'dependencies',
+fn: function (){
+var self=this;
+var root;
+function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
+root=_st($Object())._package();
+$1=self.__eq_eq(root);
+if(smalltalk.assert($1)){
+$2=[];
+return $2;
+} else {
+$3=[root];
+return $3;
+};
+return self}, function($ctx1) {$ctx1.fill(self,"loadDependencies",{root:root},smalltalk.Package)})},
+args: [],
+source: "loadDependencies\x0a\x09\x22Returns list of packages that need to be present\x0a\x09before loading this package.\x0a\x09These are determined as set of packages covering\x0a\x09all classes used either for subclassing or for defining\x0a\x09extension methods on.\x22\x0a\x09\x0a\x09\x22Fake one for now. TODO\x22\x0a\x09| root |\x0a\x09root := Object package.\x0a\x09self == root ifTrue: [ ^#() ] ifFalse: [ ^{root} ]",
+messageSends: ["package", "ifTrue:ifFalse:", "=="],
+referencedClasses: ["Object"]
+}),
+smalltalk.Package);
+
 smalltalk.addMethod(
 smalltalk.addMethod(
 smalltalk.method({
 smalltalk.method({
 selector: "name",
 selector: "name",

+ 0 - 13
st/Importer-Exporter.st

@@ -742,19 +742,6 @@ commitPathSt: aString
 	^ (extension ifNil: [ extension := #{} ]) at: #commitPathSt put: aString
 	^ (extension ifNil: [ extension := #{} ]) at: #commitPathSt put: aString
 !
 !
 
 
-loadDependencies
-	"Returns list of packages that need to be present
-	before loading this package.
-	These are determined as set of packages covering
-	all classes used either for subclassing or for defining
-	extension methods on."
-	
-	"Fake one for now. TODO"
-	| root |
-	root := Object package.
-	self == root ifTrue: [ ^#() ] ifFalse: [ ^{root} ]
-!
-
 transport
 transport
 	^ PackageHandler for: self transportType
 	^ PackageHandler for: self transportType
 !
 !

+ 15 - 0
st/Kernel-Infrastructure.st

@@ -504,6 +504,21 @@ sortedClasses
 	^self class sortedClasses: self classes
 	^self class sortedClasses: self classes
 ! !
 ! !
 
 
+!Package methodsFor: 'dependencies'!
+
+loadDependencies
+	"Returns list of packages that need to be present
+	before loading this package.
+	These are determined as set of packages covering
+	all classes used either for subclassing or for defining
+	extension methods on."
+	
+	"Fake one for now. TODO"
+	| root |
+	root := Object package.
+	self == root ifTrue: [ ^#() ] ifFalse: [ ^{root} ]
+! !
+
 !Package methodsFor: 'printing'!
 !Package methodsFor: 'printing'!
 
 
 printOn: aStream
 printOn: aStream