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

Side by Side Diff: src/ia32/builtins-ia32.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/heap/heap.cc ('k') | src/ia32/code-stubs-ia32.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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 // 3. Raise a TypeError if the receiver is not a date. 1206 // 3. Raise a TypeError if the receiver is not a date.
1207 __ bind(&receiver_not_date); 1207 __ bind(&receiver_not_date);
1208 { 1208 {
1209 FrameScope scope(masm, StackFrame::MANUAL); 1209 FrameScope scope(masm, StackFrame::MANUAL);
1210 __ EnterFrame(StackFrame::INTERNAL); 1210 __ EnterFrame(StackFrame::INTERNAL);
1211 __ CallRuntime(Runtime::kThrowNotDateError); 1211 __ CallRuntime(Runtime::kThrowNotDateError);
1212 } 1212 }
1213 } 1213 }
1214 1214
1215 // static 1215 // static
1216 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) {
1217 // ----------- S t a t e -------------
1218 // -- eax : argc
1219 // -- esp[0] : return address
1220 // -- esp[4] : first argument (left-hand side)
1221 // -- esp[8] : receiver (right-hand side)
1222 // -----------------------------------
1223
1224 {
1225 FrameScope scope(masm, StackFrame::INTERNAL);
1226 __ mov(InstanceOfDescriptor::LeftRegister(),
1227 Operand(ebp, 2 * kPointerSize)); // Load left-hand side.
1228 __ mov(InstanceOfDescriptor::RightRegister(),
1229 Operand(ebp, 3 * kPointerSize)); // Load right-hand side.
1230 InstanceOfStub stub(masm->isolate(), true);
1231 __ CallStub(&stub);
1232 }
1233
1234 // Pop the argument and the receiver.
1235 __ ret(2 * kPointerSize);
1236 }
1237
1238 // static
1239 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1216 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1240 // ----------- S t a t e ------------- 1217 // ----------- S t a t e -------------
1241 // -- eax : argc 1218 // -- eax : argc
1242 // -- esp[0] : return address 1219 // -- esp[0] : return address
1243 // -- esp[4] : argArray 1220 // -- esp[4] : argArray
1244 // -- esp[8] : thisArg 1221 // -- esp[8] : thisArg
1245 // -- esp[12] : receiver 1222 // -- esp[12] : receiver
1246 // ----------------------------------- 1223 // -----------------------------------
1247 1224
1248 // 1. Load receiver into edi, argArray into eax (if present), remove all 1225 // 1. Load receiver into edi, argArray into eax (if present), remove all
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
2895 // And "return" to the OSR entry point of the function. 2872 // And "return" to the OSR entry point of the function.
2896 __ ret(0); 2873 __ ret(0);
2897 } 2874 }
2898 2875
2899 2876
2900 #undef __ 2877 #undef __
2901 } // namespace internal 2878 } // namespace internal
2902 } // namespace v8 2879 } // namespace v8
2903 2880
2904 #endif // V8_TARGET_ARCH_IA32 2881 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698