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

Unified Diff: src/scopes.cc

Issue 7374002: Refactor allocation policies. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scopeinfo.cc ('k') | src/splay-tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index c6e2a4650e1e1112fd54fc699fdd3c0476409b2b..b23eb69baa97b69924e331c81c9ffd7751662952 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -116,25 +116,25 @@ Variable* VariableMap::Lookup(Handle<String> name) {
// Dummy constructor
Scope::Scope(Type type)
- : inner_scopes_(0),
- variables_(false),
- temps_(0),
- params_(0),
- unresolved_(0),
- decls_(0),
- already_resolved_(false) {
+ : inner_scopes_(ZONE, 0),
+ variables_(false),
+ temps_(ZONE, 0),
+ params_(ZONE, 0),
+ unresolved_(ZONE, 0),
+ decls_(ZONE, 0),
+ already_resolved_(false) {
SetDefaults(type, NULL, Handle<SerializedScopeInfo>::null());
}
Scope::Scope(Scope* outer_scope, Type type)
- : inner_scopes_(4),
- variables_(),
- temps_(4),
- params_(4),
- unresolved_(16),
- decls_(4),
- already_resolved_(false) {
+ : inner_scopes_(ZONE, 4),
+ variables_(),
+ temps_(ZONE, 4),
+ params_(ZONE, 4),
+ unresolved_(ZONE, 16),
+ decls_(ZONE, 4),
+ already_resolved_(false) {
SetDefaults(type, outer_scope, Handle<SerializedScopeInfo>::null());
// At some point we might want to provide outer scopes to
// eval scopes (by walking the stack and reading the scope info).
@@ -145,13 +145,13 @@ Scope::Scope(Scope* outer_scope, Type type)
Scope::Scope(Scope* inner_scope, Handle<SerializedScopeInfo> scope_info)
- : inner_scopes_(4),
- variables_(),
- temps_(4),
- params_(4),
- unresolved_(16),
- decls_(4),
- already_resolved_(true) {
+ : inner_scopes_(ZONE, 4),
+ variables_(),
+ temps_(ZONE, 4),
+ params_(ZONE, 4),
+ unresolved_(ZONE, 16),
+ decls_(ZONE, 4),
+ already_resolved_(true) {
ASSERT(!scope_info.is_null());
SetDefaults(FUNCTION_SCOPE, NULL, scope_info);
if (scope_info->HasHeapAllocatedLocals()) {
@@ -162,12 +162,12 @@ Scope::Scope(Scope* inner_scope, Handle<SerializedScopeInfo> scope_info)
Scope::Scope(Scope* inner_scope, Handle<String> catch_variable_name)
- : inner_scopes_(1),
+ : inner_scopes_(ZONE, 1),
variables_(),
- temps_(0),
- params_(0),
- unresolved_(0),
- decls_(0),
+ temps_(ZONE, 0),
+ params_(ZONE, 0),
+ unresolved_(ZONE, 0),
+ decls_(ZONE, 0),
already_resolved_(true) {
SetDefaults(CATCH_SCOPE, NULL, Handle<SerializedScopeInfo>::null());
AddInnerScope(inner_scope);
@@ -469,11 +469,11 @@ void Scope::CollectUsedVariables(List<Variable*, Allocator>* locals) {
// Make sure the method gets instantiated by the template system.
template void Scope::CollectUsedVariables(
- List<Variable*, FreeStoreAllocationPolicy>* locals);
+ List<Variable*, FreeStoreAllocator>* locals);
template void Scope::CollectUsedVariables(
- List<Variable*, PreallocatedStorage>* locals);
+ List<Variable*, PreallocatedStorageAllocator>* locals);
template void Scope::CollectUsedVariables(
- List<Variable*, ZoneListAllocationPolicy>* locals);
+ List<Variable*, ZoneListAllocator>* locals);
void Scope::AllocateVariables(Handle<Context> context) {
« no previous file with comments | « src/scopeinfo.cc ('k') | src/splay-tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698