| 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 KeyCollectionType type) { | 635 KeyCollectionType type) { |
| 636 Handle<FixedArray> content = Factory::empty_fixed_array(); | 636 Handle<FixedArray> content = Factory::empty_fixed_array(); |
| 637 Handle<JSObject> arguments_boilerplate = | 637 Handle<JSObject> arguments_boilerplate = |
| 638 Handle<JSObject>( | 638 Handle<JSObject>( |
| 639 Isolate::Current()->context()->global_context()-> | 639 Isolate::Current()->context()->global_context()-> |
| 640 arguments_boilerplate()); | 640 arguments_boilerplate()); |
| 641 Handle<JSFunction> arguments_function = | 641 Handle<JSFunction> arguments_function = |
| 642 Handle<JSFunction>( | 642 Handle<JSFunction>( |
| 643 JSFunction::cast(arguments_boilerplate->map()->constructor())); | 643 JSFunction::cast(arguments_boilerplate->map()->constructor())); |
| 644 | 644 |
| 645 Heap* heap = HEAP; |
| 645 // Only collect keys if access is permitted. | 646 // Only collect keys if access is permitted. |
| 646 for (Handle<Object> p = object; | 647 for (Handle<Object> p = object; |
| 647 *p != HEAP->null_value(); | 648 *p != heap->null_value(); |
| 648 p = Handle<Object>(p->GetPrototype())) { | 649 p = Handle<Object>(p->GetPrototype())) { |
| 649 Handle<JSObject> current(JSObject::cast(*p)); | 650 Handle<JSObject> current(JSObject::cast(*p)); |
| 650 | 651 |
| 651 // Check access rights if required. | 652 // Check access rights if required. |
| 652 if (current->IsAccessCheckNeeded() && | 653 if (current->IsAccessCheckNeeded() && |
| 653 !Isolate::Current()->MayNamedAccess(*current, HEAP->undefined_value(), | 654 !Isolate::Current()->MayNamedAccess(*current, HEAP->undefined_value(), |
| 654 v8::ACCESS_KEYS)) { | 655 v8::ACCESS_KEYS)) { |
| 655 Isolate::Current()->ReportFailedAccessCheck(*current, v8::ACCESS_KEYS); | 656 Isolate::Current()->ReportFailedAccessCheck(*current, v8::ACCESS_KEYS); |
| 656 break; | 657 break; |
| 657 } | 658 } |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 | 829 |
| 829 OptimizedObjectForAddingMultipleProperties:: | 830 OptimizedObjectForAddingMultipleProperties:: |
| 830 ~OptimizedObjectForAddingMultipleProperties() { | 831 ~OptimizedObjectForAddingMultipleProperties() { |
| 831 // Reoptimize the object to allow fast property access. | 832 // Reoptimize the object to allow fast property access. |
| 832 if (has_been_transformed_) { | 833 if (has_been_transformed_) { |
| 833 TransformToFastProperties(object_, unused_property_fields_); | 834 TransformToFastProperties(object_, unused_property_fields_); |
| 834 } | 835 } |
| 835 } | 836 } |
| 836 | 837 |
| 837 } } // namespace v8::internal | 838 } } // namespace v8::internal |
| OLD | NEW |