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/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-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 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3010 __ InvokeFunction(x1, no_reg, count, CALL_FUNCTION, generator); | 3010 __ InvokeFunction(x1, no_reg, count, CALL_FUNCTION, generator); |
3011 } else { | 3011 } else { |
3012 CallKnownFunction(known_function, | 3012 CallKnownFunction(known_function, |
3013 instr->hydrogen()->formal_parameter_count(), | 3013 instr->hydrogen()->formal_parameter_count(), |
3014 instr->arity(), instr); | 3014 instr->arity(), instr); |
3015 } | 3015 } |
3016 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | 3016 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); |
3017 } | 3017 } |
3018 | 3018 |
3019 | 3019 |
3020 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { | |
3021 Register temp1 = ToRegister(instr->temp1()); | |
3022 Register temp2 = ToRegister(instr->temp2()); | |
3023 | |
3024 // Get the frame pointer for the calling frame. | |
3025 __ Ldr(temp1, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
3026 | |
3027 // Skip the arguments adaptor frame if it exists. | |
3028 Label check_frame_marker; | |
3029 __ Ldr(temp2, MemOperand(temp1, StandardFrameConstants::kContextOffset)); | |
3030 __ Cmp(temp2, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | |
3031 __ B(ne, &check_frame_marker); | |
3032 __ Ldr(temp1, MemOperand(temp1, StandardFrameConstants::kCallerFPOffset)); | |
3033 | |
3034 // Check the marker in the calling frame. | |
3035 __ Bind(&check_frame_marker); | |
3036 __ Ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset)); | |
3037 | |
3038 EmitCompareAndBranch( | |
3039 instr, eq, temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); | |
3040 } | |
3041 | |
3042 | |
3043 Condition LCodeGen::EmitIsString(Register input, | 3020 Condition LCodeGen::EmitIsString(Register input, |
3044 Register temp1, | 3021 Register temp1, |
3045 Label* is_not_string, | 3022 Label* is_not_string, |
3046 SmiCheck check_needed = INLINE_SMI_CHECK) { | 3023 SmiCheck check_needed = INLINE_SMI_CHECK) { |
3047 if (check_needed == INLINE_SMI_CHECK) { | 3024 if (check_needed == INLINE_SMI_CHECK) { |
3048 __ JumpIfSmi(input, is_not_string); | 3025 __ JumpIfSmi(input, is_not_string); |
3049 } | 3026 } |
3050 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); | 3027 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); |
3051 | 3028 |
3052 return lt; | 3029 return lt; |
(...skipping 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5895 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5872 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5896 __ Push(scope_info); | 5873 __ Push(scope_info); |
5897 __ Push(ToRegister(instr->function())); | 5874 __ Push(ToRegister(instr->function())); |
5898 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5875 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5899 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5876 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5900 } | 5877 } |
5901 | 5878 |
5902 | 5879 |
5903 } // namespace internal | 5880 } // namespace internal |
5904 } // namespace v8 | 5881 } // namespace v8 |
OLD | NEW |