Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: src/runtime.cc

Issue 6596070: Fix several evaluation order sensitive GC-unsafe places. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 elms->set(VALUE_INDEX, *substr); 776 elms->set(VALUE_INDEX, *substr);
777 elms->set(WRITABLE_INDEX, Heap::false_value()); 777 elms->set(WRITABLE_INDEX, Heap::false_value());
778 elms->set(ENUMERABLE_INDEX, Heap::false_value()); 778 elms->set(ENUMERABLE_INDEX, Heap::false_value());
779 elms->set(CONFIGURABLE_INDEX, Heap::false_value()); 779 elms->set(CONFIGURABLE_INDEX, Heap::false_value());
780 return *desc; 780 return *desc;
781 } 781 }
782 782
783 case JSObject::INTERCEPTED_ELEMENT: 783 case JSObject::INTERCEPTED_ELEMENT:
784 case JSObject::FAST_ELEMENT: { 784 case JSObject::FAST_ELEMENT: {
785 elms->set(IS_ACCESSOR_INDEX, Heap::false_value()); 785 elms->set(IS_ACCESSOR_INDEX, Heap::false_value());
786 elms->set(VALUE_INDEX, *GetElement(obj, index)); 786 Handle<Object> value = GetElement(obj, index);
787 elms->set(VALUE_INDEX, *value);
787 elms->set(WRITABLE_INDEX, Heap::true_value()); 788 elms->set(WRITABLE_INDEX, Heap::true_value());
788 elms->set(ENUMERABLE_INDEX, Heap::true_value()); 789 elms->set(ENUMERABLE_INDEX, Heap::true_value());
789 elms->set(CONFIGURABLE_INDEX, Heap::true_value()); 790 elms->set(CONFIGURABLE_INDEX, Heap::true_value());
790 return *desc; 791 return *desc;
791 } 792 }
792 793
793 case JSObject::DICTIONARY_ELEMENT: { 794 case JSObject::DICTIONARY_ELEMENT: {
794 Handle<JSObject> holder = obj; 795 Handle<JSObject> holder = obj;
795 if (obj->IsJSGlobalProxy()) { 796 if (obj->IsJSGlobalProxy()) {
796 Object* proto = obj->GetPrototype(); 797 Object* proto = obj->GetPrototype();
(...skipping 12 matching lines...) Expand all
809 FixedArray::cast(dictionary->ValueAt(entry)); 810 FixedArray::cast(dictionary->ValueAt(entry));
810 elms->set(IS_ACCESSOR_INDEX, Heap::true_value()); 811 elms->set(IS_ACCESSOR_INDEX, Heap::true_value());
811 if (CheckElementAccess(*obj, index, v8::ACCESS_GET)) { 812 if (CheckElementAccess(*obj, index, v8::ACCESS_GET)) {
812 elms->set(GETTER_INDEX, callbacks->get(0)); 813 elms->set(GETTER_INDEX, callbacks->get(0));
813 } 814 }
814 if (CheckElementAccess(*obj, index, v8::ACCESS_SET)) { 815 if (CheckElementAccess(*obj, index, v8::ACCESS_SET)) {
815 elms->set(SETTER_INDEX, callbacks->get(1)); 816 elms->set(SETTER_INDEX, callbacks->get(1));
816 } 817 }
817 break; 818 break;
818 } 819 }
819 case NORMAL: 820 case NORMAL: {
820 // This is a data property. 821 // This is a data property.
821 elms->set(IS_ACCESSOR_INDEX, Heap::false_value()); 822 elms->set(IS_ACCESSOR_INDEX, Heap::false_value());
822 elms->set(VALUE_INDEX, *GetElement(obj, index)); 823 Handle<Object> value = GetElement(obj, index);
824 elms->set(VALUE_INDEX, *value);
823 elms->set(WRITABLE_INDEX, Heap::ToBoolean(!details.IsReadOnly())); 825 elms->set(WRITABLE_INDEX, Heap::ToBoolean(!details.IsReadOnly()));
824 break; 826 break;
827 }
825 default: 828 default:
826 UNREACHABLE(); 829 UNREACHABLE();
827 break; 830 break;
828 } 831 }
829 elms->set(ENUMERABLE_INDEX, Heap::ToBoolean(!details.IsDontEnum())); 832 elms->set(ENUMERABLE_INDEX, Heap::ToBoolean(!details.IsDontEnum()));
830 elms->set(CONFIGURABLE_INDEX, Heap::ToBoolean(!details.IsDontDelete())); 833 elms->set(CONFIGURABLE_INDEX, Heap::ToBoolean(!details.IsDontDelete()));
831 return *desc; 834 return *desc;
832 } 835 }
833 } 836 }
834 } 837 }
(...skipping 10461 matching lines...) Expand 10 before | Expand all | Expand 10 after
11296 } else { 11299 } else {
11297 // Handle last resort GC and make sure to allow future allocations 11300 // Handle last resort GC and make sure to allow future allocations
11298 // to grow the heap without causing GCs (if possible). 11301 // to grow the heap without causing GCs (if possible).
11299 Counters::gc_last_resort_from_js.Increment(); 11302 Counters::gc_last_resort_from_js.Increment();
11300 Heap::CollectAllGarbage(false); 11303 Heap::CollectAllGarbage(false);
11301 } 11304 }
11302 } 11305 }
11303 11306
11304 11307
11305 } } // namespace v8::internal 11308 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698