aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-01 14:04:37 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-01 14:04:37 -0800
commit40ba40ebb65f14bf51a229f4b799164f1c24caaf (patch)
treecbc30fe4d988fd0bcdfedd3bb18a2fd42331f62c /src/runtime.js
parent6b70b676ba4bdf317c2391e90c82d837b18e3849 (diff)
code cleanup, do not do heavy operations in parameters to print or assert
Diffstat (limited to 'src/runtime.js')
-rw-r--r--src/runtime.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/runtime.js b/src/runtime.js
index dcb10de9..255b977e 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -67,7 +67,6 @@ RuntimeGenerator = {
function unInline(name_, params) {
var src = '(function ' + name_ + '(' + params + ') { var ret = ' + RuntimeGenerator[name_].apply(null, params) + '; return ret; })';
- //print('src: ' + src);
return eval(src);
}
@@ -137,8 +136,7 @@ Runtime = {
size = Types.types[field].flatSize;
alignSize = Types.types[field].alignSize;
} else {
- dprint('Unclear type in struct: ' + field + ', in ' + type.name_ + ' :: ' + dump(Types.types[type.name_]));
- assert(0);
+ throw 'Unclear type in struct: ' + field + ', in ' + type.name_ + ' :: ' + dump(Types.types[type.name_]);
}
alignSize = type.packed ? 1 : Math.min(alignSize, QUANTUM_SIZE);
type.alignSize = Math.max(type.alignSize, alignSize);