OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 if (details.type() == CONSTANT) { | 387 if (details.type() == CONSTANT) { |
388 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); | 388 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); |
389 __ LoadObject(scratch1, constant); | 389 __ LoadObject(scratch1, constant); |
390 __ Cmp(value_reg, scratch1); | 390 __ Cmp(value_reg, scratch1); |
391 __ B(ne, miss_label); | 391 __ B(ne, miss_label); |
392 } else if (representation.IsSmi()) { | 392 } else if (representation.IsSmi()) { |
393 __ JumpIfNotSmi(value_reg, miss_label); | 393 __ JumpIfNotSmi(value_reg, miss_label); |
394 } else if (representation.IsHeapObject()) { | 394 } else if (representation.IsHeapObject()) { |
395 HeapType* field_type = descriptors->GetFieldType(descriptor); | 395 HeapType* field_type = descriptors->GetFieldType(descriptor); |
396 if (field_type->IsClass()) { | 396 if (field_type->IsClass()) { |
397 __ CheckMap(value_reg, scratch1, field_type->AsClass()->Map(), | 397 __ CheckMap(value_reg, scratch1, field_type->AsClass(), |
398 miss_label, DO_SMI_CHECK); | 398 miss_label, DO_SMI_CHECK); |
399 } else { | 399 } else { |
400 ASSERT(HeapType::Any()->Is(field_type)); | 400 ASSERT(HeapType::Any()->Is(field_type)); |
401 __ JumpIfSmi(value_reg, miss_label); | 401 __ JumpIfSmi(value_reg, miss_label); |
402 } | 402 } |
403 } else if (representation.IsDouble()) { | 403 } else if (representation.IsDouble()) { |
404 UseScratchRegisterScope temps(masm); | 404 UseScratchRegisterScope temps(masm); |
405 DoubleRegister temp_double = temps.AcquireD(); | 405 DoubleRegister temp_double = temps.AcquireD(); |
406 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); | 406 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); |
407 | 407 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 // object and the number of in-object properties is not going to change. | 543 // object and the number of in-object properties is not going to change. |
544 index -= object->map()->inobject_properties(); | 544 index -= object->map()->inobject_properties(); |
545 | 545 |
546 Representation representation = lookup->representation(); | 546 Representation representation = lookup->representation(); |
547 ASSERT(!representation.IsNone()); | 547 ASSERT(!representation.IsNone()); |
548 if (representation.IsSmi()) { | 548 if (representation.IsSmi()) { |
549 __ JumpIfNotSmi(value_reg, miss_label); | 549 __ JumpIfNotSmi(value_reg, miss_label); |
550 } else if (representation.IsHeapObject()) { | 550 } else if (representation.IsHeapObject()) { |
551 HeapType* field_type = lookup->GetFieldType(); | 551 HeapType* field_type = lookup->GetFieldType(); |
552 if (field_type->IsClass()) { | 552 if (field_type->IsClass()) { |
553 __ CheckMap(value_reg, scratch1, field_type->AsClass()->Map(), | 553 __ CheckMap(value_reg, scratch1, field_type->AsClass(), |
554 miss_label, DO_SMI_CHECK); | 554 miss_label, DO_SMI_CHECK); |
555 } else { | 555 } else { |
556 ASSERT(HeapType::Any()->Is(field_type)); | 556 ASSERT(HeapType::Any()->Is(field_type)); |
557 __ JumpIfSmi(value_reg, miss_label); | 557 __ JumpIfSmi(value_reg, miss_label); |
558 } | 558 } |
559 } else if (representation.IsDouble()) { | 559 } else if (representation.IsDouble()) { |
560 UseScratchRegisterScope temps(masm); | 560 UseScratchRegisterScope temps(masm); |
561 DoubleRegister temp_double = temps.AcquireD(); | 561 DoubleRegister temp_double = temps.AcquireD(); |
562 | 562 |
563 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); | 563 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 // object_reg and holder_reg registers can alias. | 795 // object_reg and holder_reg registers can alias. |
796 ASSERT(!AreAliased(object_reg, scratch1, scratch2)); | 796 ASSERT(!AreAliased(object_reg, scratch1, scratch2)); |
797 ASSERT(!AreAliased(holder_reg, scratch1, scratch2)); | 797 ASSERT(!AreAliased(holder_reg, scratch1, scratch2)); |
798 | 798 |
799 // Keep track of the current object in register reg. | 799 // Keep track of the current object in register reg. |
800 Register reg = object_reg; | 800 Register reg = object_reg; |
801 int depth = 0; | 801 int depth = 0; |
802 | 802 |
803 Handle<JSObject> current = Handle<JSObject>::null(); | 803 Handle<JSObject> current = Handle<JSObject>::null(); |
804 if (type->IsConstant()) { | 804 if (type->IsConstant()) { |
805 current = Handle<JSObject>::cast(type->AsConstant()->Value()); | 805 current = Handle<JSObject>::cast(type->AsConstant()); |
806 } | 806 } |
807 Handle<JSObject> prototype = Handle<JSObject>::null(); | 807 Handle<JSObject> prototype = Handle<JSObject>::null(); |
808 Handle<Map> current_map = receiver_map; | 808 Handle<Map> current_map = receiver_map; |
809 Handle<Map> holder_map(holder->map()); | 809 Handle<Map> holder_map(holder->map()); |
810 // Traverse the prototype chain and check the maps in the prototype chain for | 810 // Traverse the prototype chain and check the maps in the prototype chain for |
811 // fast and global objects or do negative lookup for normal objects. | 811 // fast and global objects or do negative lookup for normal objects. |
812 while (!current_map.is_identical_to(holder_map)) { | 812 while (!current_map.is_identical_to(holder_map)) { |
813 ++depth; | 813 ++depth; |
814 | 814 |
815 // Only global objects and objects that do not require access | 815 // Only global objects and objects that do not require access |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 | 1499 |
1500 // Miss case, call the runtime. | 1500 // Miss case, call the runtime. |
1501 __ Bind(&miss); | 1501 __ Bind(&miss); |
1502 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1502 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1503 } | 1503 } |
1504 | 1504 |
1505 | 1505 |
1506 } } // namespace v8::internal | 1506 } } // namespace v8::internal |
1507 | 1507 |
1508 #endif // V8_TARGET_ARCH_ARM64 | 1508 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |