mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 914132 part 4 - Fold |typeof object| if possible. r=bhackett
This commit is contained in:
parent
3b7924fcb9
commit
90728867b5
@ -1888,6 +1888,14 @@ MTypeOf::foldsTo(bool useValueNumbers)
|
||||
case MIRType_Boolean:
|
||||
type = JSTYPE_BOOLEAN;
|
||||
break;
|
||||
case MIRType_Object:
|
||||
if (!inputMaybeCallableOrEmulatesUndefined()) {
|
||||
// Object is not callable and does not emulate undefined, so it's
|
||||
// safe to fold to "object".
|
||||
type = JSTYPE_OBJECT;
|
||||
break;
|
||||
}
|
||||
// FALL THROUGH
|
||||
default:
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user