Browse Source

Use #asJavascript in JSStream >> nextPutSendIndexFor:

Nicolas Petton 10 năm trước cách đây
mục cha
commit
f520226997
2 tập tin đã thay đổi với 8 bổ sung8 xóa
  1. 5 5
      js/Compiler-IR.js
  2. 3 3
      st/Compiler-IR.st

+ 5 - 5
js/Compiler-IR.js

@@ -4032,17 +4032,17 @@ $ctx1.sendIdx["nextPutAll:"]=1;
 self._lf();
 self._nextPutAll_(_st(_st(anIRSend)._scope())._alias());
 $ctx1.sendIdx["nextPutAll:"]=2;
-self._nextPutAll_(".sendIdx[\x22");
+self._nextPutAll_(".sendIdx[");
 $ctx1.sendIdx["nextPutAll:"]=3;
-self._nextPutAll_(_st(anIRSend)._selector());
+self._nextPutAll_(_st(_st(anIRSend)._selector())._asJavascript());
 $ctx1.sendIdx["nextPutAll:"]=4;
-self._nextPutAll_("\x22]=");
+self._nextPutAll_("]=");
 $ctx1.sendIdx["nextPutAll:"]=5;
 $1=self._nextPutAll_(_st(_st(anIRSend)._index())._asString());
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutSendIndexFor:",{anIRSend:anIRSend},smalltalk.JSStream)})},
 args: ["anIRSend"],
-source: "nextPutSendIndexFor: anIRSend\x0a\x09self \x0a\x09\x09nextPutAll: ';'; lf;\x0a\x09\x09nextPutAll: anIRSend scope alias;\x0a\x09\x09nextPutAll: '.sendIdx[\x22';\x0a\x09\x09nextPutAll: anIRSend selector;\x0a\x09\x09nextPutAll: '\x22]=';\x0a\x09\x09nextPutAll: anIRSend index asString",
-messageSends: ["nextPutAll:", "lf", "alias", "scope", "selector", "asString", "index"],
+source: "nextPutSendIndexFor: anIRSend\x0a\x09self \x0a\x09\x09nextPutAll: ';'; lf;\x0a\x09\x09nextPutAll: anIRSend scope alias;\x0a\x09\x09nextPutAll: '.sendIdx[';\x0a\x09\x09nextPutAll: anIRSend selector asJavascript;\x0a\x09\x09nextPutAll: ']=';\x0a\x09\x09nextPutAll: anIRSend index asString",
+messageSends: ["nextPutAll:", "lf", "alias", "scope", "asJavascript", "selector", "asString", "index"],
 referencedClasses: []
 }),
 smalltalk.JSStream);

+ 3 - 3
st/Compiler-IR.st

@@ -1242,9 +1242,9 @@ nextPutSendIndexFor: anIRSend
 	self 
 		nextPutAll: ';'; lf;
 		nextPutAll: anIRSend scope alias;
-		nextPutAll: '.sendIdx["';
-		nextPutAll: anIRSend selector;
-		nextPutAll: '"]=';
+		nextPutAll: '.sendIdx[';
+		nextPutAll: anIRSend selector asJavascript;
+		nextPutAll: ']=';
 		nextPutAll: anIRSend index asString
 !