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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 1683643002: Mark null and undefined as undetectable, and use it to handle abstract equality comparison in the g… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/mips/lithium-codegen-mips.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 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 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 5439 matching lines...) Expand 10 before | Expand all | Expand 10 after
5450 5450
5451 } else if (String::Equals(type_name, factory->boolean_string())) { 5451 } else if (String::Equals(type_name, factory->boolean_string())) {
5452 __ LoadRoot(at, Heap::kTrueValueRootIndex); 5452 __ LoadRoot(at, Heap::kTrueValueRootIndex);
5453 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); 5453 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input));
5454 __ LoadRoot(at, Heap::kFalseValueRootIndex); 5454 __ LoadRoot(at, Heap::kFalseValueRootIndex);
5455 *cmp1 = at; 5455 *cmp1 = at;
5456 *cmp2 = Operand(input); 5456 *cmp2 = Operand(input);
5457 final_branch_condition = eq; 5457 final_branch_condition = eq;
5458 5458
5459 } else if (String::Equals(type_name, factory->undefined_string())) { 5459 } else if (String::Equals(type_name, factory->undefined_string())) {
5460 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 5460 __ LoadRoot(at, Heap::kNullValueRootIndex);
5461 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); 5461 __ Branch(USE_DELAY_SLOT, false_label, eq, at, Operand(input));
5462 // The first instruction of JumpIfSmi is an And - it is safe in the delay 5462 // The first instruction of JumpIfSmi is an And - it is safe in the delay
5463 // slot. 5463 // slot.
5464 __ JumpIfSmi(input, false_label); 5464 __ JumpIfSmi(input, false_label);
5465 // Check for undetectable objects => true. 5465 // Check for undetectable objects => true.
5466 __ ld(input, FieldMemOperand(input, HeapObject::kMapOffset)); 5466 __ ld(input, FieldMemOperand(input, HeapObject::kMapOffset));
5467 __ lbu(at, FieldMemOperand(input, Map::kBitFieldOffset)); 5467 __ lbu(at, FieldMemOperand(input, Map::kBitFieldOffset));
5468 __ And(at, at, 1 << Map::kIsUndetectable); 5468 __ And(at, at, 1 << Map::kIsUndetectable);
5469 *cmp1 = at; 5469 *cmp1 = at;
5470 *cmp2 = Operand(zero_reg); 5470 *cmp2 = Operand(zero_reg);
5471 final_branch_condition = ne; 5471 final_branch_condition = ne;
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
5776 __ Push(at, ToRegister(instr->function())); 5776 __ Push(at, ToRegister(instr->function()));
5777 CallRuntime(Runtime::kPushBlockContext, instr); 5777 CallRuntime(Runtime::kPushBlockContext, instr);
5778 RecordSafepoint(Safepoint::kNoLazyDeopt); 5778 RecordSafepoint(Safepoint::kNoLazyDeopt);
5779 } 5779 }
5780 5780
5781 5781
5782 #undef __ 5782 #undef __
5783 5783
5784 } // namespace internal 5784 } // namespace internal
5785 } // namespace v8 5785 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698