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

Side by Side Diff: src/arm/builtins-arm.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 | « no previous file | src/arm/code-stubs-arm.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 ExternalReference::get_date_field_function(masm->isolate()), 2); 1741 ExternalReference::get_date_field_function(masm->isolate()), 2);
1742 } 1742 }
1743 __ Ret(); 1743 __ Ret();
1744 1744
1745 // 3. Raise a TypeError if the receiver is not a date. 1745 // 3. Raise a TypeError if the receiver is not a date.
1746 __ bind(&receiver_not_date); 1746 __ bind(&receiver_not_date);
1747 __ TailCallRuntime(Runtime::kThrowNotDateError); 1747 __ TailCallRuntime(Runtime::kThrowNotDateError);
1748 } 1748 }
1749 1749
1750 // static 1750 // static
1751 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) {
1752 // ----------- S t a t e -------------
1753 // -- r0 : argc
1754 // -- sp[0] : first argument (left-hand side)
1755 // -- sp[4] : receiver (right-hand side)
1756 // -----------------------------------
1757
1758 {
1759 FrameScope scope(masm, StackFrame::INTERNAL);
1760 __ ldr(InstanceOfDescriptor::LeftRegister(),
1761 MemOperand(fp, 2 * kPointerSize)); // Load left-hand side.
1762 __ ldr(InstanceOfDescriptor::RightRegister(),
1763 MemOperand(fp, 3 * kPointerSize)); // Load right-hand side.
1764 InstanceOfStub stub(masm->isolate(), true);
1765 __ CallStub(&stub);
1766 }
1767
1768 // Pop the argument and the receiver.
1769 __ Ret(2);
1770 }
1771
1772 // static
1773 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1751 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1774 // ----------- S t a t e ------------- 1752 // ----------- S t a t e -------------
1775 // -- r0 : argc 1753 // -- r0 : argc
1776 // -- sp[0] : argArray 1754 // -- sp[0] : argArray
1777 // -- sp[4] : thisArg 1755 // -- sp[4] : thisArg
1778 // -- sp[8] : receiver 1756 // -- sp[8] : receiver
1779 // ----------------------------------- 1757 // -----------------------------------
1780 1758
1781 // 1. Load receiver into r1, argArray into r0 (if present), remove all 1759 // 1. Load receiver into r1, argArray into r0 (if present), remove all
1782 // arguments from the stack (including the receiver), and push thisArg (if 1760 // arguments from the stack (including the receiver), and push thisArg (if
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 } 2788 }
2811 } 2789 }
2812 2790
2813 2791
2814 #undef __ 2792 #undef __
2815 2793
2816 } // namespace internal 2794 } // namespace internal
2817 } // namespace v8 2795 } // namespace v8
2818 2796
2819 #endif // V8_TARGET_ARCH_ARM 2797 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698