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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5146 matching lines...) Expand 10 before | Expand all | Expand 10 after
5157 5157
5158 void LCodeGen::DoTypeof(LTypeof* instr) { 5158 void LCodeGen::DoTypeof(LTypeof* instr) {
5159 DCHECK(ToRegister(instr->value()).is(a3)); 5159 DCHECK(ToRegister(instr->value()).is(a3));
5160 DCHECK(ToRegister(instr->result()).is(v0)); 5160 DCHECK(ToRegister(instr->result()).is(v0));
5161 Label end, do_call; 5161 Label end, do_call;
5162 Register value_register = ToRegister(instr->value()); 5162 Register value_register = ToRegister(instr->value());
5163 __ JumpIfNotSmi(value_register, &do_call); 5163 __ JumpIfNotSmi(value_register, &do_call);
5164 __ li(v0, Operand(isolate()->factory()->number_string())); 5164 __ li(v0, Operand(isolate()->factory()->number_string()));
5165 __ jmp(&end); 5165 __ jmp(&end);
5166 __ bind(&do_call); 5166 __ bind(&do_call);
5167 TypeofStub stub(isolate()); 5167 Callable callable = CodeFactory::Typeof(isolate());
5168 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 5168 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr);
5169 __ bind(&end); 5169 __ bind(&end);
5170 } 5170 }
5171 5171
5172 5172
5173 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { 5173 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) {
5174 Register input = ToRegister(instr->value()); 5174 Register input = ToRegister(instr->value());
5175 5175
5176 Register cmp1 = no_reg; 5176 Register cmp1 = no_reg;
5177 Operand cmp2 = Operand(no_reg); 5177 Operand cmp2 = Operand(no_reg);
5178 5178
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
5541 __ lw(result, FieldMemOperand(scratch, 5541 __ lw(result, FieldMemOperand(scratch,
5542 FixedArray::kHeaderSize - kPointerSize)); 5542 FixedArray::kHeaderSize - kPointerSize));
5543 __ bind(deferred->exit()); 5543 __ bind(deferred->exit());
5544 __ bind(&done); 5544 __ bind(&done);
5545 } 5545 }
5546 5546
5547 #undef __ 5547 #undef __
5548 5548
5549 } // namespace internal 5549 } // namespace internal
5550 } // namespace v8 5550 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698