OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 // Check that the maps starting from the prototype haven't changed. | 752 // Check that the maps starting from the prototype haven't changed. |
753 GenerateLoadGlobalFunctionPrototype(masm(), | 753 GenerateLoadGlobalFunctionPrototype(masm(), |
754 Context::BOOLEAN_FUNCTION_INDEX, | 754 Context::BOOLEAN_FUNCTION_INDEX, |
755 rax); | 755 rax); |
756 CheckPrototypes(JSObject::cast(object->GetPrototype()), rax, holder, | 756 CheckPrototypes(JSObject::cast(object->GetPrototype()), rax, holder, |
757 rbx, rdx, name, &miss); | 757 rbx, rdx, name, &miss); |
758 } | 758 } |
759 break; | 759 break; |
760 } | 760 } |
761 | 761 |
762 case JSARRAY_HAS_FAST_ELEMENTS_CHECK: | |
763 CheckPrototypes(JSObject::cast(object), rdx, holder, | |
764 rbx, rax, name, &miss); | |
765 // Make sure object->HasFastElements(). | |
766 // Get the elements array of the object. | |
767 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); | |
768 // Check that the object is in fast mode (not dictionary). | |
769 __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset), | |
770 Factory::fixed_array_map()); | |
771 __ j(not_equal, &miss); | |
772 break; | |
773 | |
774 default: | 762 default: |
775 UNREACHABLE(); | 763 UNREACHABLE(); |
776 } | 764 } |
777 | 765 |
778 __ InvokeFunction(function, arguments(), JUMP_FUNCTION); | 766 __ InvokeFunction(function, arguments(), JUMP_FUNCTION); |
779 | 767 |
780 // Handle call cache miss. | 768 // Handle call cache miss. |
781 __ bind(&miss); | 769 __ bind(&miss); |
782 Handle<Code> ic = ComputeCallMiss(arguments().immediate()); | 770 Handle<Code> ic = ComputeCallMiss(arguments().immediate()); |
783 __ Jump(ic, RelocInfo::CODE_TARGET); | 771 __ Jump(ic, RelocInfo::CODE_TARGET); |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1853 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 1841 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
1854 | 1842 |
1855 // Return the generated code. | 1843 // Return the generated code. |
1856 return GetCode(); | 1844 return GetCode(); |
1857 } | 1845 } |
1858 | 1846 |
1859 | 1847 |
1860 #undef __ | 1848 #undef __ |
1861 | 1849 |
1862 } } // namespace v8::internal | 1850 } } // namespace v8::internal |
OLD | NEW |