瀏覽代碼

JSStream: remove #nextPutReturn

instead put 'return ' directly in #nextPutReturn:
to be consistent with the rest putting its keywords
and special chars directly
Herbert Vojčík 8 年之前
父節點
當前提交
46c85cbaa4
共有 2 個文件被更改,包括 4 次插入32 次删除
  1. 3 27
      src/Compiler-IR.js
  2. 1 5
      src/Compiler-IR.st

+ 3 - 27
src/Compiler-IR.js

@@ -5729,30 +5729,6 @@ messageSends: ["nextPutAll:", "value"]
 }),
 $globals.JSStream);
 
-$core.addMethod(
-$core.method({
-selector: "nextPutReturn",
-protocol: 'streaming',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv(self["@stream"])._nextPutAll_("return ");
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"nextPutReturn",{},$globals.JSStream)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "nextPutReturn\x0a\x09stream nextPutAll: 'return '",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["nextPutAll:"]
-}),
-$globals.JSStream);
-
 $core.addMethod(
 $core.method({
 selector: "nextPutReturnWith:",
@@ -5762,7 +5738,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._nextPutReturn();
+$recv(self["@stream"])._nextPutAll_("return ");
 $recv(aBlock)._value();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -5771,10 +5747,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "nextPutReturnWith: aBlock\x0a\x09self nextPutReturn.\x0a\x09aBlock value",
+source: "nextPutReturnWith: aBlock\x0a\x09stream nextPutAll: 'return '.\x0a\x09aBlock value",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["nextPutReturn", "value"]
+messageSends: ["nextPutAll:", "value"]
 }),
 $globals.JSStream);
 

+ 1 - 5
src/Compiler-IR.st

@@ -1278,12 +1278,8 @@ nextPutNonLocalReturnWith: aBlock
 	stream nextPutAll: ']'
 !
 
-nextPutReturn
-	stream nextPutAll: 'return '
-!
-
 nextPutReturnWith: aBlock
-	self nextPutReturn.
+	stream nextPutAll: 'return '.
 	aBlock value
 !