ByteCodeCompiler.st
changeset 1466 c05b6aa03a47
parent 1459 f6ea05913a60
child 1478 e6842cc04142
--- a/ByteCodeCompiler.st	Wed Oct 08 17:26:34 2003 +0200
+++ b/ByteCodeCompiler.st	Wed Oct 08 17:27:59 2003 +0200
@@ -618,6 +618,22 @@
         install:install skipIfSame:skipIfSame silent:silent foldConstants:fold
 !
 
+compile:methodText forClass:classToCompileFor install:doInstall
+    "compile a source-string for a method in classToCompileFor.
+     The install-argument controls if the method is to be installed into the
+     classes method-dictionary, or just to be compiled and a method object to be returned.
+     Returns the new method, #Error or nil."
+
+    ^ self 
+        compile:methodText
+        forClass:classToCompileFor
+        inCategory:'others'
+        notifying:nil
+        install:doInstall
+        skipIfSame:false
+        silent:false
+!
+
 compile:methodText forClass:classToCompileFor notifying:requestor
     "compile a source-string for a method in classToCompileFor.
      Errors are forwarded to requestor.
@@ -1529,8 +1545,8 @@
 
     (aSymbol == #pushThisContext) ifTrue:[stackDelta := 1. ^ 144].
 
-    (aSymbol == #isNil) ifTrue:[extraLiteral := aSymbol. ^ 188].
-    (aSymbol == #notNil) ifTrue:[extraLiteral := aSymbol. ^ 189].
+    (aSymbol == #isNil) ifTrue:["extraLiteral := aSymbol. -- could be synthetic" ^ 188].
+    (aSymbol == #notNil) ifTrue:["extraLiteral := aSymbol. -- could be synthetic" ^ 189].
     (aSymbol == #not) ifTrue:[extraLiteral := aSymbol. lineno := true. ^ 179].
     (aSymbol == #&) ifTrue:[extraLiteral := aSymbol. lineno := true. ^ 216].
     (aSymbol == #|) ifTrue:[extraLiteral := aSymbol. lineno := true. ^ 217].
@@ -3819,7 +3835,7 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.217 2003-09-22 10:14:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.218 2003-10-08 15:27:59 cg Exp $'
 ! !
 
 ByteCodeCompiler initialize!