Commits on Jul 28, 2011
  1. Tell llvm that the vtables don't change

    This should cause LLVM to optimize away multiple loads of
    the same slot in a given vtable.
    committed Jul 28, 2011
  2. Add ScalaObject and Serializable to base.sources

    ScalaObject was previously supplied by the parts of the runtime
    written in C. That's been removed so we need it now from the
    library. Serializable was previously provided in runtime.scala.
    committed Jul 28, 2011
  3. Fix calls of externalEquals

    LLVMPlatform no longer extends JavaPlatform but the LOAD_MODULE
    instruction for BoxesRunTimeClass was guarded by a pattern match
    for JavaPlatform. Simply move the emission outside of the pattern
    committed Jul 28, 2011
Commits on Jul 26, 2011
  1. Fix printing of class names in llvmrt

    The name length was being used as the field width, not the precision
    committed Jul 26, 2011
  2. Provide Math.sqrt in runtime.scala

    Needed for nbody shootout program
    committed Jul 26, 2011
  3. Fix {MIN,MAX}_VALUE for Int Short and Long

    They were pretty much exactly backwards. Oops!
    committed Jul 26, 2011
Commits on Jul 25, 2011
  1. Don't provide ScalaObject in llvmrt

    It can and should be compiled from the library source.
    committed Jul 25, 2011
  2. Lazify {Min,Max}Long in Big{Int,Decimal}

    If they are evaluated eagerly a real implementation of
    j.l.Big{Int,Decimal} is needed just to load Predef.
    committed Jul 25, 2011
  3. Fix casting between interface types

    A search of the instance's class info is required for all casts
    to interface types. It should be possible to eliminate it in some
    cases by being clever. For example, group the methods in an
    interface vtable by the super-interfaces and let the resulting
    vtable point to the middle of the sub-interface vtable.
    committed Jul 25, 2011
  4. Provide a boxed unit

    Right now this is done in llvmrt/object.c. At some point it
    should be done in a scala source file.
    committed Jul 25, 2011
  5. Fix instanceof tests for arrays

    committed Jul 25, 2011
Commits on Jul 23, 2011
  1. Revert "Move moduleSuffix method from GenJVM into Symbols."

    This reverts commit 2622c36.
    I ended up NOT needing to use moduleSuffix in GenLLVM, so reverting
    this to the way it was upstream may simplify future merges.
    league committed Jul 23, 2011
  2. Refactor llvm Makefile; can separately build ffi.sources, base.sources.

    The fix in `d29a9fac` also resolved a problem I had before compiling
    @ffi.sources separately. Now the `separate2` section of Makefile shows
    compiling @ffi.sources first, then @base.sources, then
    separate1.scala, then separate2.scala.
    Trying to separate out runtime.scala still causes problems. The
    `separate3` section seems to compile things in the right order, but
    the output is still messed up.
    league committed Jul 23, 2011
  3. Uniformly omit parens on Number xxxValue calls

    With the LLVM backend these classes are written in scala so the presence of the parens is not flexible. I chose to omit the parens since the methods are not side-affecting.
    committed Jul 23, 2011
  4. Exclude non-reachable predecessors from phi node

    Phi nodes for incoming value values were not excluding non-reachable blocks. This caused undefined values problems in the LLVM IR.
    committed Jul 23, 2011
  5. Disable ""+x => String.valueOf(x) for LLVM

    With the String object defined in scala this generates
    the wrong call convention. Revisit sometime to load the
    object and use a static-instance call.
    committed Jul 23, 2011
  6. Cache virtual method lists and implementations

    These were hotspots for the GenLLVM phase. Caching gives a quite good speedup.
    committed Jul 23, 2011
  7. Attempt to separately compile runtime.scala (somewhat broken).

    One fix was needed on finding the right symbol to output for
    java.lang.System; that part now works. However, we have to arrange for
    the System.sym to be loaded before the System.class in rt.jar; for new
    we set sun.boot.class.path in the Makefile.
    With these fixes, runtime.scala is separately compiled, however
    running it produces the wrong output.
    runscala bin/separate2.bc separate2 # works
    runscala bin/separate3.bc separate2 # compiles but output wrong!
    league committed Jul 23, 2011
Commits on Jul 22, 2011
  1. Separate compilation of classes and objects.

    From docs/examples/llvm, try: make bin/separate2.bc
    It will run the compiler twice, for each source file.
    Unclear for now whether it works to compile the runtime.scala, ffi
    sources, etc. in advance.
    league committed Jul 22, 2011
  2. Dump classname$.sym for module classes (objects).

    This represents a somewhat more sophisticated understanding of
    symbols we are asked to compile in GenLLVM. I dump symbol information
    to different files depending on whether it's a class or a module class
    (object). Reading back in the classes works okay, although I'm still
    not able to read back objects correctly.
    league committed Jul 22, 2011
Commits on Jul 21, 2011
  1. Move moduleSuffix method from GenJVM into Symbols.

    This method, previously defined in GenJVM, produces either "$" or ""
    depending on certain conditions of the Symbol argument. The same logic
    is needed in GenMSIL (and GenLLVM), so it was being copy/pasted.
    Even for JVM backend, in Erasure, we needed to access it as
    global.genJVM.moduleSuffix. Seems more reasonable to make it a method
    of Symbol.
    Ideally, this is a change which could be accepted upstream.
    league committed Jul 21, 2011
  2. Rename vtable typedef to vtable_t

    Having members and typedefs with the same name seems to cause problems
    sometimes for g++. It's also less confusing for people reading the code.
    committed Jul 21, 2011
  3. Merge changes from Chris League

    committed Jul 21, 2011
  4. Make mallocBytes take a CSizeT

    committed Jul 21, 2011
  5. Reenable the scala.runtime.*Ref classes

    They're needed for parts of the library. toString methods remain
    commented out because they're somehow causing errors.
    committed Jul 21, 2011
  6. Fix externalEquals forLLVM

    Because BoxesRuntime for LLVM is implemented in scala there is no true
    static and since JavaPlatform externalEquals method is named equals it
    resolved to an OverloadedSymbol between the external equals and object
    equals. Could have kept using equals and filter to get the right symbol
    but it was much simpler to just change the name. We also need to fix up
    the call type and load the BoxesRunTimeClass module.
    committed Jul 21, 2011