diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-02 17:18:49 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-02 17:18:49 -0800 |
commit | 668a596590c4993e763c2a448c7727171d421bab (patch) | |
tree | 9dd623fc7abb89049c80659f1b45b99774c603df /src/analyzer.js | |
parent | 62000632bb844fd0b6473ad0387ce3b82bc62909 (diff) |
misc compiler optimizations, now takes half as long to compile freetype
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 57ddc74c..dfb11e90 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -103,7 +103,7 @@ function analyzer(data) { // to look at the underlying type - it was not defined explicitly // anywhere else. var nonPointing = removeAllPointing(type); - var check = new RegExp(/^\[(\d+)\ x\ (.*)\]$/g).exec(nonPointing); + var check = /^\[(\d+)\ x\ (.*)\]$/.exec(nonPointing); if (check && !Types.types[nonPointing]) { var num = parseInt(check[1]); num = Math.max(num, 1); // [0 x something] is used not for allocations and such of course, but @@ -506,7 +506,7 @@ function analyzer(data) { } var ret = get(); if (ret && ret[0] === '[') { - var check = new RegExp(/^\[(\d+)\ x\ (.*)\]\*$/g).exec(ret); + var check = /^\[(\d+)\ x\ (.*)\]\*$/.exec(ret); assert(check); ret = check[2] + '*'; } |