Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 1519303002: MIPS: Fix for instanceof-proxies failure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: store zero_reg, save an instruction. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 FieldMemOperand(object, HeapObject::kMapOffset)); // In delay slot. 1522 FieldMemOperand(object, HeapObject::kMapOffset)); // In delay slot.
1523 __ LoadRoot(result, Heap::kFalseValueRootIndex); 1523 __ LoadRoot(result, Heap::kFalseValueRootIndex);
1524 __ bind(&done); 1524 __ bind(&done);
1525 __ Ret(USE_DELAY_SLOT); 1525 __ Ret(USE_DELAY_SLOT);
1526 __ StoreRoot(result, 1526 __ StoreRoot(result,
1527 Heap::kInstanceofCacheAnswerRootIndex); // In delay slot. 1527 Heap::kInstanceofCacheAnswerRootIndex); // In delay slot.
1528 1528
1529 // Proxy-case: Call the %HasInPrototypeChain runtime function. 1529 // Proxy-case: Call the %HasInPrototypeChain runtime function.
1530 __ bind(&proxy_case); 1530 __ bind(&proxy_case);
1531 __ Push(object, function_prototype); 1531 __ Push(object, function_prototype);
1532 // Invalidate the instanceof cache.
1533 DCHECK(Smi::FromInt(0) == 0);
1534 __ StoreRoot(zero_reg, Heap::kInstanceofCacheFunctionRootIndex);
1532 __ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1); 1535 __ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1);
1533 1536
1534 // Slow-case: Call the %InstanceOf runtime function. 1537 // Slow-case: Call the %InstanceOf runtime function.
1535 __ bind(&slow_case); 1538 __ bind(&slow_case);
1536 __ Push(object, function); 1539 __ Push(object, function);
1537 __ TailCallRuntime(Runtime::kInstanceOf, 2, 1); 1540 __ TailCallRuntime(Runtime::kInstanceOf, 2, 1);
1538 } 1541 }
1539 1542
1540 1543
1541 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1544 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
(...skipping 4023 matching lines...) Expand 10 before | Expand all | Expand 10 after
5565 MemOperand(fp, 6 * kPointerSize), NULL); 5568 MemOperand(fp, 6 * kPointerSize), NULL);
5566 } 5569 }
5567 5570
5568 5571
5569 #undef __ 5572 #undef __
5570 5573
5571 } // namespace internal 5574 } // namespace internal
5572 } // namespace v8 5575 } // namespace v8
5573 5576
5574 #endif // V8_TARGET_ARCH_MIPS 5577 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698