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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2534 UNREACHABLE(); | 2534 UNREACHABLE(); |
2535 return kNoCondition; | 2535 return kNoCondition; |
2536 } | 2536 } |
2537 } | 2537 } |
2538 | 2538 |
2539 | 2539 |
2540 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2540 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
2541 DCHECK(ToRegister(instr->context()).is(cp)); | 2541 DCHECK(ToRegister(instr->context()).is(cp)); |
2542 Token::Value op = instr->op(); | 2542 Token::Value op = instr->op(); |
2543 | 2543 |
2544 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 2544 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); |
2545 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2545 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2546 | 2546 |
2547 Condition condition = ComputeCompareCondition(op); | 2547 Condition condition = ComputeCompareCondition(op); |
2548 | 2548 |
2549 EmitBranch(instr, condition, v0, Operand(zero_reg)); | 2549 EmitBranch(instr, condition, v0, Operand(zero_reg)); |
2550 } | 2550 } |
2551 | 2551 |
2552 | 2552 |
2553 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2553 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
2554 InstanceType from = instr->from(); | 2554 InstanceType from = instr->from(); |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2836 // Put the result value into the result register slot and | 2836 // Put the result value into the result register slot and |
2837 // restore all registers. | 2837 // restore all registers. |
2838 __ StoreToSafepointRegisterSlot(result, result); | 2838 __ StoreToSafepointRegisterSlot(result, result); |
2839 } | 2839 } |
2840 | 2840 |
2841 | 2841 |
2842 void LCodeGen::DoCmpT(LCmpT* instr) { | 2842 void LCodeGen::DoCmpT(LCmpT* instr) { |
2843 DCHECK(ToRegister(instr->context()).is(cp)); | 2843 DCHECK(ToRegister(instr->context()).is(cp)); |
2844 Token::Value op = instr->op(); | 2844 Token::Value op = instr->op(); |
2845 | 2845 |
2846 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 2846 Handle<Code> ic = |
| 2847 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); |
2847 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2848 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2848 // On MIPS there is no need for a "no inlined smi code" marker (nop). | 2849 // On MIPS there is no need for a "no inlined smi code" marker (nop). |
2849 | 2850 |
2850 Condition condition = ComputeCompareCondition(op); | 2851 Condition condition = ComputeCompareCondition(op); |
2851 // A minor optimization that relies on LoadRoot always emitting one | 2852 // A minor optimization that relies on LoadRoot always emitting one |
2852 // instruction. | 2853 // instruction. |
2853 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); | 2854 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); |
2854 Label done, check; | 2855 Label done, check; |
2855 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg)); | 2856 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg)); |
2856 __ bind(&check); | 2857 __ bind(&check); |
(...skipping 3205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6062 __ li(at, scope_info); | 6063 __ li(at, scope_info); |
6063 __ Push(at, ToRegister(instr->function())); | 6064 __ Push(at, ToRegister(instr->function())); |
6064 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6065 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6065 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6066 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6066 } | 6067 } |
6067 | 6068 |
6068 | 6069 |
6069 #undef __ | 6070 #undef __ |
6070 | 6071 |
6071 } } // namespace v8::internal | 6072 } } // namespace v8::internal |
OLD | NEW |