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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
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 5438 matching lines...) Expand 10 before | Expand all | Expand 10 after
5449 5449
5450 void LCodeGen::DoTypeof(LTypeof* instr) { 5450 void LCodeGen::DoTypeof(LTypeof* instr) {
5451 DCHECK(ToRegister(instr->value()).is(x3)); 5451 DCHECK(ToRegister(instr->value()).is(x3));
5452 DCHECK(ToRegister(instr->result()).is(x0)); 5452 DCHECK(ToRegister(instr->result()).is(x0));
5453 Label end, do_call; 5453 Label end, do_call;
5454 Register value_register = ToRegister(instr->value()); 5454 Register value_register = ToRegister(instr->value());
5455 __ JumpIfNotSmi(value_register, &do_call); 5455 __ JumpIfNotSmi(value_register, &do_call);
5456 __ Mov(x0, Immediate(isolate()->factory()->number_string())); 5456 __ Mov(x0, Immediate(isolate()->factory()->number_string()));
5457 __ B(&end); 5457 __ B(&end);
5458 __ Bind(&do_call); 5458 __ Bind(&do_call);
5459 TypeofStub stub(isolate()); 5459 Callable callable = CodeFactory::Typeof(isolate());
5460 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5460 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr);
5461 __ Bind(&end); 5461 __ Bind(&end);
5462 } 5462 }
5463 5463
5464 5464
5465 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { 5465 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) {
5466 Handle<String> type_name = instr->type_literal(); 5466 Handle<String> type_name = instr->type_literal();
5467 Label* true_label = instr->TrueLabel(chunk_); 5467 Label* true_label = instr->TrueLabel(chunk_);
5468 Label* false_label = instr->FalseLabel(chunk_); 5468 Label* false_label = instr->FalseLabel(chunk_);
5469 Register value = ToRegister(instr->value()); 5469 Register value = ToRegister(instr->value());
5470 5470
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
5699 // Index is equal to negated out of object property index plus 1. 5699 // Index is equal to negated out of object property index plus 1.
5700 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5700 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5701 __ Ldr(result, FieldMemOperand(result, 5701 __ Ldr(result, FieldMemOperand(result,
5702 FixedArray::kHeaderSize - kPointerSize)); 5702 FixedArray::kHeaderSize - kPointerSize));
5703 __ Bind(deferred->exit()); 5703 __ Bind(deferred->exit());
5704 __ Bind(&done); 5704 __ Bind(&done);
5705 } 5705 }
5706 5706
5707 } // namespace internal 5707 } // namespace internal
5708 } // namespace v8 5708 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698