From a8303f16778911fd4f0bddf0d600b4eb69b7000a Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Tue, 17 Nov 2015 09:57:29 -0800 Subject: [PATCH] Removed white spaces at end of lines --- ml-proto/Makefile | 4 +- ml-proto/README.md | 2 +- ml-proto/host/lexer.mll | 2 +- ml-proto/spec/int.ml | 14 +++--- ml-proto/test/endianness.wast | 58 ++++++++++++------------- ml-proto/test/float_exprs.wast | 6 +-- ml-proto/test/imports.wast | 2 +- ml-proto/test/left-to-right.wast | 74 ++++++++++++++++---------------- ml-proto/test/memory_trap.wast | 2 +- ml-proto/test/resizing.wast | 2 +- ml-proto/test/unreachable.wast | 2 +- 11 files changed, 84 insertions(+), 84 deletions(-) diff --git a/ml-proto/Makefile b/ml-proto/Makefile index 9ecc324390..d0831ebff0 100644 --- a/ml-proto/Makefile +++ b/ml-proto/Makefile @@ -12,7 +12,7 @@ LIBS = str bigarray OCB_FLAGS += -quiet OCB_FLAGS += # -use-ocamlfind -OCB_FLAGS += # -cflags -w +OCB_FLAGS += # -cflags -w OCB_FLAGS += # -cflags +a-4-41-42-44-45 OCB_FLAGS += $(DIRS:%=-I %) OCB_FLAGS += $(LIBS:%=-libs %) @@ -42,7 +42,7 @@ test: $(NAME) ./runtests.py .PHONY: zip -zip: +zip: git archive --format=zip --prefix=$(NAME)/ \ -o $(NAME).zip HEAD diff --git a/ml-proto/README.md b/ml-proto/README.md index 310c06cf78..c65651f93c 100644 --- a/ml-proto/README.md +++ b/ml-proto/README.md @@ -60,7 +60,7 @@ mingw64-x86_64-binutils -winpthreads ``` -The set of packages may be different on 32-bit Windows. +The set of packages may be different on 32-bit Windows. The current set of prototypes does not rely on opam or ocaml packages, but be aware that opam does not work on Windows. diff --git a/ml-proto/host/lexer.mll b/ml-proto/host/lexer.mll index 1539274b23..ba0968c183 100644 --- a/ml-proto/host/lexer.mll +++ b/ml-proto/host/lexer.mll @@ -10,7 +10,7 @@ let convert_pos pos = let region lexbuf = let left = convert_pos (Lexing.lexeme_start_p lexbuf) in - let right = convert_pos (Lexing.lexeme_end_p lexbuf) in + let right = convert_pos (Lexing.lexeme_end_p lexbuf) in {Source.left = left; Source.right = right} let error lexbuf msg = raise (Script.Syntax (region lexbuf, msg)) diff --git a/ml-proto/spec/int.ml b/ml-proto/spec/int.ml index 17b9b870a9..31f3af3b50 100644 --- a/ml-proto/spec/int.ml +++ b/ml-proto/spec/int.ml @@ -2,25 +2,25 @@ module type RepresentationType = sig - type t + type t val add : t -> t -> t val min_int : t val zero : t val one : t - val minus_one : t + val minus_one : t val shift_left : t -> int -> t val shift_right : t -> int -> t val logand : t -> t -> t val lognot : t -> t val logor : t -> t -> t - val logxor : t -> t -> t + val logxor : t -> t -> t val sub : t -> t -> t val div : t -> t -> t val mul : t -> t -> t - val rem : t -> t -> t + val rem : t -> t -> t val shift_right_logical : t -> int -> t val of_int : int -> t - val to_int : t -> int + val to_int : t -> int val of_string : string -> t val to_string : t -> string @@ -30,7 +30,7 @@ end module type S = sig type t - type bits + type bits val of_bits : bits -> t val to_bits : t -> bits @@ -68,7 +68,7 @@ sig val of_string : string -> t val to_string : t -> string end - + module Make(Rep : RepresentationType) : S with type bits = Rep.t and type t = Rep.t = struct (* diff --git a/ml-proto/test/endianness.wast b/ml-proto/test/endianness.wast index 1231de58ef..cd3ebc1763 100644 --- a/ml-proto/test/endianness.wast +++ b/ml-proto/test/endianness.wast @@ -6,7 +6,7 @@ (i32.store8 (get_local $address) (get_local $value)) (i32.store8 (i32.add (get_local $address) (i32.const 1)) (i32.shr_u (get_local $value) (i32.const 8))) ) - + ;; Stores an i32 value in little-endian format (func $i32_store_little (param $address i32) (param $value i32) (call $i16_store_little (get_local $address) (get_local $value)) @@ -18,7 +18,7 @@ (call $i32_store_little (get_local $address) (i32.wrap/i64 (get_local $value))) (call $i32_store_little (i32.add (get_local $address) (i32.const 4)) (i32.wrap/i64 (i64.shr_u (get_local $value) (i64.const 32)))) ) - + ;; Loads an i16 value in little-endian format (func $i16_load_little (param $address i32) (result i32) (i32.or @@ -26,7 +26,7 @@ (i32.shl (i32.load8_u (i32.add (get_local $address) (i32.const 1))) (i32.const 8)) ) ) - + ;; Loads an i32 value in little-endian format (func $i32_load_little (param $address i32) (result i32) (i32.or @@ -34,7 +34,7 @@ (i32.shl (call $i16_load_little (i32.add (get_local $address) (i32.const 2))) (i32.const 16)) ) ) - + ;; Loads an i64 value in little-endian format (func $i64_load_little (param $address i32) (result i64) (i64.or @@ -42,114 +42,114 @@ (i64.shl (i64.extend_u/i32 (call $i32_load_little (i32.add (get_local $address) (i32.const 4)))) (i64.const 32)) ) ) - + (func $i32_load16_s (param $value i32) (result i32) (call $i16_store_little (i32.const 0) (get_local $value)) (i32.load16_s (i32.const 0)) ) - + (func $i32_load16_u (param $value i32) (result i32) (call $i16_store_little (i32.const 0) (get_local $value)) (i32.load16_u (i32.const 0)) ) - + (func $i32_load (param $value i32) (result i32) (call $i32_store_little (i32.const 0) (get_local $value)) (i32.load (i32.const 0)) ) - + (func $i64_load16_s (param $value i64) (result i64) (call $i16_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) (i64.load16_s (i32.const 0)) ) - + (func $i64_load16_u (param $value i64) (result i64) (call $i16_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) (i64.load16_u (i32.const 0)) ) - + (func $i64_load32_s (param $value i64) (result i64) (call $i32_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) (i64.load32_s (i32.const 0)) ) - + (func $i64_load32_u (param $value i64) (result i64) (call $i32_store_little (i32.const 0) (i32.wrap/i64 (get_local $value))) (i64.load32_u (i32.const 0)) ) - + (func $i64_load (param $value i64) (result i64) (call $i64_store_little (i32.const 0) (get_local $value)) (i64.load (i32.const 0)) ) - + (func $f32_load (param $value f32) (result f32) (call $i32_store_little (i32.const 0) (i32.reinterpret/f32 (get_local $value))) (f32.load (i32.const 0)) ) - + (func $f64_load (param $value f64) (result f64) (call $i64_store_little (i32.const 0) (i64.reinterpret/f64 (get_local $value))) (f64.load (i32.const 0)) ) - - + + (func $i32_store16 (param $value i32) (result i32) (i32.store16 (i32.const 0) (get_local $value)) (call $i16_load_little (i32.const 0)) ) - + (func $i32_store (param $value i32) (result i32) (i32.store (i32.const 0) (get_local $value)) (call $i32_load_little (i32.const 0)) ) - + (func $i64_store16 (param $value i64) (result i64) (i64.store16 (i32.const 0) (get_local $value)) (i64.extend_u/i32 (call $i16_load_little (i32.const 0))) ) - + (func $i64_store32 (param $value i64) (result i64) (i64.store32 (i32.const 0) (get_local $value)) (i64.extend_u/i32 (call $i32_load_little (i32.const 0))) ) - + (func $i64_store (param $value i64) (result i64) (i64.store (i32.const 0) (get_local $value)) (call $i64_load_little (i32.const 0)) ) - + (func $f32_store (param $value f32) (result f32) (f32.store (i32.const 0) (get_local $value)) (f32.reinterpret/i32 (call $i32_load_little (i32.const 0))) ) - + (func $f64_store (param $value f64) (result f64) (f64.store (i32.const 0) (get_local $value)) (f64.reinterpret/i64 (call $i64_load_little (i32.const 0))) ) - + (export "i32_load16_s" $i32_load16_s) (export "i32_load16_u" $i32_load16_u) (export "i32_load" $i32_load) - + (export "i64_load16_s" $i64_load16_s) (export "i64_load16_u" $i64_load16_u) (export "i64_load32_s" $i64_load32_s) (export "i64_load32_u" $i64_load32_u) (export "i64_load" $i64_load) - + (export "f32_load" $f32_load) (export "f64_load" $f64_load) - - + + (export "i32_store16" $i32_store16) (export "i32_store" $i32_store) - + (export "i64_store16" $i64_store16) (export "i64_store32" $i64_store32) (export "i64_store" $i64_store) - + (export "f32_store" $f32_store) (export "f64_store" $f64_store) ) diff --git a/ml-proto/test/float_exprs.wast b/ml-proto/test/float_exprs.wast index 9b12cd3f38..225345721e 100644 --- a/ml-proto/test/float_exprs.wast +++ b/ml-proto/test/float_exprs.wast @@ -369,15 +369,15 @@ (func $i32.no_fold_f32_s (param i32) (result i32) (i32.trunc_s/f32 (f32.convert_s/i32 (get_local 0)))) (export "i32.no_fold_f32_s" $i32.no_fold_f32_s) - + (func $i32.no_fold_f32_u (param i32) (result i32) (i32.trunc_u/f32 (f32.convert_u/i32 (get_local 0)))) (export "i32.no_fold_f32_u" $i32.no_fold_f32_u) - + (func $i64.no_fold_f64_s (param i64) (result i64) (i64.trunc_s/f64 (f64.convert_s/i64 (get_local 0)))) (export "i64.no_fold_f64_s" $i64.no_fold_f64_s) - + (func $i64.no_fold_f64_u (param i64) (result i64) (i64.trunc_u/f64 (f64.convert_u/i64 (get_local 0)))) (export "i64.no_fold_f64_u" $i64.no_fold_f64_u) diff --git a/ml-proto/test/imports.wast b/ml-proto/test/imports.wast index 6e11899461..0bcc73b153 100644 --- a/ml-proto/test/imports.wast +++ b/ml-proto/test/imports.wast @@ -1,4 +1,4 @@ -(module +(module (import $print_i32 "stdio" "print" (param i32)) (import $print_i64 "stdio" "print" (param i64)) (import $print_i32_f32 "stdio" "print" (param i32 f32)) diff --git a/ml-proto/test/left-to-right.wast b/ml-proto/test/left-to-right.wast index 93f9100f09..cb2ad78de9 100644 --- a/ml-proto/test/left-to-right.wast +++ b/ml-proto/test/left-to-right.wast @@ -1,6 +1,6 @@ (module (memory 9) - + ;; The idea is: We reset the memory, then the arithmetic instruction calls $*_left and $*_right. ;; $*_left stores the number 1, and $*_right stores the number 2 (both at address 8) ;; Then we read the value at address 8. If it's 0, the VM did an unwanted optimzation. @@ -110,48 +110,48 @@ (func $f64_call (result i32) (call $reset) (call $f64_dummy (call $f64_left) (call $f64_right)) (call $get)) - (export "i32_add" $i32_add) (export "i64_add" $i64_add) - (export "i32_sub" $i32_sub) (export "i64_sub" $i64_sub) - (export "i32_mul" $i32_mul) (export "i64_mul" $i64_mul) - (export "i32_div_s" $i32_div_s) (export "i64_div_s" $i64_div_s) - (export "i32_div_u" $i32_div_u) (export "i64_div_u" $i64_div_u) - (export "i32_rem_s" $i32_rem_s) (export "i64_rem_s" $i64_rem_s) - (export "i32_rem_u" $i32_rem_u) (export "i64_rem_u" $i64_rem_u) - (export "i32_and" $i32_and) (export "i64_and" $i64_and) - (export "i32_or" $i32_or) (export "i64_or" $i64_or) - (export "i32_xor" $i32_xor) (export "i64_xor" $i64_xor) - (export "i32_shl" $i32_shl) (export "i64_shl" $i64_shl) - (export "i32_shr_u" $i32_shr_u) (export "i64_shr_u" $i64_shr_u) - (export "i32_shr_s" $i32_shr_s) (export "i64_shr_s" $i64_shr_s) - (export "i32_eq" $i32_eq) (export "i64_eq" $i64_eq) - (export "i32_ne" $i32_ne) (export "i64_ne" $i64_ne) - (export "i32_lt_s" $i32_lt_s) (export "i64_lt_s" $i64_lt_s) - (export "i32_le_s" $i32_le_s) (export "i64_le_s" $i64_le_s) - (export "i32_lt_u" $i32_lt_u) (export "i64_lt_u" $i64_lt_u) - (export "i32_le_u" $i32_le_u) (export "i64_le_u" $i64_le_u) - (export "i32_gt_s" $i32_gt_s) (export "i64_gt_s" $i64_gt_s) - (export "i32_ge_s" $i32_ge_s) (export "i64_ge_s" $i64_ge_s) - (export "i32_gt_u" $i32_gt_u) (export "i64_gt_u" $i64_gt_u) - (export "i32_ge_u" $i32_ge_u) (export "i64_ge_u" $i64_ge_u) + (export "i32_add" $i32_add) (export "i64_add" $i64_add) + (export "i32_sub" $i32_sub) (export "i64_sub" $i64_sub) + (export "i32_mul" $i32_mul) (export "i64_mul" $i64_mul) + (export "i32_div_s" $i32_div_s) (export "i64_div_s" $i64_div_s) + (export "i32_div_u" $i32_div_u) (export "i64_div_u" $i64_div_u) + (export "i32_rem_s" $i32_rem_s) (export "i64_rem_s" $i64_rem_s) + (export "i32_rem_u" $i32_rem_u) (export "i64_rem_u" $i64_rem_u) + (export "i32_and" $i32_and) (export "i64_and" $i64_and) + (export "i32_or" $i32_or) (export "i64_or" $i64_or) + (export "i32_xor" $i32_xor) (export "i64_xor" $i64_xor) + (export "i32_shl" $i32_shl) (export "i64_shl" $i64_shl) + (export "i32_shr_u" $i32_shr_u) (export "i64_shr_u" $i64_shr_u) + (export "i32_shr_s" $i32_shr_s) (export "i64_shr_s" $i64_shr_s) + (export "i32_eq" $i32_eq) (export "i64_eq" $i64_eq) + (export "i32_ne" $i32_ne) (export "i64_ne" $i64_ne) + (export "i32_lt_s" $i32_lt_s) (export "i64_lt_s" $i64_lt_s) + (export "i32_le_s" $i32_le_s) (export "i64_le_s" $i64_le_s) + (export "i32_lt_u" $i32_lt_u) (export "i64_lt_u" $i64_lt_u) + (export "i32_le_u" $i32_le_u) (export "i64_le_u" $i64_le_u) + (export "i32_gt_s" $i32_gt_s) (export "i64_gt_s" $i64_gt_s) + (export "i32_ge_s" $i32_ge_s) (export "i64_ge_s" $i64_ge_s) + (export "i32_gt_u" $i32_gt_u) (export "i64_gt_u" $i64_gt_u) + (export "i32_ge_u" $i32_ge_u) (export "i64_ge_u" $i64_ge_u) (export "i32_store" $i32_store) (export "i64_store" $i64_store) (export "i32_store8" $i32_store8) (export "i64_store8" $i64_store8) (export "i32_store16" $i32_store16) (export "i64_store16" $i64_store16) (export "i64_store32" $i64_store32) (export "i32_call" $i32_call) (export "i64_call" $i64_call) - (export "f32_add" $f32_add) (export "f64_add" $f64_add) - (export "f32_sub" $f32_sub) (export "f64_sub" $f64_sub) - (export "f32_mul" $f32_mul) (export "f64_mul" $f64_mul) - (export "f32_div" $f32_div) (export "f64_div" $f64_div) - (export "f32_copysign" $f32_copysign) (export "f64_copysign" $f64_copysign) - (export "f32_eq" $f32_eq) (export "f64_eq" $f64_eq) - (export "f32_ne" $f32_ne) (export "f64_ne" $f64_ne) - (export "f32_lt" $f32_lt) (export "f64_lt" $f64_lt) - (export "f32_le" $f32_le) (export "f64_le" $f64_le) - (export "f32_gt" $f32_gt) (export "f64_gt" $f64_gt) - (export "f32_ge" $f32_ge) (export "f64_ge" $f64_ge) - (export "f32_min" $f32_min) (export "f64_min" $f64_min) - (export "f32_max" $f32_max) (export "f64_max" $f64_max) + (export "f32_add" $f32_add) (export "f64_add" $f64_add) + (export "f32_sub" $f32_sub) (export "f64_sub" $f64_sub) + (export "f32_mul" $f32_mul) (export "f64_mul" $f64_mul) + (export "f32_div" $f32_div) (export "f64_div" $f64_div) + (export "f32_copysign" $f32_copysign) (export "f64_copysign" $f64_copysign) + (export "f32_eq" $f32_eq) (export "f64_eq" $f64_eq) + (export "f32_ne" $f32_ne) (export "f64_ne" $f64_ne) + (export "f32_lt" $f32_lt) (export "f64_lt" $f64_lt) + (export "f32_le" $f32_le) (export "f64_le" $f64_le) + (export "f32_gt" $f32_gt) (export "f64_gt" $f64_gt) + (export "f32_ge" $f32_ge) (export "f64_ge" $f64_ge) + (export "f32_min" $f32_min) (export "f64_min" $f64_min) + (export "f32_max" $f32_max) (export "f64_max" $f64_max) (export "f32_store" $f32_store) (export "f64_store" $f64_store) (export "f32_call" $f32_call) (export "f64_call" $f64_call) ) diff --git a/ml-proto/test/memory_trap.wast b/ml-proto/test/memory_trap.wast index d8e020b631..02d58c966f 100644 --- a/ml-proto/test/memory_trap.wast +++ b/ml-proto/test/memory_trap.wast @@ -3,7 +3,7 @@ (export "store" $store) (func $store (param $i i32) (param $v i32) (result i32) (i32.store (i32.add (memory_size) (get_local $i)) (get_local $v))) - + (export "load" $load) (func $load (param $i i32) (result i32) (i32.load (i32.add (memory_size) (get_local $i)))) diff --git a/ml-proto/test/resizing.wast b/ml-proto/test/resizing.wast index 52cf9f17ee..aee1135e1f 100644 --- a/ml-proto/test/resizing.wast +++ b/ml-proto/test/resizing.wast @@ -1,6 +1,6 @@ (module (memory 0) - + (export "round_up_to_page" $round_up_to_page) (func $round_up_to_page (param i32) (result i32) (i32.and (i32.add (get_local 0) (i32.const 0xFFFF)) diff --git a/ml-proto/test/unreachable.wast b/ml-proto/test/unreachable.wast index 89dcfb160f..b16113670e 100644 --- a/ml-proto/test/unreachable.wast +++ b/ml-proto/test/unreachable.wast @@ -7,7 +7,7 @@ (func $if (param i32) (result f32) (if_else (get_local 0) (unreachable) (f32.const 0))) - (func $block + (func $block (block (i32.const 1) (unreachable) (i32.const 2))) (func $return_i64 (result i64)