Commit dbe33c14 authored by paul.lind's avatar paul.lind Committed by Commit bot

MIPS: Fix for instanceof-proxies failure.

Invalidate the instanceof cache in proxy-case of InstanceOfStub
after the changes in https://codereview.chromium.org/1492243003.

This didn't have a test case until https://codereview.chromium.org/1518773003

TEST=mjsunit/es6/instanceof-proxies.js
BUG=

Review URL: https://codereview.chromium.org/1519303002

Cr-Commit-Position: refs/heads/master@{#32821}
parent c21dd8e0
......@@ -1529,6 +1529,9 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Proxy-case: Call the %HasInPrototypeChain runtime function.
__ bind(&proxy_case);
__ Push(object, function_prototype);
// Invalidate the instanceof cache.
DCHECK(Smi::FromInt(0) == 0);
__ StoreRoot(zero_reg, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
// Slow-case: Call the %InstanceOf runtime function.
......
......@@ -1531,6 +1531,9 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
// Proxy-case: Call the %HasInPrototypeChain runtime function.
__ bind(&proxy_case);
__ Push(object, function_prototype);
// Invalidate the instanceof cache.
DCHECK(Smi::FromInt(0) == 0);
__ StoreRoot(zero_reg, Heap::kInstanceofCacheFunctionRootIndex);
__ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
// Slow-case: Call the %InstanceOf runtime function.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment