| 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 #if V8_TARGET_ARCH_ARM64 |    5 #if V8_TARGET_ARCH_ARM64 | 
|    6  |    6  | 
|    7 #include "src/codegen.h" |    7 #include "src/codegen.h" | 
|    8 #include "src/ic/ic.h" |    8 #include "src/ic/ic.h" | 
|    9 #include "src/ic/ic-compiler.h" |    9 #include "src/ic/ic-compiler.h" | 
|   10 #include "src/ic/stub-cache.h" |   10 #include "src/ic/stub-cache.h" | 
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  174   __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |  174   __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 
|  175   __ AssertFastElements(elements); |  175   __ AssertFastElements(elements); | 
|  176  |  176  | 
|  177   // Check that the key (index) is within bounds. |  177   // Check that the key (index) is within bounds. | 
|  178   __ Ldr(scratch1, FieldMemOperand(elements, FixedArray::kLengthOffset)); |  178   __ Ldr(scratch1, FieldMemOperand(elements, FixedArray::kLengthOffset)); | 
|  179   __ Cmp(key, scratch1); |  179   __ Cmp(key, scratch1); | 
|  180   __ B(lo, &in_bounds); |  180   __ B(lo, &in_bounds); | 
|  181  |  181  | 
|  182   // Out of bounds. Check the prototype chain to see if we can just return |  182   // Out of bounds. Check the prototype chain to see if we can just return | 
|  183   // 'undefined'. |  183   // 'undefined'. | 
|  184   __ Cmp(key, Operand(Smi::FromInt(0))); |  184   __ Cmp(key, Operand(Smi::kZero)); | 
|  185   __ B(lt, slow);  // Negative keys can't take the fast OOB path. |  185   __ B(lt, slow);  // Negative keys can't take the fast OOB path. | 
|  186   __ Bind(&check_prototypes); |  186   __ Bind(&check_prototypes); | 
|  187   __ Ldr(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset)); |  187   __ Ldr(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 
|  188   __ Bind(&check_next_prototype); |  188   __ Bind(&check_next_prototype); | 
|  189   __ Ldr(scratch2, FieldMemOperand(scratch2, Map::kPrototypeOffset)); |  189   __ Ldr(scratch2, FieldMemOperand(scratch2, Map::kPrototypeOffset)); | 
|  190   // scratch2: current prototype |  190   // scratch2: current prototype | 
|  191   __ JumpIfRoot(scratch2, Heap::kNullValueRootIndex, &absent); |  191   __ JumpIfRoot(scratch2, Heap::kNullValueRootIndex, &absent); | 
|  192   __ Ldr(elements, FieldMemOperand(scratch2, JSObject::kElementsOffset)); |  192   __ Ldr(elements, FieldMemOperand(scratch2, JSObject::kElementsOffset)); | 
|  193   __ Ldr(scratch2, FieldMemOperand(scratch2, HeapObject::kMapOffset)); |  193   __ Ldr(scratch2, FieldMemOperand(scratch2, HeapObject::kMapOffset)); | 
|  194   // elements: elements of current prototype |  194   // elements: elements of current prototype | 
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  844   } else { |  844   } else { | 
|  845     DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); |  845     DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); | 
|  846     // This is JumpIfSmi(smi_reg, branch_imm). |  846     // This is JumpIfSmi(smi_reg, branch_imm). | 
|  847     patcher.tbz(smi_reg, 0, branch_imm); |  847     patcher.tbz(smi_reg, 0, branch_imm); | 
|  848   } |  848   } | 
|  849 } |  849 } | 
|  850 }  // namespace internal |  850 }  // namespace internal | 
|  851 }  // namespace v8 |  851 }  // namespace v8 | 
|  852  |  852  | 
|  853 #endif  // V8_TARGET_ARCH_ARM64 |  853 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW |