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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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
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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 5106 matching lines...) Expand 10 before | Expand all | Expand 10 after
5117 __ CmpObjectType(input, SYMBOL_TYPE, input); 5117 __ CmpObjectType(input, SYMBOL_TYPE, input);
5118 final_branch_condition = equal; 5118 final_branch_condition = equal;
5119 5119
5120 } else if (String::Equals(type_name, factory()->boolean_string())) { 5120 } else if (String::Equals(type_name, factory()->boolean_string())) {
5121 __ cmp(input, factory()->true_value()); 5121 __ cmp(input, factory()->true_value());
5122 __ j(equal, true_label, true_distance); 5122 __ j(equal, true_label, true_distance);
5123 __ cmp(input, factory()->false_value()); 5123 __ cmp(input, factory()->false_value());
5124 final_branch_condition = equal; 5124 final_branch_condition = equal;
5125 5125
5126 } else if (String::Equals(type_name, factory()->undefined_string())) { 5126 } else if (String::Equals(type_name, factory()->undefined_string())) {
5127 __ cmp(input, factory()->undefined_value()); 5127 __ cmp(input, factory()->null_value());
5128 __ j(equal, true_label, true_distance); 5128 __ j(equal, false_label, false_distance);
5129 __ JumpIfSmi(input, false_label, false_distance); 5129 __ JumpIfSmi(input, false_label, false_distance);
5130 // Check for undetectable objects => true. 5130 // Check for undetectable objects => true.
5131 __ mov(input, FieldOperand(input, HeapObject::kMapOffset)); 5131 __ mov(input, FieldOperand(input, HeapObject::kMapOffset));
5132 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5132 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5133 1 << Map::kIsUndetectable); 5133 1 << Map::kIsUndetectable);
5134 final_branch_condition = not_zero; 5134 final_branch_condition = not_zero;
5135 5135
5136 } else if (String::Equals(type_name, factory()->function_string())) { 5136 } else if (String::Equals(type_name, factory()->function_string())) {
5137 __ JumpIfSmi(input, false_label, false_distance); 5137 __ JumpIfSmi(input, false_label, false_distance);
5138 // Check for callable and not undetectable objects => true. 5138 // Check for callable and not undetectable objects => true.
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
5427 RecordSafepoint(Safepoint::kNoLazyDeopt); 5427 RecordSafepoint(Safepoint::kNoLazyDeopt);
5428 } 5428 }
5429 5429
5430 5430
5431 #undef __ 5431 #undef __
5432 5432
5433 } // namespace internal 5433 } // namespace internal
5434 } // namespace v8 5434 } // namespace v8
5435 5435
5436 #endif // V8_TARGET_ARCH_IA32 5436 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698