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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 5429 matching lines...) Expand 10 before | Expand all | Expand 10 after
5440 5440
5441 void LCodeGen::DoTypeof(LTypeof* instr) { 5441 void LCodeGen::DoTypeof(LTypeof* instr) {
5442 DCHECK(ToRegister(instr->value()).is(r6)); 5442 DCHECK(ToRegister(instr->value()).is(r6));
5443 DCHECK(ToRegister(instr->result()).is(r3)); 5443 DCHECK(ToRegister(instr->result()).is(r3));
5444 Label end, do_call; 5444 Label end, do_call;
5445 Register value_register = ToRegister(instr->value()); 5445 Register value_register = ToRegister(instr->value());
5446 __ JumpIfNotSmi(value_register, &do_call); 5446 __ JumpIfNotSmi(value_register, &do_call);
5447 __ mov(r3, Operand(isolate()->factory()->number_string())); 5447 __ mov(r3, Operand(isolate()->factory()->number_string()));
5448 __ b(&end); 5448 __ b(&end);
5449 __ bind(&do_call); 5449 __ bind(&do_call);
5450 TypeofStub stub(isolate()); 5450 Callable callable = CodeFactory::Typeof(isolate());
5451 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5451 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr);
5452 __ bind(&end); 5452 __ bind(&end);
5453 } 5453 }
5454 5454
5455 5455
5456 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { 5456 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) {
5457 Register input = ToRegister(instr->value()); 5457 Register input = ToRegister(instr->value());
5458 5458
5459 Condition final_branch_condition = 5459 Condition final_branch_condition =
5460 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, 5460 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input,
5461 instr->type_literal()); 5461 instr->type_literal());
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
5781 __ LoadP(result, 5781 __ LoadP(result,
5782 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5782 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5783 __ bind(deferred->exit()); 5783 __ bind(deferred->exit());
5784 __ bind(&done); 5784 __ bind(&done);
5785 } 5785 }
5786 5786
5787 #undef __ 5787 #undef __
5788 5788
5789 } // namespace internal 5789 } // namespace internal
5790 } // namespace v8 5790 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698