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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "arm64/lithium-codegen-arm64.h" | 7 #include "arm64/lithium-codegen-arm64.h" |
8 #include "arm64/lithium-gap-resolver-arm64.h" | 8 #include "arm64/lithium-gap-resolver-arm64.h" |
9 #include "code-stubs.h" | 9 #include "code-stubs.h" |
10 #include "stub-cache.h" | 10 #include "stub-cache.h" |
(...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 __ Mov(ToRegister32(instr->result()), static_cast<uint32_t>(instr->value())); | 2524 __ Mov(ToRegister32(instr->result()), static_cast<uint32_t>(instr->value())); |
2525 } | 2525 } |
2526 | 2526 |
2527 | 2527 |
2528 void LCodeGen::DoConstantS(LConstantS* instr) { | 2528 void LCodeGen::DoConstantS(LConstantS* instr) { |
2529 __ Mov(ToRegister(instr->result()), Operand(instr->value())); | 2529 __ Mov(ToRegister(instr->result()), Operand(instr->value())); |
2530 } | 2530 } |
2531 | 2531 |
2532 | 2532 |
2533 void LCodeGen::DoConstantT(LConstantT* instr) { | 2533 void LCodeGen::DoConstantT(LConstantT* instr) { |
2534 Handle<Object> value = instr->value(isolate()); | 2534 Handle<Object> object = instr->value(isolate()); |
2535 AllowDeferredHandleDereference smi_check; | 2535 AllowDeferredHandleDereference smi_check; |
2536 __ LoadObject(ToRegister(instr->result()), value); | 2536 if (instr->hydrogen()->HasObjectMap()) { |
| 2537 Handle<Map> object_map = instr->hydrogen()->ObjectMap().handle(); |
| 2538 CHECK(object->IsHeapObject()); |
| 2539 CHECK(!object_map->is_stable() || |
| 2540 *object_map == Handle<HeapObject>::cast(object)->map()); |
| 2541 } |
| 2542 __ LoadObject(ToRegister(instr->result()), object); |
2537 } | 2543 } |
2538 | 2544 |
2539 | 2545 |
2540 void LCodeGen::DoContext(LContext* instr) { | 2546 void LCodeGen::DoContext(LContext* instr) { |
2541 // If there is a non-return use, the context must be moved to a register. | 2547 // If there is a non-return use, the context must be moved to a register. |
2542 Register result = ToRegister(instr->result()); | 2548 Register result = ToRegister(instr->result()); |
2543 if (info()->IsOptimizing()) { | 2549 if (info()->IsOptimizing()) { |
2544 __ Ldr(result, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2550 __ Ldr(result, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2545 } else { | 2551 } else { |
2546 // If there is no frame, the context must be in cp. | 2552 // If there is no frame, the context must be in cp. |
(...skipping 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5945 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5951 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5946 // Index is equal to negated out of object property index plus 1. | 5952 // Index is equal to negated out of object property index plus 1. |
5947 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5953 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5948 __ Ldr(result, FieldMemOperand(result, | 5954 __ Ldr(result, FieldMemOperand(result, |
5949 FixedArray::kHeaderSize - kPointerSize)); | 5955 FixedArray::kHeaderSize - kPointerSize)); |
5950 __ Bind(deferred->exit()); | 5956 __ Bind(deferred->exit()); |
5951 __ Bind(&done); | 5957 __ Bind(&done); |
5952 } | 5958 } |
5953 | 5959 |
5954 } } // namespace v8::internal | 5960 } } // namespace v8::internal |
OLD | NEW |