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/scopes.cc

Issue 113519: Changed FuncNameInferrer and ScopeInfo to support zone allocation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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
« src/factory.h ('K') | « src/scopeinfo.cc ('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 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 } 295 }
296 } 296 }
297 297
298 298
299 // Make sure the method gets instantiated by the template system. 299 // Make sure the method gets instantiated by the template system.
300 template void Scope::CollectUsedVariables( 300 template void Scope::CollectUsedVariables(
301 List<Variable*, FreeStoreAllocationPolicy>* locals); 301 List<Variable*, FreeStoreAllocationPolicy>* locals);
302 template void Scope::CollectUsedVariables( 302 template void Scope::CollectUsedVariables(
303 List<Variable*, PreallocatedStorage>* locals); 303 List<Variable*, PreallocatedStorage>* locals);
304 template void Scope::CollectUsedVariables(
305 List<Variable*, ZoneListAllocationPolicy>* locals);
304 306
305 307
306 void Scope::AllocateVariables(Handle<Context> context) { 308 void Scope::AllocateVariables(Handle<Context> context) {
307 ASSERT(outer_scope_ == NULL); // eval or global scopes only 309 ASSERT(outer_scope_ == NULL); // eval or global scopes only
308 310
309 // 1) Propagate scope information. 311 // 1) Propagate scope information.
310 // If we are in an eval scope, we may have other outer scopes about 312 // If we are in an eval scope, we may have other outer scopes about
311 // which we don't know anything at this point. Thus we must be conservative 313 // which we don't know anything at this point. Thus we must be conservative
312 // and assume they may invoke eval themselves. Eventually we could capture 314 // and assume they may invoke eval themselves. Eventually we could capture
313 // this information in the ScopeInfo and then use it here (by traversing 315 // this information in the ScopeInfo and then use it here (by traversing
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && 931 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS &&
930 !must_have_local_context) { 932 !must_have_local_context) {
931 num_heap_slots_ = 0; 933 num_heap_slots_ = 0;
932 } 934 }
933 935
934 // Allocation done. 936 // Allocation done.
935 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); 937 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS);
936 } 938 }
937 939
938 } } // namespace v8::internal 940 } } // namespace v8::internal
OLDNEW
« src/factory.h ('K') | « src/scopeinfo.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698