Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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.
  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.
  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
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
  2. Provide Math.sqrt in runtime.scala

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

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

    It can and should be compiled from the library source.
  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.
  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.
  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.
  5. Fix instanceof tests for arrays

Commits on Jul 23, 2011
  1. @league

    Revert "Move moduleSuffix method from GenJVM into Symbols."

    league authored
    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.
  2. @league
  3. @league

    Refactor llvm Makefile; can separately build ffi.sources, base.sources.

    league authored
    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.
  4. 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.
  5. 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.
  6. 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.
  7. Cache virtual method lists and implementations

    These were hotspots for the GenLLVM phase. Caching gives a quite good speedup.
  8. @league

    Attempt to separately compile runtime.scala (somewhat broken).

    league authored
    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!
  9. @league
Commits on Jul 22, 2011
  1. @league

    Separate compilation of classes and objects.

    league authored
    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.
  2. @league
  3. @league

    Dump classname$.sym for module classes (objects).

    league authored
    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.
Commits on Jul 21, 2011
  1. @league

    Move moduleSuffix method from GenJVM into Symbols.

    league authored
    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.
  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.
  3. Merge changes from Chris League

  4. Make mallocBytes take a CSizeT

  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.
  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.
Something went wrong with that request. Please try again.