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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 2195863002: [turbofan] Stub for typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Delete now unused untemplated DoUnaryOp Created 4 years, 4 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/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 5201 matching lines...) Expand 10 before | Expand all | Expand 10 after
5212 5212
5213 void LCodeGen::DoTypeof(LTypeof* instr) { 5213 void LCodeGen::DoTypeof(LTypeof* instr) {
5214 DCHECK(ToRegister(instr->context()).is(rsi)); 5214 DCHECK(ToRegister(instr->context()).is(rsi));
5215 DCHECK(ToRegister(instr->value()).is(rbx)); 5215 DCHECK(ToRegister(instr->value()).is(rbx));
5216 Label end, do_call; 5216 Label end, do_call;
5217 Register value_register = ToRegister(instr->value()); 5217 Register value_register = ToRegister(instr->value());
5218 __ JumpIfNotSmi(value_register, &do_call); 5218 __ JumpIfNotSmi(value_register, &do_call);
5219 __ Move(rax, isolate()->factory()->number_string()); 5219 __ Move(rax, isolate()->factory()->number_string());
5220 __ jmp(&end); 5220 __ jmp(&end);
5221 __ bind(&do_call); 5221 __ bind(&do_call);
5222 TypeofStub stub(isolate()); 5222 Callable callable = CodeFactory::Typeof(isolate());
5223 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5223 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr);
5224 __ bind(&end); 5224 __ bind(&end);
5225 } 5225 }
5226 5226
5227 5227
5228 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { 5228 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) {
5229 DCHECK(!operand->IsDoubleRegister()); 5229 DCHECK(!operand->IsDoubleRegister());
5230 if (operand->IsConstantOperand()) { 5230 if (operand->IsConstantOperand()) {
5231 __ Push(ToHandle(LConstantOperand::cast(operand))); 5231 __ Push(ToHandle(LConstantOperand::cast(operand)));
5232 } else if (operand->IsRegister()) { 5232 } else if (operand->IsRegister()) {
5233 __ Push(ToRegister(operand)); 5233 __ Push(ToRegister(operand));
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
5568 __ bind(deferred->exit()); 5568 __ bind(deferred->exit());
5569 __ bind(&done); 5569 __ bind(&done);
5570 } 5570 }
5571 5571
5572 #undef __ 5572 #undef __
5573 5573
5574 } // namespace internal 5574 } // namespace internal
5575 } // namespace v8 5575 } // namespace v8
5576 5576
5577 #endif // V8_TARGET_ARCH_X64 5577 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698