Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (24 sloc) 1.196 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
f2ce0c4 [doc] qmljsimp: adding, removing, updating comments
Valentin Gatien-Baron authored
18
fccc685 Initial open-source release
MLstate authored
19 (**
20 Performs a few simplifications on the ast
f2ce0c4 [doc] qmljsimp: adding, removing, updating comments
Valentin Gatien-Baron authored
21 Right now, removes dummy bindings [x = x]
fccc685 Initial open-source release
MLstate authored
22 and the part of sequences that don't do side effects
23 [(x = 1, y = y, y)] becomes [(x = 1, y)]
f2ce0c4 [doc] qmljsimp: adding, removing, updating comments
Valentin Gatien-Baron authored
24 does some constant folding etc.
25
26 @param use_shortcut_assignment when set, shortens a = a + 1 in a++ for instance
27 (local inlining does not deal with +=, ++, etc.)
fccc685 Initial open-source release
MLstate authored
28 *)
29
30 val clean_stm : use_shortcut_assignment:bool -> JsAst.statement -> JsAst.code
31 val clean : use_shortcut_assignment:bool -> JsAst.code -> JsAst.code
Something went wrong with that request. Please try again.