diff --git a/interp.js b/interp.js index b634d5c041e31171cb6caf5325f5b702b85c224c..7fad091343961a3e7ebc88d9a1ca2a71f19630fb 100644 --- a/interp.js +++ b/interp.js @@ -408,7 +408,7 @@ function run_program(program) { //----------------smart constructors--------------- function trm_number(line, n) { - return { tag: "trm_cst", cst: { tag: "cst_number", number: n }, line: line }; + return { tag: "trm_cst", cst: { tag: "cst_number", number: n, line: line }, line: line }; } function trm_let(line, name, t1, t2) { @@ -429,14 +429,15 @@ var trm1 = trm_let(1, "x", { line: 1, tag: "trm_alloc" }, trm_seq(1, trm_seq(2, {line: 2, tag: "trm_set", loc: trm_var(2, "x"), field: "foo", arg: trm_number(2, 12)}, {line:3, tag: "trm_set", loc: trm_var(3, "x"), field: "bar", - arg: {line:3, tag:"trm_get", loc: trm_var("x"), field: "foo"}}), + arg: {line:3, tag:"trm_get", loc: trm_var(3, "x"), field: "foo"}}), {line:4, tag: "trm_set", loc: trm_var(4, "x"), field: "cycle", arg: trm_var(4, "x")})); var program = [trm1]; -run_program(program); +run_program(program); +/**/ //----------------reporting--------------- diff --git a/navig.html b/navig.html index 0c49f10c9ad29b51438db10babc36d6b40bd9002..e9b4c1df2bdac0a538a255584abecfec8b438ed6 100644 --- a/navig.html +++ b/navig.html @@ -6,9 +6,21 @@ <meta charset="utf-8"> <title>JavaScript Reference Tracer</title> + + +<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> + <link rel=stylesheet href="../../interp/tracer/codemirror/lib/codemirror.css"> <script src="../../interp/tracer/codemirror/lib/codemirror.js"></script> -<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> + + +<!-- styles needed by jScrollPane - include in your own sites --> +<link type="text/css" href="jquery_scroll/jquery.jscrollpane.css" rel="stylesheet" media="all" /> +<!-- the mousewheel plugin --> +<script type="text/javascript" src="jquery_scroll/jquery.mousewheel.js"></script> +<!-- the jScrollPane script --> +<script type="text/javascript" src="jquery_scroll/jquery.jscrollpane.min.js"></script> + <!-- <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> @@ -18,12 +30,6 @@ <link rel="stylesheet" href="jquery-ui-1.11.4.custom/jquery-ui.css"> <script src="jquery-ui-1.11.4.custom/jquery-ui.js"></script> -<!-- styles needed by jScrollPane - include in your own sites --> -<link type="text/css" href="jquery_scroll/jquery.jscrollpane.css" rel="stylesheet" media="all" /> -<!-- the mousewheel plugin --> -<script type="text/javascript" src="jquery_scroll/jquery.mousewheel.js"></script> -<!-- the jScrollPane script --> -<script type="text/javascript" src="jquery_scroll/jquery.jscrollpane.min.js"></script> <script src="sparray.js"></script> @@ -31,6 +37,7 @@ <script src="interp.js"></script> + <style> .source_div { border-top: 1px solid black; @@ -142,12 +149,13 @@ Reach condition: <script src="navig.js"></script> +<!-- <script language="javascript"> $(function() { $('.scroll-pane').jScrollPane(); }); </script> - +--> <div style="font-size:0.8em">Instructions: from console, the variable "h" denotes the current heap.</div> diff --git a/navig.js b/navig.js index 5e99fa3fabad21c9be6d8ae95ab85ff406272efe..a2502d845a46d59519bd24d02642b34088c06b9d 100644 --- a/navig.js +++ b/navig.js @@ -3,7 +3,6 @@ var handlers = []; - (function(check_pred){ tracer_items = datalog;