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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5526 matching lines...) Expand 10 before | Expand all | Expand 10 after
5537 5537
5538 } else if (String::Equals(type_name, factory->boolean_string())) { 5538 } else if (String::Equals(type_name, factory->boolean_string())) {
5539 __ JumpIfRoot(value, Heap::kTrueValueRootIndex, true_label); 5539 __ JumpIfRoot(value, Heap::kTrueValueRootIndex, true_label);
5540 __ CompareRoot(value, Heap::kFalseValueRootIndex); 5540 __ CompareRoot(value, Heap::kFalseValueRootIndex);
5541 EmitBranch(instr, eq); 5541 EmitBranch(instr, eq);
5542 5542
5543 } else if (String::Equals(type_name, factory->undefined_string())) { 5543 } else if (String::Equals(type_name, factory->undefined_string())) {
5544 DCHECK(instr->temp1() != NULL); 5544 DCHECK(instr->temp1() != NULL);
5545 Register scratch = ToRegister(instr->temp1()); 5545 Register scratch = ToRegister(instr->temp1());
5546 5546
5547 __ JumpIfRoot(value, Heap::kUndefinedValueRootIndex, true_label); 5547 __ JumpIfRoot(value, Heap::kNullValueRootIndex, false_label);
5548 __ JumpIfSmi(value, false_label); 5548 __ JumpIfSmi(value, false_label);
5549 // Check for undetectable objects and jump to the true branch in this case. 5549 // Check for undetectable objects and jump to the true branch in this case.
5550 __ Ldr(scratch, FieldMemOperand(value, HeapObject::kMapOffset)); 5550 __ Ldr(scratch, FieldMemOperand(value, HeapObject::kMapOffset));
5551 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset)); 5551 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset));
5552 EmitTestAndBranch(instr, ne, scratch, 1 << Map::kIsUndetectable); 5552 EmitTestAndBranch(instr, ne, scratch, 1 << Map::kIsUndetectable);
5553 5553
5554 } else if (String::Equals(type_name, factory->function_string())) { 5554 } else if (String::Equals(type_name, factory->function_string())) {
5555 DCHECK(instr->temp1() != NULL); 5555 DCHECK(instr->temp1() != NULL);
5556 Register scratch = ToRegister(instr->temp1()); 5556 Register scratch = ToRegister(instr->temp1());
5557 5557
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
5745 Handle<ScopeInfo> scope_info = instr->scope_info(); 5745 Handle<ScopeInfo> scope_info = instr->scope_info();
5746 __ Push(scope_info); 5746 __ Push(scope_info);
5747 __ Push(ToRegister(instr->function())); 5747 __ Push(ToRegister(instr->function()));
5748 CallRuntime(Runtime::kPushBlockContext, instr); 5748 CallRuntime(Runtime::kPushBlockContext, instr);
5749 RecordSafepoint(Safepoint::kNoLazyDeopt); 5749 RecordSafepoint(Safepoint::kNoLazyDeopt);
5750 } 5750 }
5751 5751
5752 5752
5753 } // namespace internal 5753 } // namespace internal
5754 } // namespace v8 5754 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698