Skip to content

Commit

Permalink
tune emscripten build
Browse files Browse the repository at this point in the history
  • Loading branch information
liangdaji committed Jan 20, 2020
1 parent 0810d5d commit bd82957
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
10 changes: 5 additions & 5 deletions docs/assembly.rst
Expand Up @@ -250,11 +250,11 @@ In the grammar, opcodes are represented as pre-defined identifiers.
+-------------------------+-----+---+-----------------------------------------------------------------+
| address | | F | address of the current contract / execution context |
+-------------------------+-----+---+-----------------------------------------------------------------+
| balance(a) | | F | lu balance at address a |
| balance(a) | | F | lu balance at address a |
+-------------------------+-----+---+-----------------------------------------------------------------+
| caller | | F | call sender (excluding ``delegatecall``) |
+-------------------------+-----+---+-----------------------------------------------------------------+
| callvalue | | F | lu sent together with the current call |
| callvalue | | F | lu sent together with the current call |
+-------------------------+-----+---+-----------------------------------------------------------------+
| calldataload(p) | | F | call data starting from position p (32 bytes) |
+-------------------------+-----+---+-----------------------------------------------------------------+
Expand All @@ -274,15 +274,15 @@ In the grammar, opcodes are represented as pre-defined identifiers.
+-------------------------+-----+---+-----------------------------------------------------------------+
| returndatacopy(t, f, s) | `-` | B | copy s bytes from returndata at position f to mem at position t |
+-------------------------+-----+---+-----------------------------------------------------------------+
| create(v, p, s) | | F | create new contract with code mem[p..(p+s)) and send v lu |
| create(v, p, s) | | F | create new contract with code mem[p..(p+s)) and send v lu |
| | | | and return the new address |
+-------------------------+-----+---+-----------------------------------------------------------------+
| create2(v, n, p, s) | | C | create new contract with code mem[p..(p+s)) at address |
| | | | keccak256(<address> . n . keccak256(mem[p..(p+s))) and send v |
| | | | lu and return the new address |
| | | | lu and return the new address |
+-------------------------+-----+---+-----------------------------------------------------------------+
| call(g, a, v, in, | | F | call contract at address a with input mem[in..(in+insize)) |
| insize, out, outsize) | | | providing g gas and v lu and output area |
| insize, out, outsize) | | | providing g gas and v lu and output area |
| | | | mem[out..(out+outsize)) returning 0 on error (eg. out of gas) |
| | | | and 1 on success |
+-------------------------+-----+---+-----------------------------------------------------------------+
Expand Down
8 changes: 4 additions & 4 deletions docs/julia.rst
Expand Up @@ -411,11 +411,11 @@ The following functions must be available:
+---------------------------------------------+-----------------------------------------------------------------+
| *Execution control* |
+---------------------------------------------+-----------------------------------------------------------------+
| create(v:u256, p:u256, s:u256) | create new contract with code mem[p..(p+s)) and send v lu |
| create(v:u256, p:u256, s:u256) | create new contract with code mem[p..(p+s)) and send v lu |
| | and return the new address |
+---------------------------------------------+-----------------------------------------------------------------+
| call(g:u256, a:u256, v:u256, in:u256, | call contract at address a with input mem[in..(in+insize)) |
| insize:u256, out:u256, | providing g gas and v lu and output area |
| insize:u256, out:u256, | providing g gas and v lu and output area |
| outsize:u256) | mem[out..(out+outsize)) returning 0 on error (eg. out of gas) |
| -> r:u256 | and 1 on success |
+---------------------------------------------+-----------------------------------------------------------------+
Expand Down Expand Up @@ -465,13 +465,13 @@ The following functions must be available:
+---------------------------------------------+-----------------------------------------------------------------+
| gasleft() -> gas:u256 | gas still available to execution |
+---------------------------------------------+-----------------------------------------------------------------+
| balance(a:u256) -> v:u256 | lu balance at address a |
| balance(a:u256) -> v:u256 | lu balance at address a |
+---------------------------------------------+-----------------------------------------------------------------+
| this() -> address:u256 | address of the current contract / execution context |
+---------------------------------------------+-----------------------------------------------------------------+
| caller() -> address:u256 | call sender (excluding delegatecall) |
+---------------------------------------------+-----------------------------------------------------------------+
| callvalue() -> v:u256 | lu sent together with the current call |
| callvalue() -> v:u256 | lu sent together with the current call |
+---------------------------------------------+-----------------------------------------------------------------+
| calldataload(p:u256) -> v:u256 | call data starting from position p (32 bytes) |
+---------------------------------------------+-----------------------------------------------------------------+
Expand Down
15 changes: 9 additions & 6 deletions scripts/install_cmake.sh
Expand Up @@ -23,17 +23,20 @@ PATH=$PREFIX/bin:$PATH
if test -f $BIN/cmake && ($BIN/cmake --version | grep -q "$VERSION"); then
echo "CMake $VERSION already installed in $BIN"
else
WORKSPACE=/root/project
FILE=cmake-$VERSION-$OS-x86_64.tar.gz
URL=https://cmake.org/files/v3.7/$FILE
ERROR=0
TMPFILE=$(mktemp --tmpdir cmake-$VERSION-$OS-x86_64.XXXXXXXX.tar.gz)
echo "Downloading CMake ($URL)..."
wget "$URL" -O "$TMPFILE" -nv
TMPFILE=$WORKSPACE/deps/downloads/$FILE
if ! test -f $TMPFILE ; then
URL=https://cmake.org/files/v3.7/$FILE
ERROR=0
echo "Downloading CMake ($URL)..."
wget "$URL" -O "$TMPFILE" -nv
fi
if ! (shasum -a256 "$TMPFILE" | grep -q "$SHA256"); then
echo "Checksum mismatch ($TMPFILE)"
rm $TMPFILE
exit 1
fi
mkdir -p "$PREFIX"
tar xzf "$TMPFILE" -C "$PREFIX" --strip 1
rm $TMPFILE
fi
6 changes: 6 additions & 0 deletions scripts/travis-emscripten/build_emscripten.sh
Expand Up @@ -34,6 +34,12 @@

set -ev

#--------------------------------------------------------------
# Update package source list.
#--------------------------------------------------------------
sed -i 's/httpredir.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
sed -i 's|security.debian.org|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list

if ! type git &>/dev/null; then
# We need git for extracting the commit hash
apt-get update
Expand Down

0 comments on commit bd82957

Please sign in to comment.