Sfoglia il codice sorgente

Stop using classNameFor: in js export.

Herbert Vojčík 7 anni fa
parent
commit
0d5007352f
2 ha cambiato i file con 8 aggiunte e 8 eliminazioni
  1. 6 6
      src/Platform-ImportExport.js
  2. 2 2
      src/Platform-ImportExport.st

+ 6 - 6
src/Platform-ImportExport.js

@@ -1066,7 +1066,7 @@ $recv(aStream)._nextPutAll_("$core.addClass(");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=1;
 //>>excludeEnd("ctx");
-$1=$recv(self._classNameFor_(aClass))._asJavascript();
+$1=$recv($recv(aClass)._name())._asJavascript();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["asJavascript"]=1;
 //>>excludeEnd("ctx");
@@ -1178,10 +1178,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aStream"],
-source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '$core.addClass(';\x0a\x09\x09nextPutAll: (self classNameFor: aClass) asJavascript;\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: (aClass superclass ifNil: [ 'null' ] ifNotNil: [ :superclass | superclass asJavascript ]);\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: aClass instanceVariableNames asJavascript;\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: aClass category asJavascript;\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment ifNotEmpty: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeStart(\x22ide\x22, pragmas.excludeIdeData);';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: aClass asJavascript;\x0a\x09\x09\x09nextPutAll: '.comment=';\x0a\x09\x09\x09nextPutAll: aClass comment crlfSanitized asJavascript;\x0a\x09\x09\x09nextPutAll: ';';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeEnd(\x22ide\x22);' ].\x0a\x09aStream lf",
+source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '$core.addClass(';\x0a\x09\x09nextPutAll: aClass name asJavascript;\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: (aClass superclass ifNil: [ 'null' ] ifNotNil: [ :superclass | superclass asJavascript ]);\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: aClass instanceVariableNames asJavascript;\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: aClass category asJavascript;\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment ifNotEmpty: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeStart(\x22ide\x22, pragmas.excludeIdeData);';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: aClass asJavascript;\x0a\x09\x09\x09nextPutAll: '.comment=';\x0a\x09\x09\x09nextPutAll: aClass comment crlfSanitized asJavascript;\x0a\x09\x09\x09nextPutAll: ';';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeEnd(\x22ide\x22);' ].\x0a\x09aStream lf",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["lf", "nextPutAll:", "asJavascript", "classNameFor:", "ifNil:ifNotNil:", "superclass", "instanceVariableNames", "category", "ifNotEmpty:", "comment", "crlfSanitized"]
+messageSends: ["lf", "nextPutAll:", "asJavascript", "name", "ifNil:ifNotNil:", "superclass", "instanceVariableNames", "category", "ifNotEmpty:", "comment", "crlfSanitized"]
 }),
 $globals.Exporter);
 
@@ -1785,7 +1785,7 @@ $recv(aStream)._nextPutAll_("$core.addTrait(");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=1;
 //>>excludeEnd("ctx");
-$1=$recv(self._classNameFor_(aClass))._asJavascript();
+$1=$recv($recv(aClass)._name())._asJavascript();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["asJavascript"]=1;
 //>>excludeEnd("ctx");
@@ -1866,10 +1866,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aStream"],
-source: "exportTraitDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '$core.addTrait(';\x0a\x09\x09nextPutAll: (self classNameFor: aClass) asJavascript;\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: aClass category asJavascript;\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment ifNotEmpty: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeStart(\x22ide\x22, pragmas.excludeIdeData);';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: aClass asJavascript;\x0a\x09\x09\x09nextPutAll: '.comment=';\x0a\x09\x09\x09nextPutAll: aClass comment crlfSanitized asJavascript;\x0a\x09\x09\x09nextPutAll: ';';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeEnd(\x22ide\x22);' ].\x0a\x09aStream lf",
+source: "exportTraitDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '$core.addTrait(';\x0a\x09\x09nextPutAll: aClass name asJavascript;\x0a\x09\x09nextPutAll: ', ';\x0a\x09\x09nextPutAll: aClass category asJavascript;\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment ifNotEmpty: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeStart(\x22ide\x22, pragmas.excludeIdeData);';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: aClass asJavascript;\x0a\x09\x09\x09nextPutAll: '.comment=';\x0a\x09\x09\x09nextPutAll: aClass comment crlfSanitized asJavascript;\x0a\x09\x09\x09nextPutAll: ';';\x0a\x09\x09\x09lf;\x0a\x09\x09\x09nextPutAll: '//>>excludeEnd(\x22ide\x22);' ].\x0a\x09aStream lf",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["lf", "nextPutAll:", "asJavascript", "classNameFor:", "category", "ifNotEmpty:", "comment", "crlfSanitized"]
+messageSends: ["lf", "nextPutAll:", "asJavascript", "name", "category", "ifNotEmpty:", "comment", "crlfSanitized"]
 }),
 $globals.Exporter);
 

+ 2 - 2
src/Platform-ImportExport.st

@@ -286,7 +286,7 @@ exportDefinitionOf: aClass on: aStream
 	aStream
 		lf;
 		nextPutAll: '$core.addClass(';
-		nextPutAll: (self classNameFor: aClass) asJavascript;
+		nextPutAll: aClass name asJavascript;
 		nextPutAll: ', ';
 		nextPutAll: (aClass superclass ifNil: [ 'null' ] ifNotNil: [ :superclass | superclass asJavascript ]);
 		nextPutAll: ', ';
@@ -417,7 +417,7 @@ exportTraitDefinitionOf: aClass on: aStream
 	aStream
 		lf;
 		nextPutAll: '$core.addTrait(';
-		nextPutAll: (self classNameFor: aClass) asJavascript;
+		nextPutAll: aClass name asJavascript;
 		nextPutAll: ', ';
 		nextPutAll: aClass category asJavascript;
 		nextPutAll: ');'.