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 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3092 | 3092 |
3093 // Check the marker in the calling frame. | 3093 // Check the marker in the calling frame. |
3094 __ Bind(&check_frame_marker); | 3094 __ Bind(&check_frame_marker); |
3095 __ Ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset)); | 3095 __ Ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset)); |
3096 | 3096 |
3097 EmitCompareAndBranch( | 3097 EmitCompareAndBranch( |
3098 instr, eq, temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); | 3098 instr, eq, temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); |
3099 } | 3099 } |
3100 | 3100 |
3101 | 3101 |
3102 void LCodeGen::DoIsObjectAndBranch(LIsObjectAndBranch* instr) { | |
3103 Label* is_object = instr->TrueLabel(chunk_); | |
3104 Label* is_not_object = instr->FalseLabel(chunk_); | |
3105 Register value = ToRegister(instr->value()); | |
3106 Register map = ToRegister(instr->temp1()); | |
3107 Register scratch = ToRegister(instr->temp2()); | |
3108 | |
3109 __ JumpIfSmi(value, is_not_object); | |
3110 __ JumpIfRoot(value, Heap::kNullValueRootIndex, is_object); | |
3111 | |
3112 __ Ldr(map, FieldMemOperand(value, HeapObject::kMapOffset)); | |
3113 | |
3114 // Check for undetectable objects. | |
3115 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | |
3116 __ TestAndBranchIfAnySet(scratch, 1 << Map::kIsUndetectable, is_not_object); | |
3117 | |
3118 // Check that instance type is in object type range. | |
3119 __ IsInstanceJSObjectType(map, scratch, NULL); | |
3120 // Flags have been updated by IsInstanceJSObjectType. We can now test the | |
3121 // flags for "le" condition to check if the object's type is a valid | |
3122 // JS object type. | |
3123 EmitBranch(instr, le); | |
3124 } | |
3125 | |
3126 | |
3127 Condition LCodeGen::EmitIsString(Register input, | 3102 Condition LCodeGen::EmitIsString(Register input, |
3128 Register temp1, | 3103 Register temp1, |
3129 Label* is_not_string, | 3104 Label* is_not_string, |
3130 SmiCheck check_needed = INLINE_SMI_CHECK) { | 3105 SmiCheck check_needed = INLINE_SMI_CHECK) { |
3131 if (check_needed == INLINE_SMI_CHECK) { | 3106 if (check_needed == INLINE_SMI_CHECK) { |
3132 __ JumpIfSmi(input, is_not_string); | 3107 __ JumpIfSmi(input, is_not_string); |
3133 } | 3108 } |
3134 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); | 3109 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); |
3135 | 3110 |
3136 return lt; | 3111 return lt; |
(...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6070 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6045 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6071 __ Push(scope_info); | 6046 __ Push(scope_info); |
6072 __ Push(ToRegister(instr->function())); | 6047 __ Push(ToRegister(instr->function())); |
6073 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6048 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6074 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6049 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6075 } | 6050 } |
6076 | 6051 |
6077 | 6052 |
6078 } // namespace internal | 6053 } // namespace internal |
6079 } // namespace v8 | 6054 } // namespace v8 |
OLD | NEW |