OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 Context::BOOLEAN_FUNCTION_INDEX, | 673 Context::BOOLEAN_FUNCTION_INDEX, |
674 ecx); | 674 ecx); |
675 CheckPrototypes(JSObject::cast(object->GetPrototype()), ecx, holder, | 675 CheckPrototypes(JSObject::cast(object->GetPrototype()), ecx, holder, |
676 ebx, edx, name, &miss); | 676 ebx, edx, name, &miss); |
677 break; | 677 break; |
678 } | 678 } |
679 | 679 |
680 case JSARRAY_HAS_FAST_ELEMENTS_CHECK: | 680 case JSARRAY_HAS_FAST_ELEMENTS_CHECK: |
681 CheckPrototypes(JSObject::cast(object), edx, holder, | 681 CheckPrototypes(JSObject::cast(object), edx, holder, |
682 ebx, ecx, name, &miss); | 682 ebx, ecx, name, &miss); |
683 // Make sure object->elements()->map() != Heap::dictionary_array_map() | 683 // Make sure object->HasFastElements(). |
684 // Get the elements array of the object. | 684 // Get the elements array of the object. |
685 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); | 685 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); |
686 // Check that the object is in fast mode (not dictionary). | 686 // Check that the object is in fast mode (not dictionary). |
687 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), | 687 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), |
688 Immediate(Factory::hash_table_map())); | 688 Immediate(Factory::fixed_array_map())); |
689 __ j(equal, &miss, not_taken); | 689 __ j(not_equal, &miss, not_taken); |
690 break; | 690 break; |
691 | 691 |
692 default: | 692 default: |
693 UNREACHABLE(); | 693 UNREACHABLE(); |
694 } | 694 } |
695 | 695 |
696 // Get the function and setup the context. | 696 // Get the function and setup the context. |
697 __ mov(edi, Immediate(Handle<JSFunction>(function))); | 697 __ mov(edi, Immediate(Handle<JSFunction>(function))); |
698 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); | 698 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); |
699 | 699 |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 1424 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
1425 | 1425 |
1426 // Return the generated code. | 1426 // Return the generated code. |
1427 return GetCode(CALLBACKS, name); | 1427 return GetCode(CALLBACKS, name); |
1428 } | 1428 } |
1429 | 1429 |
1430 | 1430 |
1431 #undef __ | 1431 #undef __ |
1432 | 1432 |
1433 } } // namespace v8::internal | 1433 } } // namespace v8::internal |
OLD | NEW |