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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 5669 matching lines...) Expand 10 before | Expand all | Expand 10 after
5680 __ CmpObjectType(input, SYMBOL_TYPE, input); 5680 __ CmpObjectType(input, SYMBOL_TYPE, input);
5681 final_branch_condition = equal; 5681 final_branch_condition = equal;
5682 5682
5683 } else if (String::Equals(type_name, factory()->boolean_string())) { 5683 } else if (String::Equals(type_name, factory()->boolean_string())) {
5684 __ cmp(input, factory()->true_value()); 5684 __ cmp(input, factory()->true_value());
5685 __ j(equal, true_label, true_distance); 5685 __ j(equal, true_label, true_distance);
5686 __ cmp(input, factory()->false_value()); 5686 __ cmp(input, factory()->false_value());
5687 final_branch_condition = equal; 5687 final_branch_condition = equal;
5688 5688
5689 } else if (String::Equals(type_name, factory()->undefined_string())) { 5689 } else if (String::Equals(type_name, factory()->undefined_string())) {
5690 __ cmp(input, factory()->undefined_value()); 5690 __ cmp(input, factory()->null_value());
5691 __ j(equal, true_label, true_distance); 5691 __ j(equal, false_label, false_distance);
5692 __ JumpIfSmi(input, false_label, false_distance); 5692 __ JumpIfSmi(input, false_label, false_distance);
5693 // Check for undetectable objects => true. 5693 // Check for undetectable objects => true.
5694 __ mov(input, FieldOperand(input, HeapObject::kMapOffset)); 5694 __ mov(input, FieldOperand(input, HeapObject::kMapOffset));
5695 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5695 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5696 1 << Map::kIsUndetectable); 5696 1 << Map::kIsUndetectable);
5697 final_branch_condition = not_zero; 5697 final_branch_condition = not_zero;
5698 5698
5699 } else if (String::Equals(type_name, factory()->function_string())) { 5699 } else if (String::Equals(type_name, factory()->function_string())) {
5700 __ JumpIfSmi(input, false_label, false_distance); 5700 __ JumpIfSmi(input, false_label, false_distance);
5701 // Check for callable and not undetectable objects => true. 5701 // Check for callable and not undetectable objects => true.
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
5993 RecordSafepoint(Safepoint::kNoLazyDeopt); 5993 RecordSafepoint(Safepoint::kNoLazyDeopt);
5994 } 5994 }
5995 5995
5996 5996
5997 #undef __ 5997 #undef __
5998 5998
5999 } // namespace internal 5999 } // namespace internal
6000 } // namespace v8 6000 } // namespace v8
6001 6001
6002 #endif // V8_TARGET_ARCH_X87 6002 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698