On Tuesday, February 10, 2015 at 7:08:03 PM UTC+1, Jan de Mooij wrote:
> On Tue, Feb 10, 2015 at 6:46 PM, <obaste...@gmail.com> wrote:
> 
> > Is there any reason why ION marks the below first function to not_compile,
> > while it's not a problem for the second ?
> >
> > 1 - function x() { var arr = []; arr[0] = 1; ...some_other_things...  }
> >
> > 2 - function x() { var arr = new Array(); arr[0] = 1; .......... }
> >
> >
> > 'array(opcode 190) is not typed?'
> >
> 
> Can you be more specific? Which Firefox/SM version did you use? Where did
> you see the "is not typed" message? What do you mean by "not_compile"? Ion
> should handle those two functions without any problems, as far as I know.
> 
> 
> > The current 'op-code' interpreter implementation is 'switch-case'. Most
> > compilers will be converting that into a binary tree (which is fast enough,
> > but the worst case is ~8 (~300 op codes)).
> >
> 
> 
> > Although it's a big change, is there any plan for updating that part to a
> > jump table ? I didn't track yet but would you expect a significant
> > performance gain from there.
> >
> 
> C++ compilers are smart enough to emit a jump table for switch statements
> like this one. On some platforms we do something even better (indirect
> goto), see bug 910782 [0] and the comment at the start of Interpret in
> js/src/vm/Interpreter.cpp.
> 
> Jan
> 
> [0] https://bugzilla.mozilla.org/show_bug.cgi?id=910782


Gecko 340 is the version. It's good to know the '[]' vs 'new Array' difference 
wasn't the intention. I don't have the exact message now (the one from 
IonSpew). and seems it's not the general case. If I narrow down the issue, will 
update the post with details. 


Thanks for the answer on interpreter, seems that update should take care of it.
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to