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

Side by Side Diff: src/x64/builtins-x64.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/runtime/runtime-operators.cc ('k') | src/x64/code-stubs-x64.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_X64 5 #if V8_TARGET_ARCH_X64
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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 // 3. Raise a TypeError if the receiver is not a date. 1255 // 3. Raise a TypeError if the receiver is not a date.
1256 __ bind(&receiver_not_date); 1256 __ bind(&receiver_not_date);
1257 { 1257 {
1258 FrameScope scope(masm, StackFrame::MANUAL); 1258 FrameScope scope(masm, StackFrame::MANUAL);
1259 __ EnterFrame(StackFrame::INTERNAL); 1259 __ EnterFrame(StackFrame::INTERNAL);
1260 __ CallRuntime(Runtime::kThrowNotDateError); 1260 __ CallRuntime(Runtime::kThrowNotDateError);
1261 } 1261 }
1262 } 1262 }
1263 1263
1264 // static 1264 // static
1265 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) {
1266 // ----------- S t a t e -------------
1267 // -- rax : argc
1268 // -- rsp[0] : return address
1269 // -- rsp[8] : first argument (left-hand side)
1270 // -- rsp[16] : receiver (right-hand side)
1271 // -----------------------------------
1272
1273 {
1274 FrameScope scope(masm, StackFrame::INTERNAL);
1275 __ movp(InstanceOfDescriptor::LeftRegister(),
1276 Operand(rbp, 2 * kPointerSize)); // Load left-hand side.
1277 __ movp(InstanceOfDescriptor::RightRegister(),
1278 Operand(rbp, 3 * kPointerSize)); // Load right-hand side.
1279 InstanceOfStub stub(masm->isolate(), true);
1280 __ CallStub(&stub);
1281 }
1282
1283 // Pop the argument and the receiver.
1284 __ ret(2 * kPointerSize);
1285 }
1286
1287 // static
1288 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1265 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1289 // ----------- S t a t e ------------- 1266 // ----------- S t a t e -------------
1290 // -- rax : argc 1267 // -- rax : argc
1291 // -- rsp[0] : return address 1268 // -- rsp[0] : return address
1292 // -- rsp[8] : argArray 1269 // -- rsp[8] : argArray
1293 // -- rsp[16] : thisArg 1270 // -- rsp[16] : thisArg
1294 // -- rsp[24] : receiver 1271 // -- rsp[24] : receiver
1295 // ----------------------------------- 1272 // -----------------------------------
1296 1273
1297 // 1. Load receiver into rdi, argArray into rax (if present), remove all 1274 // 1. Load receiver into rdi, argArray into rax (if present), remove all
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2955 __ ret(0); 2932 __ ret(0);
2956 } 2933 }
2957 2934
2958 2935
2959 #undef __ 2936 #undef __
2960 2937
2961 } // namespace internal 2938 } // namespace internal
2962 } // namespace v8 2939 } // namespace v8
2963 2940
2964 #endif // V8_TARGET_ARCH_X64 2941 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-operators.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698