Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let real-dvm =
let dev = builtins.fetchGit {
url = "ssh://git@github.com/dfinity-lab/dev";
ref = "master";
rev = "22285295f0095d5596f762371a98e03313dc8a72";
rev = "b6f587c3303b9f2585548e5fcb98f907b0275219";
}; in
(import dev {}).dvm
else null
Expand Down
4 changes: 2 additions & 2 deletions nix/nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
with { rev = "e1ad1a0aa2ce6f9fd951d18181ba850ca8e74133"; };
with { rev = "d50bc0afd23ae2c6bcc31556b005f4e9421d2532"; };

import (builtins.fetchTarball {
sha256 = "0vk5sjmbq52xfrinrhvqry53asl6ppwbly1l7ymj8g0j4pkjf7p1";
sha256 = "1vdh3x0a65z2k4mzf2f7jpyggqhnqv2716xc51gg4a1lgnf3g8pa";
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
})
2 changes: 1 addition & 1 deletion src/encodeMap.ml
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ let encode m =

let mappings = Buffer.contents map in
let n = max 0 ((String.length mappings) - 1) in
let json : Yojson.Basic.json = `Assoc [
let json : Yojson.Basic.t = `Assoc [
("version", `Int 3);
("sources", `List ( List.map (fun x -> `String x) !sources ) );
("sourcesContent", `List ( List.map (fun x -> if x = "" then `Null else `String x) !sourcesContent ) );
Expand Down
2 changes: 2 additions & 0 deletions src/js_main.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
open Source

module Js = Js_of_ocaml.Js

let position_of_pos pos =
object%js
(* The LSP spec requires zero-based positions *)
Expand Down
22 changes: 11 additions & 11 deletions test/run/words.as
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func checkpointJuliett() {};
let d : Word64 = -15;
let e : Word64 = 20000;

// CHECK: get_local $c
// CHECK: local.get $c
// CHECK-NOT: call $box_i64
// CHECK: call $printW64ln
printW64ln(+c);
Expand Down Expand Up @@ -80,7 +80,7 @@ func checkpointJuliett() {};

// CHECK: call $checkpointBravo
checkpointBravo();
// CHECK: get_local $c
// CHECK: local.get $c
// CHECK-NOT: call $box_i32
// CHECK: call $printW32ln
printW32ln(+c);
Expand Down Expand Up @@ -140,9 +140,9 @@ func checkpointJuliett() {};

// CHECK: call $checkpointDelta
checkpointDelta();
// CHECK: get_local $a
// CHECK: local.get $a
// This is not a native Wasm i32 multiplication, we need to shift one of the args left by 16 bits!
// CHECK-NEXT: get_local $b
// CHECK-NEXT: local.get $b
// CHECK-NEXT: i32.const 16
// CHECK-NEXT: i32.shr_u
// CHECK-NEXT: i32.mul
Expand All @@ -159,7 +159,7 @@ func checkpointJuliett() {};

// CHECK: call $checkpointEcho
checkpointEcho();
// CHECK: get_local $b
// CHECK: local.get $b
// This is not a native Wasm i32 left shift, we need to shift the second arg left by 16 bits and clamp it to 4 bits!
// CHECK-NEXT: i32.const 16
// CHECK-NEXT: i32.shr_u
Expand All @@ -175,14 +175,14 @@ func checkpointJuliett() {};

// CHECK: call $checkpointFoxtrot
checkpointFoxtrot();
// CHECK: get_local $b
// CHECK: local.get $b
// CHECK-NEXT: call $rotl<Word16>
// CHECK-NEXT: call $printW16ln
printW16ln(c <<> b);

// CHECK: call $checkpointGolf
checkpointGolf();
// CHECK: get_local $b
// CHECK: local.get $b
// CHECK-NEXT: call $rotr<Word16>
// CHECK-NEXT: call $printW16ln
printW16ln(c <>> b);
Expand Down Expand Up @@ -218,7 +218,7 @@ func checkpointJuliett() {};
printW8ln(c - a);
// CHECK: call $checkpointHotel
checkpointHotel();
// CHECK: get_local $b
// CHECK: local.get $b
// This is not a native Wasm i32 multiplication, we need to shift one of the args left by 24 bits!
// CHECK-NEXT: i32.const 24
// CHECK-NEXT: i32.shr_u
Expand All @@ -236,7 +236,7 @@ func checkpointJuliett() {};

// CHECK: call $checkpointIndia
checkpointIndia();
// CHECK: get_local $b
// CHECK: local.get $b
// This is not a native Wasm i32 left shift, we need to shift the second arg left by 24 bits and clamp it to 3 bits!
// CHECK-NEXT: i32.const 24
// CHECK-NEXT: i32.shr_u
Expand All @@ -252,11 +252,11 @@ func checkpointJuliett() {};

// CHECK: call $checkpointJuliett
checkpointJuliett();
// CHECK: get_local $b
// CHECK: local.get $b
// CHECK-NEXT: call $rotl<Word8>
// CHECK-NEXT: call $printW8ln
printW8ln(c <<> b);
// CHECK: get_local $b
// CHECK: local.get $b
// CHECK-NEXT: call $rotr<Word8>
// CHECK-NEXT: call $printW8ln
printW8ln(c <>> b);
Expand Down