mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Match TypeInferenceOracle assertions for getCallTarget (Bug 732864, r=dvander)
This commit is contained in:
parent
26f2347830
commit
6eb139944a
@ -321,8 +321,7 @@ TypeSet *
|
||||
TypeInferenceOracle::getCallTarget(JSScript *caller, uint32 argc, jsbytecode *pc)
|
||||
{
|
||||
JS_ASSERT(caller == this->script);
|
||||
JS_ASSERT(JSOp(*pc) == JSOP_CALL || JSOp(*pc) == JSOP_NEW ||
|
||||
JSOp(*pc) == JSOP_FUNCALL || JSOp(*pc) == JSOP_FUNAPPLY);
|
||||
JS_ASSERT(js_CodeSpec[*pc].format & JOF_INVOKE && JSOp(*pc) != JSOP_EVAL);
|
||||
|
||||
ScriptAnalysis *analysis = script->analysis();
|
||||
return analysis->poppedTypes(pc, argc + 1);
|
||||
|
@ -153,7 +153,8 @@ class TypeOracle
|
||||
|
||||
/* |pc| must be a |JSOP_CALL|. */
|
||||
virtual types::TypeSet *getCallTarget(JSScript *caller, uint32 argc, jsbytecode *pc) {
|
||||
JS_ASSERT(JSOp(*pc) == JSOP_CALL);
|
||||
// Same assertion as TypeInferenceOracle::getCallTarget.
|
||||
JS_ASSERT(js_CodeSpec[*pc].format & JOF_INVOKE && JSOp(*pc) != JSOP_EVAL);
|
||||
return NULL;
|
||||
}
|
||||
virtual types::TypeSet *getCallArg(JSScript *script, uint32 argc, uint32 arg, jsbytecode *pc) {
|
||||
|
22
js/src/jit-test/tests/ion/bug732864.js
Normal file
22
js/src/jit-test/tests/ion/bug732864.js
Normal file
@ -0,0 +1,22 @@
|
||||
function BigInteger() { }
|
||||
function bnpCopyTo(g) {
|
||||
var this_array = g.array;
|
||||
for (var i = g.t; i >= 0; --i)
|
||||
;
|
||||
g.t = g.t;
|
||||
}
|
||||
function bnpFromString(n) {
|
||||
n.t = 0;
|
||||
var i = 100;
|
||||
while (--i >= 0) {
|
||||
n.t++;
|
||||
}
|
||||
}
|
||||
n = new BigInteger();
|
||||
n.array = new Array();
|
||||
bnpFromString(n);
|
||||
|
||||
g = new BigInteger();
|
||||
g.array = new Array();
|
||||
g.t = 100;
|
||||
bnpCopyTo(g);
|
Loading…
Reference in New Issue
Block a user