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

Side by Side Diff: src/mips/builtins-mips.cc

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 months 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 | « src/messages.h ('k') | src/mips/code-stubs-mips.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/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 ExternalReference::get_date_field_function(masm->isolate()), 2); 1740 ExternalReference::get_date_field_function(masm->isolate()), 2);
1741 } 1741 }
1742 __ Ret(); 1742 __ Ret();
1743 1743
1744 // 3. Raise a TypeError if the receiver is not a date. 1744 // 3. Raise a TypeError if the receiver is not a date.
1745 __ bind(&receiver_not_date); 1745 __ bind(&receiver_not_date);
1746 __ TailCallRuntime(Runtime::kThrowNotDateError); 1746 __ TailCallRuntime(Runtime::kThrowNotDateError);
1747 } 1747 }
1748 1748
1749 // static 1749 // static
1750 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) {
1751 // ----------- S t a t e -------------
1752 // -- a0 : argc
1753 // -- sp[0] : first argument (left-hand side)
1754 // -- sp[4] : receiver (right-hand side)
1755 // -----------------------------------
1756
1757 {
1758 FrameScope scope(masm, StackFrame::INTERNAL);
1759 __ lw(InstanceOfDescriptor::LeftRegister(),
1760 MemOperand(fp, 2 * kPointerSize)); // Load left-hand side.
1761 __ lw(InstanceOfDescriptor::RightRegister(),
1762 MemOperand(fp, 3 * kPointerSize)); // Load right-hand side.
1763 InstanceOfStub stub(masm->isolate(), true);
1764 __ CallStub(&stub);
1765 }
1766
1767 // Pop the argument and the receiver.
1768 __ DropAndRet(2);
1769 }
1770
1771 // static
1772 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1750 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1773 // ----------- S t a t e ------------- 1751 // ----------- S t a t e -------------
1774 // -- a0 : argc 1752 // -- a0 : argc
1775 // -- sp[0] : argArray 1753 // -- sp[0] : argArray
1776 // -- sp[4] : thisArg 1754 // -- sp[4] : thisArg
1777 // -- sp[8] : receiver 1755 // -- sp[8] : receiver
1778 // ----------------------------------- 1756 // -----------------------------------
1779 1757
1780 // 1. Load receiver into a1, argArray into a0 (if present), remove all 1758 // 1. Load receiver into a1, argArray into a0 (if present), remove all
1781 // arguments from the stack (including the receiver), and push thisArg (if 1759 // arguments from the stack (including the receiver), and push thisArg (if
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 } 2872 }
2895 } 2873 }
2896 2874
2897 2875
2898 #undef __ 2876 #undef __
2899 2877
2900 } // namespace internal 2878 } // namespace internal
2901 } // namespace v8 2879 } // namespace v8
2902 2880
2903 #endif // V8_TARGET_ARCH_MIPS 2881 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/messages.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698