| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 // Check that the object isn't a smi. | 391 // Check that the object isn't a smi. |
| 392 __ test(receiver_reg, Immediate(kSmiTagMask)); | 392 __ test(receiver_reg, Immediate(kSmiTagMask)); |
| 393 __ j(zero, miss_label, not_taken); | 393 __ j(zero, miss_label, not_taken); |
| 394 | 394 |
| 395 // Check that the map of the object hasn't changed. | 395 // Check that the map of the object hasn't changed. |
| 396 __ cmp(FieldOperand(receiver_reg, HeapObject::kMapOffset), | 396 __ cmp(FieldOperand(receiver_reg, HeapObject::kMapOffset), |
| 397 Immediate(Handle<Map>(object->map()))); | 397 Immediate(Handle<Map>(object->map()))); |
| 398 __ j(not_equal, miss_label, not_taken); | 398 __ j(not_equal, miss_label, not_taken); |
| 399 | 399 |
| 400 // Perform global security token check if needed. | 400 // Perform global security token check if needed. |
| 401 if (object->IsJSGlobalObject()) { | 401 if (object->IsJSGlobalProxy()) { |
| 402 __ CheckAccessGlobal(receiver_reg, scratch, miss_label); | 402 __ CheckAccessGlobalProxy(receiver_reg, scratch, miss_label); |
| 403 } | 403 } |
| 404 | 404 |
| 405 // Stub never generated for non-global objects that require access | 405 // Stub never generated for non-global objects that require access |
| 406 // checks. | 406 // checks. |
| 407 ASSERT(object->IsJSGlobalObject() || !object->IsAccessCheckNeeded()); | 407 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
| 408 | 408 |
| 409 // Perform map transition for the receiver if necessary. | 409 // Perform map transition for the receiver if necessary. |
| 410 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { | 410 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { |
| 411 // The properties must be extended before we can store the value. | 411 // The properties must be extended before we can store the value. |
| 412 // We jump to a runtime call that extends the propeties array. | 412 // We jump to a runtime call that extends the propeties array. |
| 413 __ mov(Operand(ecx), Immediate(Handle<Map>(transition))); | 413 __ mov(Operand(ecx), Immediate(Handle<Map>(transition))); |
| 414 Handle<Code> ic(Builtins::builtin(storage_extend)); | 414 Handle<Code> ic(Builtins::builtin(storage_extend)); |
| 415 __ jmp(ic, RelocInfo::CODE_TARGET); | 415 __ jmp(ic, RelocInfo::CODE_TARGET); |
| 416 return; | 416 return; |
| 417 } | 417 } |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 // Check that the object isn't a smi. | 766 // Check that the object isn't a smi. |
| 767 __ test(ebx, Immediate(kSmiTagMask)); | 767 __ test(ebx, Immediate(kSmiTagMask)); |
| 768 __ j(zero, &miss, not_taken); | 768 __ j(zero, &miss, not_taken); |
| 769 | 769 |
| 770 // Check that the map of the object hasn't changed. | 770 // Check that the map of the object hasn't changed. |
| 771 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), | 771 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), |
| 772 Immediate(Handle<Map>(object->map()))); | 772 Immediate(Handle<Map>(object->map()))); |
| 773 __ j(not_equal, &miss, not_taken); | 773 __ j(not_equal, &miss, not_taken); |
| 774 | 774 |
| 775 // Perform global security token check if needed. | 775 // Perform global security token check if needed. |
| 776 if (object->IsJSGlobalObject()) { | 776 if (object->IsJSGlobalProxy()) { |
| 777 __ CheckAccessGlobal(ebx, edx, &miss); | 777 __ CheckAccessGlobalProxy(ebx, edx, &miss); |
| 778 } | 778 } |
| 779 | 779 |
| 780 // Stub never generated for non-global objects that require access | 780 // Stub never generated for non-global objects that require access |
| 781 // checks. | 781 // checks. |
| 782 ASSERT(object->IsJSGlobalObject() || !object->IsAccessCheckNeeded()); | 782 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
| 783 | 783 |
| 784 __ pop(ebx); // remove the return address | 784 __ pop(ebx); // remove the return address |
| 785 __ push(Operand(esp, 0)); // receiver | 785 __ push(Operand(esp, 0)); // receiver |
| 786 __ push(Immediate(Handle<AccessorInfo>(callback))); // callback info | 786 __ push(Immediate(Handle<AccessorInfo>(callback))); // callback info |
| 787 __ push(ecx); // name | 787 __ push(ecx); // name |
| 788 __ push(eax); // value | 788 __ push(eax); // value |
| 789 __ push(ebx); // restore return address | 789 __ push(ebx); // restore return address |
| 790 | 790 |
| 791 // Do tail-call to the runtime system. | 791 // Do tail-call to the runtime system. |
| 792 ExternalReference store_callback_property = | 792 ExternalReference store_callback_property = |
| (...skipping 29 matching lines...) Expand all Loading... |
| 822 // Check that the object isn't a smi. | 822 // Check that the object isn't a smi. |
| 823 __ test(ebx, Immediate(kSmiTagMask)); | 823 __ test(ebx, Immediate(kSmiTagMask)); |
| 824 __ j(zero, &miss, not_taken); | 824 __ j(zero, &miss, not_taken); |
| 825 | 825 |
| 826 // Check that the map of the object hasn't changed. | 826 // Check that the map of the object hasn't changed. |
| 827 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), | 827 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), |
| 828 Immediate(Handle<Map>(receiver->map()))); | 828 Immediate(Handle<Map>(receiver->map()))); |
| 829 __ j(not_equal, &miss, not_taken); | 829 __ j(not_equal, &miss, not_taken); |
| 830 | 830 |
| 831 // Perform global security token check if needed. | 831 // Perform global security token check if needed. |
| 832 if (receiver->IsJSGlobalObject()) { | 832 if (receiver->IsJSGlobalProxy()) { |
| 833 __ CheckAccessGlobal(ebx, edx, &miss); | 833 __ CheckAccessGlobalProxy(ebx, edx, &miss); |
| 834 } | 834 } |
| 835 | 835 |
| 836 // Stub never generated for non-global objects that require access | 836 // Stub never generated for non-global objects that require access |
| 837 // checks. | 837 // checks. |
| 838 ASSERT(receiver->IsJSGlobalObject() || !receiver->IsAccessCheckNeeded()); | 838 ASSERT(receiver->IsJSGlobalProxy() || !receiver->IsAccessCheckNeeded()); |
| 839 | 839 |
| 840 __ pop(ebx); // remove the return address | 840 __ pop(ebx); // remove the return address |
| 841 __ push(Operand(esp, 0)); // receiver | 841 __ push(Operand(esp, 0)); // receiver |
| 842 __ push(ecx); // name | 842 __ push(ecx); // name |
| 843 __ push(eax); // value | 843 __ push(eax); // value |
| 844 __ push(ebx); // restore return address | 844 __ push(ebx); // restore return address |
| 845 | 845 |
| 846 // Do tail-call to the runtime system. | 846 // Do tail-call to the runtime system. |
| 847 ExternalReference store_ic_property = | 847 ExternalReference store_ic_property = |
| 848 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); | 848 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 1244 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| 1245 | 1245 |
| 1246 // Return the generated code. | 1246 // Return the generated code. |
| 1247 return GetCode(CALLBACKS); | 1247 return GetCode(CALLBACKS); |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 | 1250 |
| 1251 #undef __ | 1251 #undef __ |
| 1252 | 1252 |
| 1253 } } // namespace v8::internal | 1253 } } // namespace v8::internal |
| OLD | NEW |