Maybe it is returning Method_Skipped because your test is too small or your
script isn't "hot" yet. Ion will compile functions, for instance, when they
iterate *usesBeforeCompile* times (which is currently 1000). You could use
eager mode (--ion-eager --baseline-eager), but that doesn't help if your
test case is too small. So, to get Ion to compile your script, make sure
that it has a loop that iterates at least 1000 times, like the one below.
for (var i = 0; i < 1000; i ++) {
var x = "hoge" + s + "fuga";
}
In this case, *CanEnter* and *CanEnterAtBranch* will keep returning
Method_Skipped a lot of times, but when the script gets near 1000
iterations, it will compile your test case and return Method_Compiled.
On Wed, Apr 3, 2013 at 9:41 AM, 井関正也 <[email protected]> wrote:
> 2013年4月1日月曜日 23時32分28秒 UTC+9 井関正也:
> > I'm interested in IonMonkey.
> >
> > I read some code in js/src/ion.But I can't understand how IonMonkey
> analyze the code.
> >
> > When type javascript code in console or commnad line , What function
> call firstly?
>
> Thanks Pericles.
>
> I found ion::CanEnter and ion::Cannon near js/src/jsinterp.cpp:314.
> When I type
> * var x = "hoge" + s + "fuga";*
> ion::CanEnter return Method_Skipped. (s is pre-declared)
>
> I trace ion::CanEnter.
>
> *MethodStatus
> *ion::CanEnter(JSContext *cx, JSScript *script, AbstractFramePtr fp, bool
> isConstructing)
> ↓
> *template <typename CompileContext>
> *static MethodStatus
> *Compile(JSContext *cx, HandleScript script, HandleFunction fun,
> jsbytecode *osrPc, bool constructing,
> * CompileContext &compileContext)
> ↓
> *if (script->getUseCount() < js_IonOptions.usesBeforeCompile){
> * return Method_Skipped;
>
> ion::CanEnter have to return Method_Compiled to call *OptimizeMIR*.
> Why ion::CanEnter return Method_Compiled?
> I can't execute ion::Cannon from Shell?
>
> Please tell me.
> _______________________________________________
> dev-tech-js-engine-internals mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals
>
--
Pericles Alves
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals