However, when I try to run jsbench/twitter/chrome, chrome-win, safari, the error 'eval:1:1 ReferenceError: *** is not defined' is occurred.
(1) I wonder that the JS_EncodeScript() is able to affect program even I didn't use serialized script at all.
Additionally, when I attempt to use serialized JSScript instead of compilation (frontend::CompileLazyFunction) in second run, four of jsbench (jsbench/facebook, google/chrome-win, safari) make similar error. (It's okay in first run.)
In these instrumented benchmarks, I basically used the evaluate function of
the JS shell to save the bytecode into a CacheEntry, which is an opaque
representation of associative container entry.
> I'm using latest version of spidermonkey from mozila-central and I use disable-ion option for configuration.
I am not sure why you would want to use --disable-ion ?
> (1) I wonder that the JS_EncodeScript() is able to affect program even I didn't use serialized script at all.
Except for oom, it should not affect the program. The only problem is if
the lookup rules are not the same.
Also note, that JSBench is generated by instrumenting the DOM, and caching
the results of the evaluation. These state are not reentrant, so doing the
same evaluation twice would not work, unless you properly reset the content
and the counters.
> (3) Which member of JSScript makes 'ReferenceError'? EnclosingStaticScope or SourceObject? I'm very confused...
ReferenceError are when a JS variable is not bound. So this is unlikely to
be the source object, but might be related to the fact that the enclosing
scope chained is not properly restored.