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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5335 matching lines...) Expand 10 before | Expand all | Expand 10 after
5346 5346
5347 void LCodeGen::DoTypeof(LTypeof* instr) { 5347 void LCodeGen::DoTypeof(LTypeof* instr) {
5348 DCHECK(ToRegister(instr->value()).is(r5)); 5348 DCHECK(ToRegister(instr->value()).is(r5));
5349 DCHECK(ToRegister(instr->result()).is(r2)); 5349 DCHECK(ToRegister(instr->result()).is(r2));
5350 Label end, do_call; 5350 Label end, do_call;
5351 Register value_register = ToRegister(instr->value()); 5351 Register value_register = ToRegister(instr->value());
5352 __ JumpIfNotSmi(value_register, &do_call); 5352 __ JumpIfNotSmi(value_register, &do_call);
5353 __ mov(r2, Operand(isolate()->factory()->number_string())); 5353 __ mov(r2, Operand(isolate()->factory()->number_string()));
5354 __ b(&end); 5354 __ b(&end);
5355 __ bind(&do_call); 5355 __ bind(&do_call);
5356 TypeofStub stub(isolate()); 5356 Callable callable = CodeFactory::Typeof(isolate());
5357 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5357 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr);
5358 __ bind(&end); 5358 __ bind(&end);
5359 } 5359 }
5360 5360
5361 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { 5361 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) {
5362 Register input = ToRegister(instr->value()); 5362 Register input = ToRegister(instr->value());
5363 5363
5364 Condition final_branch_condition = 5364 Condition final_branch_condition =
5365 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input, 5365 EmitTypeofIs(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), input,
5366 instr->type_literal()); 5366 instr->type_literal());
5367 if (final_branch_condition != kNoCondition) { 5367 if (final_branch_condition != kNoCondition) {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
5670 __ LoadP(result, 5670 __ LoadP(result,
5671 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5671 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5672 __ bind(deferred->exit()); 5672 __ bind(deferred->exit());
5673 __ bind(&done); 5673 __ bind(&done);
5674 } 5674 }
5675 5675
5676 #undef __ 5676 #undef __
5677 5677
5678 } // namespace internal 5678 } // namespace internal
5679 } // namespace v8 5679 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698