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

Side by Side Diff: src/scopeinfo.cc

Issue 10534006: Remove TLS access for current Zone. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 8 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/safepoint-table.cc ('k') | src/scopes.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 20 matching lines...) Expand all
31 31
32 #include "scopeinfo.h" 32 #include "scopeinfo.h"
33 #include "scopes.h" 33 #include "scopes.h"
34 34
35 #include "allocation-inl.h" 35 #include "allocation-inl.h"
36 36
37 namespace v8 { 37 namespace v8 {
38 namespace internal { 38 namespace internal {
39 39
40 40
41 Handle<ScopeInfo> ScopeInfo::Create(Scope* scope) { 41 Handle<ScopeInfo> ScopeInfo::Create(Scope* scope, Zone* zone) {
42 // Collect stack and context locals. 42 // Collect stack and context locals.
43 ZoneList<Variable*> stack_locals(scope->StackLocalCount()); 43 ZoneList<Variable*> stack_locals(scope->StackLocalCount(), zone);
44 ZoneList<Variable*> context_locals(scope->ContextLocalCount()); 44 ZoneList<Variable*> context_locals(scope->ContextLocalCount(), zone);
45 scope->CollectStackAndContextLocals(&stack_locals, &context_locals); 45 scope->CollectStackAndContextLocals(&stack_locals, &context_locals);
46 const int stack_local_count = stack_locals.length(); 46 const int stack_local_count = stack_locals.length();
47 const int context_local_count = context_locals.length(); 47 const int context_local_count = context_locals.length();
48 // Make sure we allocate the correct amount. 48 // Make sure we allocate the correct amount.
49 ASSERT(scope->StackLocalCount() == stack_local_count); 49 ASSERT(scope->StackLocalCount() == stack_local_count);
50 ASSERT(scope->ContextLocalCount() == context_local_count); 50 ASSERT(scope->ContextLocalCount() == context_local_count);
51 51
52 // Determine use and location of the function variable if it is present. 52 // Determine use and location of the function variable if it is present.
53 FunctionVariableInfo function_name_info; 53 FunctionVariableInfo function_name_info;
54 VariableMode function_variable_mode; 54 VariableMode function_variable_mode;
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 Context::MIN_CONTEXT_SLOTS, 501 Context::MIN_CONTEXT_SLOTS,
502 ContextLocalNameEntriesIndex(), 502 ContextLocalNameEntriesIndex(),
503 ContextLocalNameEntriesIndex() + ContextLocalCount(), 503 ContextLocalNameEntriesIndex() + ContextLocalCount(),
504 this); 504 this);
505 505
506 PrintF("}\n"); 506 PrintF("}\n");
507 } 507 }
508 #endif // DEBUG 508 #endif // DEBUG
509 509
510 } } // namespace v8::internal 510 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/safepoint-table.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698