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

Side by Side Diff: src/heap.cc

Issue 7172030: Revert "Merge arguments branch to bleeding merge." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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/heap.h ('k') | src/heap-profiler.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 if (!maybe_obj->ToObject(&obj)) return false; 1842 if (!maybe_obj->ToObject(&obj)) return false;
1843 } 1843 }
1844 set_external_unsigned_int_array_map(Map::cast(obj)); 1844 set_external_unsigned_int_array_map(Map::cast(obj));
1845 1845
1846 { MaybeObject* maybe_obj = AllocateMap(EXTERNAL_FLOAT_ARRAY_TYPE, 1846 { MaybeObject* maybe_obj = AllocateMap(EXTERNAL_FLOAT_ARRAY_TYPE,
1847 ExternalArray::kAlignedSize); 1847 ExternalArray::kAlignedSize);
1848 if (!maybe_obj->ToObject(&obj)) return false; 1848 if (!maybe_obj->ToObject(&obj)) return false;
1849 } 1849 }
1850 set_external_float_array_map(Map::cast(obj)); 1850 set_external_float_array_map(Map::cast(obj));
1851 1851
1852 { MaybeObject* maybe_obj =
1853 AllocateMap(FIXED_ARRAY_TYPE, kVariableSizeSentinel);
1854 if (!maybe_obj->ToObject(&obj)) return false;
1855 }
1856 set_non_strict_arguments_elements_map(Map::cast(obj));
1857
1858 { MaybeObject* maybe_obj = AllocateMap(EXTERNAL_DOUBLE_ARRAY_TYPE, 1852 { MaybeObject* maybe_obj = AllocateMap(EXTERNAL_DOUBLE_ARRAY_TYPE,
1859 ExternalArray::kAlignedSize); 1853 ExternalArray::kAlignedSize);
1860 if (!maybe_obj->ToObject(&obj)) return false; 1854 if (!maybe_obj->ToObject(&obj)) return false;
1861 } 1855 }
1862 set_external_double_array_map(Map::cast(obj)); 1856 set_external_double_array_map(Map::cast(obj));
1863 1857
1864 { MaybeObject* maybe_obj = AllocateMap(CODE_TYPE, kVariableSizeSentinel); 1858 { MaybeObject* maybe_obj = AllocateMap(CODE_TYPE, kVariableSizeSentinel);
1865 if (!maybe_obj->ToObject(&obj)) return false; 1859 if (!maybe_obj->ToObject(&obj)) return false;
1866 } 1860 }
1867 set_code_map(Map::cast(obj)); 1861 set_code_map(Map::cast(obj));
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
3935 context->set_closure(function); 3929 context->set_closure(function);
3936 context->set_fcontext(context); 3930 context->set_fcontext(context);
3937 context->set_previous(function->context()); 3931 context->set_previous(function->context());
3938 context->set_extension(NULL); 3932 context->set_extension(NULL);
3939 context->set_global(function->context()->global()); 3933 context->set_global(function->context()->global());
3940 return context; 3934 return context;
3941 } 3935 }
3942 3936
3943 3937
3944 MaybeObject* Heap::AllocateCatchContext(Context* previous, 3938 MaybeObject* Heap::AllocateCatchContext(Context* previous,
3945 JSObject* extension) { 3939 String* name,
3940 Object* thrown_object) {
3941 STATIC_ASSERT(Context::MIN_CONTEXT_SLOTS == Context::THROWN_OBJECT_INDEX);
3946 Object* result; 3942 Object* result;
3947 { MaybeObject* maybe_result = AllocateFixedArray(Context::MIN_CONTEXT_SLOTS); 3943 { MaybeObject* maybe_result =
3944 AllocateFixedArray(Context::MIN_CONTEXT_SLOTS + 1);
3948 if (!maybe_result->ToObject(&result)) return maybe_result; 3945 if (!maybe_result->ToObject(&result)) return maybe_result;
3949 } 3946 }
3950 Context* context = reinterpret_cast<Context*>(result); 3947 Context* context = reinterpret_cast<Context*>(result);
3951 context->set_map(catch_context_map()); 3948 context->set_map(catch_context_map());
3952 context->set_closure(previous->closure()); 3949 context->set_closure(previous->closure());
3953 context->set_fcontext(previous->fcontext()); 3950 context->set_fcontext(previous->fcontext());
3954 context->set_previous(previous); 3951 context->set_previous(previous);
3955 context->set_extension(extension); 3952 context->set_extension(name);
3956 context->set_global(previous->global()); 3953 context->set_global(previous->global());
3954 context->set(Context::THROWN_OBJECT_INDEX, thrown_object);
3957 return context; 3955 return context;
3958 } 3956 }
3959 3957
3960 3958
3961 MaybeObject* Heap::AllocateWithContext(Context* previous, 3959 MaybeObject* Heap::AllocateWithContext(Context* previous,
3962 JSObject* extension) { 3960 JSObject* extension) {
3963 Object* result; 3961 Object* result;
3964 { MaybeObject* maybe_result = AllocateFixedArray(Context::MIN_CONTEXT_SLOTS); 3962 { MaybeObject* maybe_result = AllocateFixedArray(Context::MIN_CONTEXT_SLOTS);
3965 if (!maybe_result->ToObject(&result)) return maybe_result; 3963 if (!maybe_result->ToObject(&result)) return maybe_result;
3966 } 3964 }
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
6037 } 6035 }
6038 6036
6039 6037
6040 void ExternalStringTable::TearDown() { 6038 void ExternalStringTable::TearDown() {
6041 new_space_strings_.Free(); 6039 new_space_strings_.Free();
6042 old_space_strings_.Free(); 6040 old_space_strings_.Free();
6043 } 6041 }
6044 6042
6045 6043
6046 } } // namespace v8::internal 6044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/heap-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698