| 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/arm64/frames-arm64.h" | 5 #include "src/arm64/frames-arm64.h" |
| 6 #include "src/arm64/lithium-codegen-arm64.h" | 6 #include "src/arm64/lithium-codegen-arm64.h" |
| 7 #include "src/arm64/lithium-gap-resolver-arm64.h" | 7 #include "src/arm64/lithium-gap-resolver-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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2091 case CodeStub::RegExpExec: { | 2091 case CodeStub::RegExpExec: { |
| 2092 RegExpExecStub stub(isolate()); | 2092 RegExpExecStub stub(isolate()); |
| 2093 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 2093 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2094 break; | 2094 break; |
| 2095 } | 2095 } |
| 2096 case CodeStub::SubString: { | 2096 case CodeStub::SubString: { |
| 2097 SubStringStub stub(isolate()); | 2097 SubStringStub stub(isolate()); |
| 2098 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 2098 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2099 break; | 2099 break; |
| 2100 } | 2100 } |
| 2101 case CodeStub::StringCompare: { | |
| 2102 StringCompareStub stub(isolate()); | |
| 2103 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
| 2104 break; | |
| 2105 } | |
| 2106 default: | 2101 default: |
| 2107 UNREACHABLE(); | 2102 UNREACHABLE(); |
| 2108 } | 2103 } |
| 2109 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | 2104 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); |
| 2110 } | 2105 } |
| 2111 | 2106 |
| 2112 | 2107 |
| 2113 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 2108 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
| 2114 GenerateOsrPrologue(); | 2109 GenerateOsrPrologue(); |
| 2115 } | 2110 } |
| (...skipping 3380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5496 | 5491 |
| 5497 PushSafepointRegistersScope scope(this); | 5492 PushSafepointRegistersScope scope(this); |
| 5498 __ SmiTagAndPush(char_code); | 5493 __ SmiTagAndPush(char_code); |
| 5499 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); | 5494 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); |
| 5500 __ StoreToSafepointRegisterSlot(x0, result); | 5495 __ StoreToSafepointRegisterSlot(x0, result); |
| 5501 } | 5496 } |
| 5502 | 5497 |
| 5503 | 5498 |
| 5504 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 5499 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
| 5505 DCHECK(ToRegister(instr->context()).is(cp)); | 5500 DCHECK(ToRegister(instr->context()).is(cp)); |
| 5506 Token::Value op = instr->op(); | 5501 DCHECK(ToRegister(instr->left()).is(x1)); |
| 5502 DCHECK(ToRegister(instr->right()).is(x0)); |
| 5507 | 5503 |
| 5508 Handle<Code> ic = | 5504 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
| 5509 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code(); | 5505 CallCode(code, RelocInfo::CODE_TARGET, instr); |
| 5510 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
| 5511 InlineSmiCheckInfo::EmitNotInlined(masm()); | |
| 5512 | 5506 |
| 5513 Condition condition = TokenToCondition(op, false); | 5507 EmitCompareAndBranch(instr, TokenToCondition(instr->op(), false), x0, 0); |
| 5514 | |
| 5515 EmitCompareAndBranch(instr, condition, x0, 0); | |
| 5516 } | 5508 } |
| 5517 | 5509 |
| 5518 | 5510 |
| 5519 void LCodeGen::DoSubI(LSubI* instr) { | 5511 void LCodeGen::DoSubI(LSubI* instr) { |
| 5520 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); | 5512 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); |
| 5521 Register result = ToRegister32(instr->result()); | 5513 Register result = ToRegister32(instr->result()); |
| 5522 Register left = ToRegister32(instr->left()); | 5514 Register left = ToRegister32(instr->left()); |
| 5523 Operand right = ToShiftedRightOperand32(instr->right(), instr); | 5515 Operand right = ToShiftedRightOperand32(instr->right(), instr); |
| 5524 | 5516 |
| 5525 if (can_overflow) { | 5517 if (can_overflow) { |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6020 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6012 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 6021 __ Push(scope_info); | 6013 __ Push(scope_info); |
| 6022 __ Push(ToRegister(instr->function())); | 6014 __ Push(ToRegister(instr->function())); |
| 6023 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6015 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6024 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6016 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6025 } | 6017 } |
| 6026 | 6018 |
| 6027 | 6019 |
| 6028 } // namespace internal | 6020 } // namespace internal |
| 6029 } // namespace v8 | 6021 } // namespace v8 |
| OLD | NEW |