This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- before 2020-06-25 13:55:56.943297377 -0700 | |
+++ after 2020-06-25 13:56:01.743316233 -0700 | |
@@ -1,8 +1,8 @@ | |
if value != null: | |
value.ref_count += 1 | |
let current_elem = table[index] | |
+table[index] = value | |
if current_elem != null: | |
current_elem.ref_count -= 1 | |
if current_elem.ref_count == 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::cell::RefCell; | |
use std::rc::Rc; | |
use wasmtime::*; | |
struct A { | |
table: Table, | |
put_the_thing: Rc<RefCell<Option<Val>>>, | |
contents: String, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use wasmtime::*; | |
struct A { | |
table: Table, | |
a: i32, | |
} | |
impl Drop for A { | |
fn drop(&mut self) { | |
let me = self.table.get(0).unwrap(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'bar.3a1fbbbh-cgu.0' | |
source_filename = "bar.3a1fbbbh-cgu.0" | |
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-pc-windows-msvc" | |
$__rust_panic_type_info = comdat any | |
@"??_7type_info@@6B@" = external global i8* | |
@__rust_panic_type_info = linkonce_odr global { i8**, i8*, [11 x i8] } { i8** @"??_7type_info@@6B@", i8* null, [11 x i8] c"rust_panic\00" }, comdat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct Parser { | |
// internally has a state machine which looks like: | |
// | |
// * parsing a section - in this state we're looking for the section header | |
// which indicates the section code and how big the section is. Depending | |
// on the section code this will indicate what form of chunk is returned. | |
// This also waits for some sections to be entirely resident before | |
// proceeding. | |
// | |
// * parsing functions - this has a count of how many functions are |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// #include <assert.h> | |
// #include <signal.h> | |
// #include <sys/mman.h> | |
// | |
// #define ALT_STACK_SIZE (16 * 4096) | |
// | |
// void my_run() { | |
// void *stack = mmap(NULL, ALT_STACK_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ [ -z arm-unknown-linux-gnueabihf ] | |
+ run arm-unknown-linux-gnueabihf | |
+ docker build -t backtrace -f ci/docker/arm-unknown-linux-gnueabihf/Dockerfile ci | |
Sending build context to Docker daemon 32.26kB | |
Step 1/3 : FROM ubuntu:20.04 | |
---> 1d622ef86b13 | |
Step 2/3 : RUN apt-get update && apt-get install -y --no-install-recommends gcc ca-certificates libc6-dev gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user | |
---> Using cache | |
---> 3b0e9e7b0675 | |
Step 3/3 : ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- before.wast 2020-06-09 12:49:42.448000829 -0700 | |
+++ tests/local/module-linking/a.wast 2020-06-09 12:50:29.456176376 -0700 | |
@@ -3,42 +3,42 @@ | |
;; boilerplate, it is proportional in size to only the *direct* dependencies. | |
(module $A | |
- (type $Wasi (instance ...)) | |
+ (type $Wasi (instance )) | |
(import "wasi" (instance (type $Wasi))) | |
- (func (export "a") ...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;(module | |
;; (type $Wasi (instance)) | |
;; (module $B) | |
;; (module $B_wrap | |
;; (import "wasi" (instance $wasi (type $Wasi))) | |
;; (instance $b (instantiate $B)) | |
;; (export $b) | |
;; ) | |
;;) | |
(module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub extern "C" fn wasm_sin(key: i32) -> i32 { | |
(key as f32).sin() as i32 | |
} |