mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
[INFER] Avoid unnecessary cast, bug 642319.
This commit is contained in:
parent
b875c13ba0
commit
33969c35e9
10
js/src/jit-test/tests/basic/bug642319.js
Normal file
10
js/src/jit-test/tests/basic/bug642319.js
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
test();
|
||||
function test() {
|
||||
function f() {
|
||||
function test( ) { summary( summary, test, false ); }
|
||||
}
|
||||
f.__proto__ = this;
|
||||
}
|
||||
gc();
|
||||
test();
|
@ -3228,7 +3228,6 @@ AnalyzeBytecode(JSContext *cx, AnalyzeState &state, JSScript *script, uint32 off
|
||||
case JSOP_DEFLOCALFUN_FC: {
|
||||
unsigned off = (op == JSOP_DEFLOCALFUN || op == JSOP_DEFLOCALFUN_FC) ? SLOTNO_LEN : 0;
|
||||
JSObject *obj = GetScriptObject(cx, script, pc, off);
|
||||
TypeFunction *function = obj->getType()->asFunction();
|
||||
|
||||
TypeSet *res = NULL;
|
||||
if (op == JSOP_LAMBDA || op == JSOP_LAMBDA_FC)
|
||||
@ -3238,7 +3237,7 @@ AnalyzeBytecode(JSContext *cx, AnalyzeState &state, JSScript *script, uint32 off
|
||||
|
||||
if (res) {
|
||||
if (script->compileAndGo)
|
||||
res->addType(cx, (jstype) function);
|
||||
res->addType(cx, (jstype) obj->getType());
|
||||
else
|
||||
res->addType(cx, TYPE_UNKNOWN);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user