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/crankshaft/ia32/lithium-codegen-ia32.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
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/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 4928 matching lines...) Expand 10 before | Expand all | Expand 10 after
4939 4939
4940 void LCodeGen::DoTypeof(LTypeof* instr) { 4940 void LCodeGen::DoTypeof(LTypeof* instr) {
4941 DCHECK(ToRegister(instr->context()).is(esi)); 4941 DCHECK(ToRegister(instr->context()).is(esi));
4942 DCHECK(ToRegister(instr->value()).is(ebx)); 4942 DCHECK(ToRegister(instr->value()).is(ebx));
4943 Label end, do_call; 4943 Label end, do_call;
4944 Register value_register = ToRegister(instr->value()); 4944 Register value_register = ToRegister(instr->value());
4945 __ JumpIfNotSmi(value_register, &do_call); 4945 __ JumpIfNotSmi(value_register, &do_call);
4946 __ mov(eax, Immediate(isolate()->factory()->number_string())); 4946 __ mov(eax, Immediate(isolate()->factory()->number_string()));
4947 __ jmp(&end); 4947 __ jmp(&end);
4948 __ bind(&do_call); 4948 __ bind(&do_call);
4949 TypeofStub stub(isolate()); 4949 Callable callable = CodeFactory::Typeof(isolate());
4950 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4950 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr);
4951 __ bind(&end); 4951 __ bind(&end);
4952 } 4952 }
4953 4953
4954 4954
4955 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { 4955 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) {
4956 Register input = ToRegister(instr->value()); 4956 Register input = ToRegister(instr->value());
4957 Condition final_branch_condition = EmitTypeofIs(instr, input); 4957 Condition final_branch_condition = EmitTypeofIs(instr, input);
4958 if (final_branch_condition != no_condition) { 4958 if (final_branch_condition != no_condition) {
4959 EmitBranch(instr, final_branch_condition); 4959 EmitBranch(instr, final_branch_condition);
4960 } 4960 }
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 __ bind(deferred->exit()); 5284 __ bind(deferred->exit());
5285 __ bind(&done); 5285 __ bind(&done);
5286 } 5286 }
5287 5287
5288 #undef __ 5288 #undef __
5289 5289
5290 } // namespace internal 5290 } // namespace internal
5291 } // namespace v8 5291 } // namespace v8
5292 5292
5293 #endif // V8_TARGET_ARCH_IA32 5293 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698