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

Side by Side Diff: src/heap.cc

Issue 552257: Temporarily allocate all function contexts in old space and ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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/flag-definitions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 Context* context = reinterpret_cast<Context*>(result); 3006 Context* context = reinterpret_cast<Context*>(result);
3007 context->set_map(global_context_map()); 3007 context->set_map(global_context_map());
3008 ASSERT(context->IsGlobalContext()); 3008 ASSERT(context->IsGlobalContext());
3009 ASSERT(result->IsContext()); 3009 ASSERT(result->IsContext());
3010 return result; 3010 return result;
3011 } 3011 }
3012 3012
3013 3013
3014 Object* Heap::AllocateFunctionContext(int length, JSFunction* function) { 3014 Object* Heap::AllocateFunctionContext(int length, JSFunction* function) {
3015 ASSERT(length >= Context::MIN_CONTEXT_SLOTS); 3015 ASSERT(length >= Context::MIN_CONTEXT_SLOTS);
3016 Object* result = Heap::AllocateFixedArray(length); 3016 Object* result = Heap::AllocateFixedArray(length, TENURED);
3017 if (result->IsFailure()) return result; 3017 if (result->IsFailure()) return result;
3018 Context* context = reinterpret_cast<Context*>(result); 3018 Context* context = reinterpret_cast<Context*>(result);
3019 context->set_map(context_map()); 3019 context->set_map(context_map());
3020 context->set_closure(function); 3020 context->set_closure(function);
3021 context->set_fcontext(context); 3021 context->set_fcontext(context);
3022 context->set_previous(NULL); 3022 context->set_previous(NULL);
3023 context->set_extension(NULL); 3023 context->set_extension(NULL);
3024 context->set_global(function->context()->global()); 3024 context->set_global(function->context()->global());
3025 ASSERT(!context->IsGlobalContext()); 3025 ASSERT(!context->IsGlobalContext());
3026 ASSERT(context->is_function_context()); 3026 ASSERT(context->is_function_context());
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 void ExternalStringTable::TearDown() { 4222 void ExternalStringTable::TearDown() {
4223 new_space_strings_.Free(); 4223 new_space_strings_.Free();
4224 old_space_strings_.Free(); 4224 old_space_strings_.Free();
4225 } 4225 }
4226 4226
4227 4227
4228 List<Object*> ExternalStringTable::new_space_strings_; 4228 List<Object*> ExternalStringTable::new_space_strings_;
4229 List<Object*> ExternalStringTable::old_space_strings_; 4229 List<Object*> ExternalStringTable::old_space_strings_;
4230 4230
4231 } } // namespace v8::internal 4231 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698