| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
| 8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/stub-cache.h" | 10 #include "src/stub-cache.h" |
| (...skipping 5475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5486 // TODO(3095996): Get rid of this. For now, we need to make the | 5486 // TODO(3095996): Get rid of this. For now, we need to make the |
| 5487 // result register contain a valid pointer because it is already | 5487 // result register contain a valid pointer because it is already |
| 5488 // contained in the register pointer map. | 5488 // contained in the register pointer map. |
| 5489 __ Mov(result, 0); | 5489 __ Mov(result, 0); |
| 5490 | 5490 |
| 5491 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5491 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
| 5492 __ Push(string); | 5492 __ Push(string); |
| 5493 // Push the index as a smi. This is safe because of the checks in | 5493 // Push the index as a smi. This is safe because of the checks in |
| 5494 // DoStringCharCodeAt above. | 5494 // DoStringCharCodeAt above. |
| 5495 Register index = ToRegister(instr->index()); | 5495 Register index = ToRegister(instr->index()); |
| 5496 __ SmiTag(index); | 5496 __ SmiTagAndPush(index); |
| 5497 __ Push(index); | |
| 5498 | 5497 |
| 5499 CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, instr, | 5498 CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, instr, |
| 5500 instr->context()); | 5499 instr->context()); |
| 5501 __ AssertSmi(x0); | 5500 __ AssertSmi(x0); |
| 5502 __ SmiUntag(x0); | 5501 __ SmiUntag(x0); |
| 5503 __ StoreToSafepointRegisterSlot(x0, result); | 5502 __ StoreToSafepointRegisterSlot(x0, result); |
| 5504 } | 5503 } |
| 5505 | 5504 |
| 5506 | 5505 |
| 5507 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { | 5506 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 5536 void LCodeGen::DoDeferredStringCharFromCode(LStringCharFromCode* instr) { | 5535 void LCodeGen::DoDeferredStringCharFromCode(LStringCharFromCode* instr) { |
| 5537 Register char_code = ToRegister(instr->char_code()); | 5536 Register char_code = ToRegister(instr->char_code()); |
| 5538 Register result = ToRegister(instr->result()); | 5537 Register result = ToRegister(instr->result()); |
| 5539 | 5538 |
| 5540 // TODO(3095996): Get rid of this. For now, we need to make the | 5539 // TODO(3095996): Get rid of this. For now, we need to make the |
| 5541 // result register contain a valid pointer because it is already | 5540 // result register contain a valid pointer because it is already |
| 5542 // contained in the register pointer map. | 5541 // contained in the register pointer map. |
| 5543 __ Mov(result, 0); | 5542 __ Mov(result, 0); |
| 5544 | 5543 |
| 5545 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5544 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
| 5546 __ SmiTag(char_code); | 5545 __ SmiTagAndPush(char_code); |
| 5547 __ Push(char_code); | |
| 5548 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); | 5546 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); |
| 5549 __ StoreToSafepointRegisterSlot(x0, result); | 5547 __ StoreToSafepointRegisterSlot(x0, result); |
| 5550 } | 5548 } |
| 5551 | 5549 |
| 5552 | 5550 |
| 5553 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 5551 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
| 5554 ASSERT(ToRegister(instr->context()).is(cp)); | 5552 ASSERT(ToRegister(instr->context()).is(cp)); |
| 5555 Token::Value op = instr->op(); | 5553 Token::Value op = instr->op(); |
| 5556 | 5554 |
| 5557 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); | 5555 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6034 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 6032 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 6035 // Index is equal to negated out of object property index plus 1. | 6033 // Index is equal to negated out of object property index plus 1. |
| 6036 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 6034 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 6037 __ Ldr(result, FieldMemOperand(result, | 6035 __ Ldr(result, FieldMemOperand(result, |
| 6038 FixedArray::kHeaderSize - kPointerSize)); | 6036 FixedArray::kHeaderSize - kPointerSize)); |
| 6039 __ Bind(deferred->exit()); | 6037 __ Bind(deferred->exit()); |
| 6040 __ Bind(&done); | 6038 __ Bind(&done); |
| 6041 } | 6039 } |
| 6042 | 6040 |
| 6043 } } // namespace v8::internal | 6041 } } // namespace v8::internal |
| OLD | NEW |