mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Bug 1350171
- Try to transition IC mode before attaching AddSlot stubs. r=h4writer
This commit is contained in:
parent
7cdbb80ceb
commit
268ae3bf52
8
js/src/jit-test/tests/cacheir/bug1350171.js
Normal file
8
js/src/jit-test/tests/cacheir/bug1350171.js
Normal file
@ -0,0 +1,8 @@
|
||||
function test() {
|
||||
var o = {};
|
||||
o.watch('x', test);
|
||||
try {
|
||||
o.x = 3;
|
||||
} catch(e) {}
|
||||
}
|
||||
test();
|
@ -1578,7 +1578,15 @@ DoSetPropFallback(JSContext* cx, BaselineFrame* frame, ICSetProp_Fallback* stub_
|
||||
if (stub.invalid())
|
||||
return true;
|
||||
|
||||
if (!attached && stub->state().canAttachStub()) {
|
||||
if (attached)
|
||||
return true;
|
||||
|
||||
// The SetProperty call might have entered this IC recursively, so try
|
||||
// to transition.
|
||||
if (stub->state().maybeTransition())
|
||||
stub->discardStubs(cx);
|
||||
|
||||
if (stub->state().canAttachStub()) {
|
||||
RootedValue idVal(cx, StringValue(name));
|
||||
SetPropIRGenerator gen(cx, script, pc, CacheKind::SetProp, stub->state().mode(),
|
||||
&isTemporarilyUnoptimizable, lhs, idVal, rhs);
|
||||
|
@ -248,7 +248,15 @@ IonSetPropertyIC::update(JSContext* cx, HandleScript outerScript, IonSetProperty
|
||||
}
|
||||
}
|
||||
|
||||
if (!attached && ic->state().canAttachStub()) {
|
||||
if (attached)
|
||||
return true;
|
||||
|
||||
// The SetProperty call might have entered this IC recursively, so try
|
||||
// to transition.
|
||||
if (ic->state().maybeTransition())
|
||||
ic->discardStubs(cx->zone());
|
||||
|
||||
if (ic->state().canAttachStub()) {
|
||||
RootedValue objv(cx, ObjectValue(*obj));
|
||||
RootedScript script(cx, ic->script());
|
||||
jsbytecode* pc = ic->pc();
|
||||
|
Loading…
Reference in New Issue
Block a user