Граф коммитов

9 коммитов

Автор SHA1 Сообщение Дата
Ayke van Laethem
9181f2d4ce
runtime: add "end of heap" to detect out of memory
This can be used in the future to trigger garbage collection. For now,
it provides a more useful error message in case the heap is completely
filled up.
2018-11-17 15:33:32 +01:00
Ayke van Laethem
15a4afb22a
runtime: unify GC interface
Make sure every to-be-implemented GC can use the same interface. As a
result, a 1MB chunk of RAM is allocated on Unix systems on init instead
of allocating on demand.
2018-11-17 14:11:58 +01:00
Ayke van Laethem
ee7c276493
compiler: update integer type sizes
* Use 64-bit integers on 64-bit platforms, just like gc and gccgo:
  https://golang.org/doc/go1.1#int
* Do not use a separate length type. Instead, use uintptr everywhere a
  length is expected.
2018-11-14 14:01:04 +01:00
Ayke van Laethem
611bca39ab
all: rename 'arm' to 'tinygo.arm' for Cortex-M
Let the standard library think that it is compiling for js/wasm.

The most correct way of supporting bare metal Cortex-M targets would be
using the 'arm' build tag and specifying no OS or an 'undefined' OS
(perhaps GOOS=noos?). However, there is no build tag for specifying no
OS at all, the closest possible is GOOS=js which makes very few
assumptions.

Sadly GOOS=js also makes some assumptions: it assumes to be running with
GOARCH=wasm. This would not be such a problem, just add js, wasm and arm
as build tags. However, having two GOARCH build tags leads to an error
in internal/cpu: it defines variables for both architectures which then
conflict.

To work around these problems, the 'arm' target has been renamed to
'tinygo.arm', which should work around these problems. In the future, a
GOOS=noos (or similar) should be added which can work with any
architecture and doesn't implement OS-specific stuff.
2018-11-09 11:50:38 +01:00
Ayke van Laethem
e5e09747f0
all: add WebAssembly backend 2018-10-21 19:47:47 +02:00
Ayke van Laethem
fd45410c24
runtime: add proper arm arch 2018-10-18 15:23:52 +02:00
Ayke van Laethem
dbb5ae5a23
avr: use i16 for lengths 2018-09-20 20:52:59 +02:00
Ayke van Laethem
42cddd3260
Move runtime.TargetBits out of the compiler 2018-09-02 16:00:31 +02:00
Ayke van Laethem
bf160d096b
Move lenType definition to runtime (partially) 2018-08-29 20:48:56 +02:00