mirror of
https://github.com/remko/waforth
synced 2024-12-26 09:59:09 +01:00
Order assembled output
This commit is contained in:
parent
0248e87dc3
commit
c507d50f19
2 changed files with 20 additions and 11 deletions
19
.travis.yml
19
.travis.yml
|
@ -1,14 +1,21 @@
|
|||
# Doesn't work yet, because there is no 'wabt' package in Ubuntu yet
|
||||
# This will have to wait until disco.
|
||||
# TODO: Add racket.
|
||||
# - racket version in xenial is too old; need bionic?
|
||||
# - 'wabt' package is only in Ubuntu disco
|
||||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
dist: xenial
|
||||
install:
|
||||
- wget https://github.com/WebAssembly/wabt/releases/download/1.0.10/wabt-1.0.10-linux.tar.gz -O wabt-1.0.10-linux.tar.gz
|
||||
- tar xzf wabt-1.0.10-linux.tar.gz
|
||||
- export PATH=$PWD/wabt-1.0.10:$PATH
|
||||
- yarn
|
||||
script:
|
||||
- yarn build
|
||||
- yarn test
|
||||
- make
|
||||
- make check
|
||||
cache: yarn
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- wabt
|
||||
- make
|
||||
- racket
|
||||
# - wabt
|
||||
|
|
|
@ -46,11 +46,13 @@
|
|||
|
||||
(define (priority x)
|
||||
(cond ((eq? x 'module) 0)
|
||||
((and (list? x) (eq? (car x) 'import)) 1)
|
||||
((and (list? x) (eq? (car x) 'table)) 2)
|
||||
((and (list? x) (eq? (car x) 'memory)) 2)
|
||||
((and (list? x) (eq? (car x) 'global)) 3)
|
||||
(else 100)))
|
||||
((and (list? x) (eq? (car x) 'import)) 1000000)
|
||||
((and (list? x) (eq? (car x) 'table)) 2000000)
|
||||
((and (list? x) (eq? (car x) 'memory)) 2000000)
|
||||
((and (list? x) (eq? (car x) 'global)) 3000000)
|
||||
((and (list? x) (eq? (car x) 'elem)) (+ 4000000 (car (cdr (car (cdr x))))))
|
||||
((and (list? x) (eq? (car x) 'data)) (+ 5000000 (car (cdr (car (cdr x))))))
|
||||
(else 100000000)))
|
||||
|
||||
(define (wasm-assemble module)
|
||||
(display
|
||||
|
|
Loading…
Reference in a new issue