From 29de05c1511b3c825d9a45888a65f4cca48b142c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 15 Oct 2013 11:07:09 -0700 Subject: optimize parsing of X = Y --- src/compiler.js | 1 + src/intertyper.js | 95 ++++++++++++++++++++++++++++++++----------------------- 2 files changed, 57 insertions(+), 39 deletions(-) diff --git a/src/compiler.js b/src/compiler.js index d490f454..ac1b0ec8 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -318,4 +318,5 @@ if (ll_file) { //var M = keys(tokenCacheMisses).map(function(m) { return [m, misses[m]] }).sort(function(a, b) { return a[1] - b[1] }); //printErr(dump(M.slice(M.length-10))); +//printErr('hits: ' + hits); diff --git a/src/intertyper.js b/src/intertyper.js index beafda28..193726d1 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -6,12 +6,12 @@ var fastPaths = 0, slowPaths = 0; var tokenCache = {}; -['=', 'i32', 'label', ';', '4', '0', '1', '2', '255', 'align', 'i8*', 'i8', 'i16', 'getelementptr', 'inbounds', 'unnamed_addr', 'x', 'load', 'preds', 'br', 'i32*', 'i1', 'store', '