OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |