Browse Source

Extract writeActualSuperSend:.

Herby Vojčík 1 month ago
parent
commit
90cd83ac32
2 changed files with 68 additions and 34 deletions
  1. 55 28
      lang/src/Compiler-IR.js
  2. 13 6
      lang/src/Compiler-IR.st

File diff suppressed because it is too large
+ 55 - 28
lang/src/Compiler-IR.js


+ 13 - 6
lang/src/Compiler-IR.st

@@ -1071,7 +1071,17 @@ visitSuperSend: anIRSend
 		nextPutAll: '('; lf;
 		nextPutAll: '//>>excludeStart("ctx", pragmas.excludeDebugContexts);'; lf;
 		nextPutAll: anIRSend scope alias, '.supercall = true,'; lf;
-		nextPutAll: '//>>excludeEnd("ctx");'; lf;
+		nextPutAll: '//>>excludeEnd("ctx");'; lf.
+	self writeActualSuperSend: anIRSend.
+	self stream 
+		nextPutAll: ');'; lf;
+		nextPutAll: '//>>excludeStart("ctx", pragmas.excludeDebugContexts);'; lf;
+		nextPutAll: anIRSend scope alias, '.supercall = false;'; lf;
+		nextPutAll: '//>>excludeEnd("ctx");'
+!
+
+writeActualSuperSend: anIRSend
+	self stream
 		nextPutAll: '(', self currentClass asJavaScriptSource;
 		nextPutAll: '.superclass||$boot.nilAsClass).fn.prototype.';
 		nextPutAll: anIRSend javaScriptSelector, '.apply(';
@@ -1079,11 +1089,8 @@ visitSuperSend: anIRSend
 	self
 		visitInstructionList: anIRSend arguments
 		enclosedBetween: '[' and: ']'.
-	self stream 
-		nextPutAll: '));'; lf;
-		nextPutAll: '//>>excludeStart("ctx", pragmas.excludeDebugContexts);'; lf;
-		nextPutAll: anIRSend scope alias, '.supercall = false;'; lf;
-		nextPutAll: '//>>excludeEnd("ctx");'
+	self stream
+		nextPutAll: ')'
 ! !
 
 Object subclass: #JSStream