Revert "DEBUG HACKS, DO NOT MERGE"

This reverts commit e95d32e821.
This commit is contained in:
Folkert 2022-02-16 15:08:10 +01:00
parent 95bfc3b342
commit ae998e2504
7 changed files with 2 additions and 30 deletions

3
Cargo.lock generated
View file

@ -3584,7 +3584,6 @@ dependencies = [
"roc_unify",
"tempfile",
"ven_pretty",
"wasm-bindgen",
]
[[package]]
@ -3699,7 +3698,6 @@ dependencies = [
"roc_reporting",
"roc_target",
"roc_types",
"wasm-bindgen",
]
[[package]]
@ -3765,7 +3763,6 @@ dependencies = [
"roc_types",
"roc_unify",
"tempfile",
"wasm-bindgen",
]
[[package]]

View file

@ -26,7 +26,6 @@ bumpalo = { version = "3.8.0", features = ["collections"] }
parking_lot = { version = "0.11.2" }
crossbeam = "0.8.1"
num_cpus = "1.13.0"
wasm-bindgen = "0.2.79"
[dev-dependencies]
tempfile = "3.2.0"

View file

@ -755,7 +755,6 @@ enum BuildTask<'a> {
},
}
#[derive(Debug)]
enum WorkerMsg {
Shutdown,
TaskAdded,
@ -1404,8 +1403,7 @@ fn worker_task_step<'a>(
src_dir: &Path,
target_info: TargetInfo,
) -> Result<ControlFlow<(), ()>, LoadingProblem<'a>> {
let recv = worker_msg_rx.try_recv();
match recv {
match worker_msg_rx.try_recv() {
Ok(msg) => {
match msg {
WorkerMsg::Shutdown => {

View file

@ -14,7 +14,6 @@ roc_can = { path = "../can" }
roc_unify = { path = "../unify" }
arrayvec = "0.7.2"
bumpalo = { version = "3.8.0", features = ["collections"] }
wasm-bindgen = "0.2.79"
[dev-dependencies]
roc_load = { path = "../load" }

View file

@ -7,7 +7,6 @@ version = "0.1.0"
[dependencies]
bumpalo = {version = "3.8.0", features = ["collections"]}
wasm-bindgen = "0.2.79"
roc_builtins = {path = "../compiler/builtins"}
roc_can = {path = "../compiler/can"}

View file

@ -8,22 +8,9 @@ use roc_load::file::{LoadingProblem, MonomorphizedModule};
use roc_parse::ast::Expr;
use roc_region::all::LineInfo;
use roc_target::TargetInfo;
use wasm_bindgen::prelude::wasm_bindgen;
use crate::eval::ToAstProblem;
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(js_namespace = console)]
fn log(s: &str);
}
// In-browser debugging
#[allow(unused_macros)]
macro_rules! console_log {
($($t:tt)*) => (log(&format_args!($($t)*).to_string()))
}
pub enum ReplOutput {
Problems(Vec<String>),
NoProblems { expr: String, expr_type: String },
@ -58,8 +45,6 @@ pub fn compile_to_mono<'a>(
src: &str,
target_info: TargetInfo,
) -> Result<MonomorphizedModule<'a>, Vec<String>> {
console_log!("compile_to_mono");
use roc_reporting::report::{
can_problem, mono_problem, type_problem, RocDocAllocator, DEFAULT_PALETTE,
};
@ -71,9 +56,6 @@ pub fn compile_to_mono<'a>(
let module_src = arena.alloc(promote_expr_to_module(src));
let exposed_types = MutMap::default();
console_log!("before load_and_monomorphize_from_str");
let loaded = roc_load::file::load_and_monomorphize_from_str(
arena,
filename,

View file

@ -31,7 +31,7 @@ extern "C" {
fn js_get_result_and_memory(buffer_alloc_addr: *mut u8) -> usize;
#[wasm_bindgen(js_namespace = console)]
pub fn log(s: &str);
fn log(s: &str);
}
// In-browser debugging
@ -158,10 +158,8 @@ impl<'a> ReplApp<'a> for WasmReplApp<'a> {
#[wasm_bindgen]
pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
console_log!("entrypoint_from_js");
let arena = &Bump::new();
let pre_linked_binary: &'static [u8] = include_bytes!("../data/pre_linked_binary.o");
console_log!("pre_linked_binary {}", pre_linked_binary.len());
// Compile the app
let target_info = TargetInfo::default_wasm32();