| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 Context::BOOLEAN_FUNCTION_INDEX, | 126 Context::BOOLEAN_FUNCTION_INDEX, |
| 127 rcx); | 127 rcx); |
| 128 CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder, | 128 CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder, |
| 129 rbx, rdx, name, &miss); | 129 rbx, rdx, name, &miss); |
| 130 break; | 130 break; |
| 131 } | 131 } |
| 132 | 132 |
| 133 case JSARRAY_HAS_FAST_ELEMENTS_CHECK: | 133 case JSARRAY_HAS_FAST_ELEMENTS_CHECK: |
| 134 CheckPrototypes(JSObject::cast(object), rdx, holder, | 134 CheckPrototypes(JSObject::cast(object), rdx, holder, |
| 135 rbx, rcx, name, &miss); | 135 rbx, rcx, name, &miss); |
| 136 // Make sure object->elements()->map() != Heap::dictionary_array_map() | 136 // Make sure object->HasFastElements(). |
| 137 // Get the elements array of the object. | 137 // Get the elements array of the object. |
| 138 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); | 138 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); |
| 139 // Check that the object is in fast mode (not dictionary). | 139 // Check that the object is in fast mode (not dictionary). |
| 140 __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset), | 140 __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset), |
| 141 Factory::hash_table_map()); | 141 Factory::fixed_array_map()); |
| 142 __ j(equal, &miss); | 142 __ j(not_equal, &miss); |
| 143 break; | 143 break; |
| 144 | 144 |
| 145 default: | 145 default: |
| 146 UNREACHABLE(); | 146 UNREACHABLE(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 // Get the function and setup the context. | 149 // Get the function and setup the context. |
| 150 __ Move(rdi, Handle<JSFunction>(function)); | 150 __ Move(rdi, Handle<JSFunction>(function)); |
| 151 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); | 151 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
| 152 | 152 |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 | 897 |
| 898 // Return the value (register rax). | 898 // Return the value (register rax). |
| 899 __ ret(0); | 899 __ ret(0); |
| 900 } | 900 } |
| 901 | 901 |
| 902 | 902 |
| 903 #undef __ | 903 #undef __ |
| 904 | 904 |
| 905 | 905 |
| 906 } } // namespace v8::internal | 906 } } // namespace v8::internal |
| OLD | NEW |