aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-07 18:24:07 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-07 18:24:07 -0800
commit6d42ca16f27c24ce2733eb8045498564c1ba790b (patch)
treeb170a0ab380a35fd5e0f13017d8b2d4dca9d9611
parentf7e59e31bf9652293c9c96e90866e73236a2ae51 (diff)
parent85b34c5c91a6448a191709c2071125dfbc9716d9 (diff)
Merge branch 'ldc' of github.com:gagern/emscripten into gagern-ldc2
-rw-r--r--AUTHORS1
-rw-r--r--src/modules.js1
-rw-r--r--src/parseTools.js3
3 files changed, 4 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 0741022f..0eb8f7df 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -53,4 +53,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Vladimir Vukicevic <vladimir@pobox.com> (copyright owned by Mozilla Foundation)
* Lorant Pinter <lorant.pinter@prezi.com>
* Tobias Doerffel <tobias.doerffel@gmail.com>
+* Martin von Gagern <martin@von-gagern.net>
diff --git a/src/modules.js b/src/modules.js
index afdbc21e..797d4d83 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -90,6 +90,7 @@ var Debugging = {
lines[i] = ';';
continue;
}
+ if (line[0] == '!') skipLine = true;
lines[i] = skipLine ? ';' : line;
}
diff --git a/src/parseTools.js b/src/parseTools.js
index d01f32f2..48274cd5 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -172,6 +172,7 @@ function getBits(type) {
}
if (isStructType(type)) {
var typeData = Types.types[type];
+ if (typeData === undefined) return 0;
return typeData.flatSize*8;
}
return 0;
@@ -583,7 +584,7 @@ function cleanOutTokens(filterOut, tokens, indexes) {
if (typeof indexes !== 'object') indexes = [indexes];
for (var i = indexes.length-1; i >=0; i--) {
var index = indexes[i];
- while (tokens[index].text in filterOut) {
+ while (index < tokens.length && tokens[index].text in filterOut) {
tokens.splice(index, 1);
}
}