Moved method-query.slate from core/ to lib/, which removes it from the core bootstrap...
authorBrian T. Rice <briantrice@gmail.com>
Tue, 9 Mar 2010 01:16:46 +0000 (17:16 -0800)
committerBrian T. Rice <briantrice@gmail.com>
Tue, 9 Mar 2010 01:16:46 +0000 (17:16 -0800)
src/core/method.slate
src/lib/method-query.slate [moved from src/core/method-query.slate with 100% similarity]
src/llvm/mobius/build.slate
src/mobius/build.slate
src/mobius/prelude.slate
src/mobius/rebootstrap.slate

index c471b75..c21293d 100644 (file)
@@ -24,6 +24,30 @@ s@(Symbol traits) sendWith: x with: y
 s@(Symbol traits) sendWith: x with: y with: z
 [s sendTo: {x. y. z}].
 
+m@(Method traits) selector
+"By default, Methods are not named, so this answers Nil."
+[Nil].
+
+m@(Method traits) isNamed
+"Answer whether the method has been defined with a dispatch signature."
+[m selector isNotNil].
+
+m@(Closure traits) new [m clone].
+m@(Closure traits) arity [m method arity].
+m@(Closure traits) acceptsAdditionalArguments [m method acceptsAdditionalArguments].
+m@(Closure traits) allSelectorsSent [m method allSelectorsSent].
+m@(Closure traits) selector [m method selector].
+m@(Closure traits) optionalKeywords [m method optionalKeywords].
+
+m@(CompiledMethod traits) arity
+"Uses the slot which declares the number of input variables to answer the
+method's arity."
+[m inputVariables].
+
+m@(CompiledMethod traits) acceptsAdditionalArguments
+"Answers whether the method has a *rest paramter."
+[m restVariable].
+
 m@(Method traits) replaceWith: newM on: args
 "Uninstall the given method from the arguments, which need to be those holding
 the actual role entries pointing to that method for dispatch, and then define
index b92a84e..63c568d 100644 (file)
@@ -12,7 +12,6 @@ load-order."
      'lib/derivable'.
      'lib/numeric'.
      'lib/method'.
-     'lib/method-query'.
      'lib/collection'.
      'lib/association'.
      'lib/extensible'.
index 5f04fb8..f935f0a 100644 (file)
@@ -11,7 +11,6 @@ load-order."
      'core/numeric'.
      'core/association'.
      'core/method'.
-     'core/method-query'.
      'core/collection'.
      'core/extensible'.
      'core/set'.
index 709d9bd..9453537 100644 (file)
@@ -16,6 +16,7 @@ code which is compiled in to the kernel image."
   {'src/mobius/role'.
    'src/lib/image'.
    'src/lib/platform'.
+   'src/lib/method-query'.
    'src/mobius/memory'.
    'src/mobius/disassemble'.
    'src/mobius/primitive-method'.
index d0ac944..79871d0 100644 (file)
@@ -10,7 +10,6 @@ source code location features that the new compiler provides"
      'core/numeric'.
      'core/association'.
      'core/method'.
-     'core/method-query'.
      'core/collection'.
      'core/extensible'.
      'core/set'.