Add imacros to support conversion of arbitrary JSObjects (456511, r=gal).

This commit is contained in:
Brendan
2008-11-12 16:55:45 -08:00
parent 230ff5430e
commit 7b8d11c0f0
21 changed files with 827 additions and 215 deletions

View File

@@ -156,9 +156,18 @@ const char *const js_common_atom_names[] = {
js_current_str, /* currentAtom */
#endif
};
JS_STATIC_ASSERT(JS_ARRAY_LENGTH(js_common_atom_names) * sizeof(JSAtom *) ==
LAZY_ATOM_OFFSET_START - ATOM_OFFSET_START);
/*
* Interpreter macros called by the trace recorder assume common atom indexes
* fit in one byte of immediate operand.
*/
JS_STATIC_ASSERT(JS_ARRAY_LENGTH(js_common_atom_names) < 256);
const size_t js_common_atom_count = JS_ARRAY_LENGTH(js_common_atom_names);
const char js_anonymous_str[] = "anonymous";
const char js_apply_str[] = "apply";
const char js_arguments_str[] = "arguments";