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

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.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/arm64/code-stubs-arm64.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 5223 matching lines...) Expand 10 before | Expand all | Expand 10 after
5234 __ CompareObjectType(input, scratch, no_reg, SYMBOL_TYPE); 5234 __ CompareObjectType(input, scratch, no_reg, SYMBOL_TYPE);
5235 final_branch_condition = eq; 5235 final_branch_condition = eq;
5236 5236
5237 } else if (String::Equals(type_name, factory->boolean_string())) { 5237 } else if (String::Equals(type_name, factory->boolean_string())) {
5238 __ CompareRoot(input, Heap::kTrueValueRootIndex); 5238 __ CompareRoot(input, Heap::kTrueValueRootIndex);
5239 __ b(eq, true_label); 5239 __ b(eq, true_label);
5240 __ CompareRoot(input, Heap::kFalseValueRootIndex); 5240 __ CompareRoot(input, Heap::kFalseValueRootIndex);
5241 final_branch_condition = eq; 5241 final_branch_condition = eq;
5242 5242
5243 } else if (String::Equals(type_name, factory->undefined_string())) { 5243 } else if (String::Equals(type_name, factory->undefined_string())) {
5244 __ CompareRoot(input, Heap::kUndefinedValueRootIndex); 5244 __ CompareRoot(input, Heap::kNullValueRootIndex);
5245 __ b(eq, true_label); 5245 __ b(eq, false_label);
5246 __ JumpIfSmi(input, false_label); 5246 __ JumpIfSmi(input, false_label);
5247 // Check for undetectable objects => true. 5247 // Check for undetectable objects => true.
5248 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); 5248 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset));
5249 __ ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset)); 5249 __ ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset));
5250 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); 5250 __ tst(scratch, Operand(1 << Map::kIsUndetectable));
5251 final_branch_condition = ne; 5251 final_branch_condition = ne;
5252 5252
5253 } else if (String::Equals(type_name, factory->function_string())) { 5253 } else if (String::Equals(type_name, factory->function_string())) {
5254 __ JumpIfSmi(input, false_label); 5254 __ JumpIfSmi(input, false_label);
5255 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); 5255 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset));
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
5554 __ push(ToRegister(instr->function())); 5554 __ push(ToRegister(instr->function()));
5555 CallRuntime(Runtime::kPushBlockContext, instr); 5555 CallRuntime(Runtime::kPushBlockContext, instr);
5556 RecordSafepoint(Safepoint::kNoLazyDeopt); 5556 RecordSafepoint(Safepoint::kNoLazyDeopt);
5557 } 5557 }
5558 5558
5559 5559
5560 #undef __ 5560 #undef __
5561 5561
5562 } // namespace internal 5562 } // namespace internal
5563 } // namespace v8 5563 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698