Skip to content
Permalink
Branch: master
Commits on Mar 15, 2019
  1. main: version 0.4.1

    aykevl authored and deadprogram committed Mar 15, 2019
Commits on Mar 11, 2019
  1. main: include .data section in .hex file

    aykevl authored and deadprogram committed Mar 11, 2019
    The function extracting the firmware image for .hex and .bin files
    wasn't working correctly: it only extracted the .text segment and not
    the .data segment.
    This commit fixes this issue, so that it behaves (hopefully) just like
    objcopy -O{ihex|binary}.
    
    Another small change is that the formatting of the .hex file was made
    more like the output of objcopy: no entry addres (old Intel CPU
    holdover) and 16 bytes of data on each line.
Commits on Mar 9, 2019
  1. main: version 0.4.0

    aykevl authored and deadprogram committed Mar 9, 2019
Commits on Mar 8, 2019
  1. compiler: inline slice bounds checking

    aykevl authored and deadprogram committed Mar 7, 2019
    This improves code size in all tests by about 1% and up to 5% in some
    cases, likely because LLVM can better reason about inline bounds checks.
  2. compiler: refactor slice related asserts

    aykevl authored and deadprogram committed Mar 7, 2019
    Move these asserts into compiler/asserts.go, to keep them together.
    
    The make([]T) asserts aren't moved yet because that code is (still!)
    quite ugly and in need of some clean up.
  3. compiler: implement nil checks

    aykevl authored and deadprogram committed Mar 7, 2019
    This commit implements nil checks for all platforms. These nil checks
    can be optimized on systems with a MMU, but since a major target is
    systems without MMU, keep it this way for now.
    
    It implements three checks:
      * Nil checks before dereferencing a pointer.
      * Nil checks before calculating an address (*ssa.FieldAddr and
        *ssa.IndexAddr)
      * Nil checks before calling a function pointer.
    
    The first check has by far the biggest impact, with around 5% increase
    in code size. The other checks only trigger in only some test cases and
    have a minimal impact on code size.
    This first nil check is also the one that is easiest to avoid on systems
    with MMU, if necessary.
  4. interp: refactor to eliminate lots of code

    aykevl authored and deadprogram committed Mar 6, 2019
    This may cause a small performance penalty, but the code is easier to
    maange as a result.
Commits on Mar 7, 2019
  1. interp: use correct initialization order on panic() calls

    aykevl authored and deadprogram committed Mar 7, 2019
    Whenever interp hits an unreachable instruction, it bails out at that
    point. However, it used to insert new instructions at the bottom with
    the old init calls still at the top. So when a panic() happened in a
    non-main package, the last packages to init would actually be called
    first.
    
    This commit fixes this by setting the insert point at the top of
    runtime.initAll before starting interpretation, so the initialization
    order is still correct when a panic() happens during init.
  2. wasm: ignore arguments and environment variables

    aykevl authored and deadprogram committed Mar 6, 2019
    The wasm_exec.js file copied from the main Go repository did write those
    values to address 4096 in linear memory, which led to memory corruption
    in linear memory. Remove these things for now, until they're actually
    supported, if support is ever added.
Commits on Mar 6, 2019
  1. LICENSE: update author and year

    aykevl authored and deadprogram committed Mar 6, 2019
  2. main: only run WebAssembly tests on Linux

    aykevl authored and deadprogram committed Mar 6, 2019
    The WebAssembly target is not yet considered stable in LLVM 7, but has
    been enabled in the Debian builds so tests can run on Debian. However,
    the Homebrew builds don't have it enabled which results in test
    failures.
    
    Temporarily run WebAssembly tests only on Linux to fix this. This can be
    reverted after a switch to LLVM 8, which has WebAssembly enabled by
    default.
Commits on Mar 5, 2019
  1. compiler: support function pointers outside of addrspace 0

    aykevl authored and deadprogram committed Jan 1, 2019
    In LLVM 8, the AVR backend has moved all function pointers to address
    space 1 by default. Much of the code still assumes function pointers
    live in address space 0, leading to assertion failures.
    
    This commit fixes this problem by autodetecting function pointers and
    avoiding them in interface pseudo-calls.
  2. compiler: rename biggestInt → capacityType

    aykevl authored and deadprogram committed Feb 7, 2019
  3. compiler: calculate max number of entries in slice at compile time

    aykevl authored and deadprogram committed Feb 7, 2019
    This avoids difficult multiply-with-overflow code and avoids a multiply
    at runtime.
  4. compiler: make sure make([]T, ...) checks for Ts bigger than 1

    aykevl authored and deadprogram committed Jan 27, 2019
    Without this, the following code would not panic:
    
        func getInt(i int) { return i }
        make([][1<<18], getInt(1<<18))
    
    Or this code would be allowed to compile for 32-bit systems:
    
        make([][1<<18], 1<<18)
  5. compiler: fix make([]T, ...) with big integers on 32-bit systems or less

    aykevl authored and deadprogram committed Jan 10, 2019
    Previously, this would have resulted in a LLVM verification error
    because runtime.sliceBoundsCheckMake would not accept 64-bit integers on
    these platforms.
Commits on Mar 4, 2019
  1. test: add WebAssembly tests

    aykevl authored and deadprogram committed Jan 21, 2019
  2. wasm: switch emulator to node.js

    aykevl authored and deadprogram committed Jan 21, 2019
    Unfortunately, the olin/cwa emulator does not handle floats correctly.
    Node.js does, and because it is also supported by the Go WebAssembly
    implementation it has better support in general.
  3. circleci: replace Linux tests on Travis CI with CircleCI

    aykevl authored and deadprogram committed Feb 27, 2019
    CircleCI is faster and has more features than Travis CI. Additionally,
    based on the recent news, the future of Travis CI is rather uncertain.
    
    Keep using Travis CI for macOS testing at the moment, as open source
    projects will need to get special permission to use CircleCI for macOS
    tests.
  4. all: use internal objcopy implementation

    aykevl authored and deadprogram committed Feb 23, 2019
    This lessens the dependency on binutils (e.g. arm-none-eabi-objcopy).
Commits on Mar 1, 2019
  1. arm: switch to hardfloat ABI for Linux

    aykevl authored and deadprogram committed Feb 14, 2019
    This avoids an error on the Raspberry Pi 3.
Commits on Feb 27, 2019
  1. main: version 0.3.0

    aykevl committed Feb 27, 2019
Commits on Feb 24, 2019
  1. nrf: add CPU frequency

    aykevl authored and deadprogram committed Feb 23, 2019
Commits on Feb 23, 2019
  1. arm: provide intrinsics to disable/enable interrupts

    aykevl authored and deadprogram committed Feb 23, 2019
  2. samd21: define and use hardware pin numbers

    aykevl authored and deadprogram committed Feb 23, 2019
  3. samd21: add GPIO support for port B

    aykevl authored and deadprogram committed Feb 21, 2019
Commits on Feb 19, 2019
  1. all: add macOS support

    aykevl authored and deadprogram committed Feb 9, 2019
  2. ir: remove old cgo related code

    aykevl authored and deadprogram committed Feb 9, 2019
    There is now a custom implementation of CGo based on libclang.
  3. all: remove init interpretation during IR construction

    aykevl authored and deadprogram committed Feb 9, 2019
    The interp package does a much better job at interpretation, and is
    implemented as a pass on the IR which makes it much easier to compose.
    Also, the implementation works much better as it is based on LLVM IR
    instead of Go SSA.
Commits on Feb 18, 2019
  1. cgo: implement bool/float/complex types

    aykevl authored and deadprogram committed Feb 8, 2019
  2. compiler: use Clang data layout for complex numbers

    aykevl authored and deadprogram committed Feb 8, 2019
    Match data layout of complex numbers to that of Clang, for better
    interoperability. This makes alignment of complex numbes the same as the
    individual elements (real and imaginary), as is required by the C spec
    and implemented in Clang, but unlike the gc compler. The Go language
    specification is silent on this matter.
    
    > Each complex type has the same object representation and alignment
    > requirements as an array of two elements of the corresponding real
    > type (float for float complex, double for double complex, long double
    > for long double complex). The first element of the array holds the
    > real part, and the second element of the array holds the imaginary
    > component.
    
    Source: https://en.cppreference.com/w/c/language/arithmetic_types
Commits on Feb 8, 2019
  1. main: version v0.2.0

    aykevl committed Feb 8, 2019
  2. loader/cgo: add support for function pointers

    aykevl committed Feb 7, 2019
Older
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.