OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/arm/lithium-codegen-arm.h" | 5 #include "src/arm/lithium-codegen-arm.h" |
6 #include "src/arm/lithium-gap-resolver-arm.h" | 6 #include "src/arm/lithium-gap-resolver-arm.h" |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 case CodeStub::RegExpExec: { | 1058 case CodeStub::RegExpExec: { |
1059 RegExpExecStub stub(isolate()); | 1059 RegExpExecStub stub(isolate()); |
1060 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 1060 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
1061 break; | 1061 break; |
1062 } | 1062 } |
1063 case CodeStub::SubString: { | 1063 case CodeStub::SubString: { |
1064 SubStringStub stub(isolate()); | 1064 SubStringStub stub(isolate()); |
1065 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 1065 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
1066 break; | 1066 break; |
1067 } | 1067 } |
1068 case CodeStub::StringCompare: { | |
1069 StringCompareStub stub(isolate()); | |
1070 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
1071 break; | |
1072 } | |
1073 default: | 1068 default: |
1074 UNREACHABLE(); | 1069 UNREACHABLE(); |
1075 } | 1070 } |
1076 } | 1071 } |
1077 | 1072 |
1078 | 1073 |
1079 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 1074 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
1080 GenerateOsrPrologue(); | 1075 GenerateOsrPrologue(); |
1081 } | 1076 } |
1082 | 1077 |
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2527 return ge; | 2522 return ge; |
2528 default: | 2523 default: |
2529 UNREACHABLE(); | 2524 UNREACHABLE(); |
2530 return kNoCondition; | 2525 return kNoCondition; |
2531 } | 2526 } |
2532 } | 2527 } |
2533 | 2528 |
2534 | 2529 |
2535 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2530 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
2536 DCHECK(ToRegister(instr->context()).is(cp)); | 2531 DCHECK(ToRegister(instr->context()).is(cp)); |
2537 Token::Value op = instr->op(); | 2532 DCHECK(ToRegister(instr->left()).is(r1)); |
| 2533 DCHECK(ToRegister(instr->right()).is(r0)); |
2538 | 2534 |
2539 Handle<Code> ic = | 2535 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
2540 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code(); | 2536 CallCode(code, RelocInfo::CODE_TARGET, instr); |
2541 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
2542 // This instruction also signals no smi code inlined. | |
2543 __ cmp(r0, Operand::Zero()); | 2537 __ cmp(r0, Operand::Zero()); |
2544 | 2538 |
2545 Condition condition = ComputeCompareCondition(op); | 2539 EmitBranch(instr, ComputeCompareCondition(instr->op())); |
2546 | |
2547 EmitBranch(instr, condition); | |
2548 } | 2540 } |
2549 | 2541 |
2550 | 2542 |
2551 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2543 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
2552 InstanceType from = instr->from(); | 2544 InstanceType from = instr->from(); |
2553 InstanceType to = instr->to(); | 2545 InstanceType to = instr->to(); |
2554 if (from == FIRST_TYPE) return to; | 2546 if (from == FIRST_TYPE) return to; |
2555 DCHECK(from == to || to == LAST_TYPE); | 2547 DCHECK(from == to || to == LAST_TYPE); |
2556 return from; | 2548 return from; |
2557 } | 2549 } |
(...skipping 3292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5850 __ push(ToRegister(instr->function())); | 5842 __ push(ToRegister(instr->function())); |
5851 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5843 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5852 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5844 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5853 } | 5845 } |
5854 | 5846 |
5855 | 5847 |
5856 #undef __ | 5848 #undef __ |
5857 | 5849 |
5858 } // namespace internal | 5850 } // namespace internal |
5859 } // namespace v8 | 5851 } // namespace v8 |
OLD | NEW |