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

Side by Side Diff: src/scopes.cc

Issue 3412034: Avoid logging preparse-data inside lazily compiled functions. (Closed)
Patch Set: Addressed review comments. Created 10 years, 2 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
« no previous file with comments | « src/scopes.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 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (is_function_scope()) { 194 if (is_function_scope()) {
195 // Declare 'arguments' variable which exists in all functions. 195 // Declare 'arguments' variable which exists in all functions.
196 // Note that it might never be accessed, in which case it won't be 196 // Note that it might never be accessed, in which case it won't be
197 // allocated during variable allocation. 197 // allocated during variable allocation.
198 variables_.Declare(this, Factory::arguments_symbol(), Variable::VAR, 198 variables_.Declare(this, Factory::arguments_symbol(), Variable::VAR,
199 true, Variable::ARGUMENTS); 199 true, Variable::ARGUMENTS);
200 } 200 }
201 } 201 }
202 202
203 203
204
205 Variable* Scope::LocalLookup(Handle<String> name) { 204 Variable* Scope::LocalLookup(Handle<String> name) {
206 return variables_.Lookup(name); 205 return variables_.Lookup(name);
207 } 206 }
208 207
209 208
210 Variable* Scope::Lookup(Handle<String> name) { 209 Variable* Scope::Lookup(Handle<String> name) {
211 for (Scope* scope = this; 210 for (Scope* scope = this;
212 scope != NULL; 211 scope != NULL;
213 scope = scope->outer_scope()) { 212 scope = scope->outer_scope()) {
214 Variable* var = scope->LocalLookup(name); 213 Variable* var = scope->LocalLookup(name);
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && 952 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS &&
954 !must_have_local_context) { 953 !must_have_local_context) {
955 num_heap_slots_ = 0; 954 num_heap_slots_ = 0;
956 } 955 }
957 956
958 // Allocation done. 957 // Allocation done.
959 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); 958 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS);
960 } 959 }
961 960
962 } } // namespace v8::internal 961 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698