-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdriver.html
173 lines (134 loc) · 7.08 KB
/
driver.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Interactive Debugger for the JavaScript Specification</title>
<script src="js/libraries/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="js/libraries/bootstrap/css/bootstrap.min.css">
<script src="js/libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
<link rel=stylesheet href="js/libraries/codemirror/codemirror.css">
<script src="js/libraries/codemirror/codemirror.js"></script>
<script src="js/libraries/codemirror/panel.js"></script>
<script src="js/codemirror-tabs.js"></script>
<script src="js/libraries/codemirror/javascript.js"></script>
<script src="js/libraries/codemirror/mllike.js"></script>
<!-- styles needed by jScrollPane - include in your own sites -->
<link type="text/css" href="js/jquery_scroll/jquery.jscrollpane.css" rel="stylesheet" media="all" />
<!-- the mousewheel plugin -->
<script type="text/javascript" src="js/jquery_scroll/jquery.mousewheel.js"></script>
<!-- the jScrollPane script -->
<script type="text/javascript" src="js/jquery_scroll/jquery.jscrollpane.min.js"></script>
<link rel="stylesheet" href="js/jquery-ui-1.11.4.custom/jquery-ui.css">
<script src="js/jquery-ui-1.11.4.custom/jquery-ui.js"></script>
<script src="node_modules/esprima/esprima.js"></script>
<script type = "text/javascript" src="js/esprima-to-ast.js"></script>
<link type="text/css" href="driver.css" rel="stylesheet" media="all" />
</head>
<body>
<nav class="navbar navbar-light bg-light">
<form class="form-inline">
<div class="nav-item dropright">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Menu</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown" >
Load example :
<select id='select_source_code'><option disabled selected>Example Programs</option></select>
<div class="dropdown-divider"></div>
Load file :
<input type='file' accept='.js' id='select_file' />
<div class="dropdown-divider"></div>
<label><input type='checkbox' id='use_test262_harness' /> Use test262 harness (not Chrome from file://)</label>
</div>
</div>
</div>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_run'>RUN</button>
<span style="width:0.5em"> </span>
<div class="input-group input-group-sm mb-0">
<div class="input-group-prepend">
<span class="input-group-text">Step:</span>
</div>
<input type="text" id='navigation_step' style="width:5em" value="0" class="form-control"/>
<div class="input-group-append" style="width:7em">
<span class="input-group-text">/ <span id="navigation_total"></span> (<span id="event_type"></span>)</span>
</div>
</div>
<span style="width:0.7em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_goto_begin'>Begin</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_goto_end'>End</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_backward'>Backward</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_forward'>Forward</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_previous'>Previous</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_next'>Next</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_finish'>Finish</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_srcprevious'>Source Previous</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_srcnext'>Source Next</button>
<span style="width:0.5em"> </span>
<button class="btn btn-primary btn-sm" type="button" id='button_cursor'>Source Cursor</button>
<span style="width:0.5em"> </span>
<div class="input-group input-group-sm mb-0">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Conditions:</span>
</div>
<input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" id='reach_condition'>
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id='button_test_condition'>Test</button> <span id="reach_output"></span><span style="width:0.5em"> </span>
<font style="size: 50%">
Using: S('x'), S_raw('x'), S_line(), I('x'), I_line().
</font>
</div>
</div>
<div id="action_output"></div>
</form>
</nav>
<div class="container-fluid">
<div class="source_div row" style="" id='main_table'>
<div id='source_code' class="source col-sm-5"></div>
<textarea id='interpreter_code' class="source col-sm-auto"></textarea>
</div>
<div class="source_div row" id='main_table2'>
<div id='disp_env_pane' class="scroll-pane col-sm-3">
<div id='disp_env'>ctx here</div>
</div>
<div class="embed-responsive embed-responsive-4by3 col-sm-6">
<iframe class="embed-responsive-item" src="https://tc39.github.io/ecma262/#sec-intro" id='frame_spec' ></iframe>
</div>
<div class='col-sm-3'>
<div id='disp_ctx'></div>
<div id='disp_infos'></div>
</div>
</div>
<script src="js/tools.js"></script>
<script src="jsref/displayed_sources.js"></script>
<script src="jsref/lineof.js"></script>
<script src="jsref/assembly.js"></script>
<script src="jsref/JsInterpreter.url.js"></script>
<script src="js/navig-driver.js"></script>
<!---
<script language="javascript">
$(function() {
$('.scroll-pane').jScrollPane();
});
</script>
--->
<!--
<div style="font-size:0.8em">Instructions: type 'S' for step (next function call), 'N' for next (next call at same level), 'B' for backstep (symmetric to step), 'P' for previous (symmetric to next), 'F' for finish (next call at upper level), 'R' for restart.</div>
<div style="font-size:0.8em">Examples of conditions:
<ul>
<li><pre style = "display:inline">X.type === "fun" && (X.v1, true)</pre> (we are at the beginning of a function and v1 is defined in the local interpreter context),</li>
<li><pre style = "display:inline">X.line === 32 && X.t.tag === "trm_set" && X.t.field === "bar"</pre> (we are at line 32 and we are setting the field “bar” of the current location),</li>
<li><pre style = "display:inline">y.foo === 12</pre> (the program variable “y” points to an object whose field “foo” is equal to 12),</li>
<li><pre style = "display:inline">X.heap[0].bar === 12</pre> (the first cell of the heap has a field “bar” defined equal to 12).</li>
</ul></div>
-->
</body>
</html>