| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/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 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2664 UNREACHABLE(); | 2664 UNREACHABLE(); |
| 2665 return kNoCondition; | 2665 return kNoCondition; |
| 2666 } | 2666 } |
| 2667 } | 2667 } |
| 2668 | 2668 |
| 2669 | 2669 |
| 2670 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2670 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
| 2671 DCHECK(ToRegister(instr->context()).is(cp)); | 2671 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2672 Token::Value op = instr->op(); | 2672 Token::Value op = instr->op(); |
| 2673 | 2673 |
| 2674 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 2674 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); |
| 2675 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2675 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2676 // This instruction also signals no smi code inlined | 2676 // This instruction also signals no smi code inlined |
| 2677 __ cmpi(r3, Operand::Zero()); | 2677 __ cmpi(r3, Operand::Zero()); |
| 2678 | 2678 |
| 2679 Condition condition = ComputeCompareCondition(op); | 2679 Condition condition = ComputeCompareCondition(op); |
| 2680 | 2680 |
| 2681 EmitBranch(instr, condition); | 2681 EmitBranch(instr, condition); |
| 2682 } | 2682 } |
| 2683 | 2683 |
| 2684 | 2684 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2971 // Put the result value (r3) into the result register slot and | 2971 // Put the result value (r3) into the result register slot and |
| 2972 // restore all registers. | 2972 // restore all registers. |
| 2973 __ StoreToSafepointRegisterSlot(r3, ToRegister(instr->result())); | 2973 __ StoreToSafepointRegisterSlot(r3, ToRegister(instr->result())); |
| 2974 } | 2974 } |
| 2975 | 2975 |
| 2976 | 2976 |
| 2977 void LCodeGen::DoCmpT(LCmpT* instr) { | 2977 void LCodeGen::DoCmpT(LCmpT* instr) { |
| 2978 DCHECK(ToRegister(instr->context()).is(cp)); | 2978 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2979 Token::Value op = instr->op(); | 2979 Token::Value op = instr->op(); |
| 2980 | 2980 |
| 2981 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 2981 Handle<Code> ic = |
| 2982 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); |
| 2982 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2983 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2983 // This instruction also signals no smi code inlined | 2984 // This instruction also signals no smi code inlined |
| 2984 __ cmpi(r3, Operand::Zero()); | 2985 __ cmpi(r3, Operand::Zero()); |
| 2985 | 2986 |
| 2986 Condition condition = ComputeCompareCondition(op); | 2987 Condition condition = ComputeCompareCondition(op); |
| 2987 if (CpuFeatures::IsSupported(ISELECT)) { | 2988 if (CpuFeatures::IsSupported(ISELECT)) { |
| 2988 __ LoadRoot(r4, Heap::kTrueValueRootIndex); | 2989 __ LoadRoot(r4, Heap::kTrueValueRootIndex); |
| 2989 __ LoadRoot(r5, Heap::kFalseValueRootIndex); | 2990 __ LoadRoot(r5, Heap::kFalseValueRootIndex); |
| 2990 __ isel(condition, ToRegister(instr->result()), r4, r5); | 2991 __ isel(condition, ToRegister(instr->result()), r4, r5); |
| 2991 } else { | 2992 } else { |
| (...skipping 3223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6215 __ Push(scope_info); | 6216 __ Push(scope_info); |
| 6216 __ push(ToRegister(instr->function())); | 6217 __ push(ToRegister(instr->function())); |
| 6217 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6218 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6218 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6219 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6219 } | 6220 } |
| 6220 | 6221 |
| 6221 | 6222 |
| 6222 #undef __ | 6223 #undef __ |
| 6223 } | 6224 } |
| 6224 } // namespace v8::internal | 6225 } // namespace v8::internal |
| OLD | NEW |