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

Side by Side Diff: src/scopes.cc

Issue 10878047: Revert to code state of 3.13.1 plus r12350 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 4 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/scopes.h ('k') | src/serialize.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 } 209 }
210 210
211 211
212 Scope* Scope::DeserializeScopeChain(Context* context, Scope* global_scope, 212 Scope* Scope::DeserializeScopeChain(Context* context, Scope* global_scope,
213 Zone* zone) { 213 Zone* zone) {
214 // Reconstruct the outer scope chain from a closure's context chain. 214 // Reconstruct the outer scope chain from a closure's context chain.
215 Scope* current_scope = NULL; 215 Scope* current_scope = NULL;
216 Scope* innermost_scope = NULL; 216 Scope* innermost_scope = NULL;
217 bool contains_with = false; 217 bool contains_with = false;
218 while (!context->IsNativeContext()) { 218 while (!context->IsGlobalContext()) {
219 if (context->IsWithContext()) { 219 if (context->IsWithContext()) {
220 Scope* with_scope = new(zone) Scope(current_scope, 220 Scope* with_scope = new(zone) Scope(current_scope,
221 WITH_SCOPE, 221 WITH_SCOPE,
222 Handle<ScopeInfo>::null(), 222 Handle<ScopeInfo>::null(),
223 zone); 223 zone);
224 current_scope = with_scope; 224 current_scope = with_scope;
225 // All the inner scopes are inside a with. 225 // All the inner scopes are inside a with.
226 contains_with = true; 226 contains_with = true;
227 for (Scope* s = innermost_scope; s != NULL; s = s->outer_scope()) { 227 for (Scope* s = innermost_scope; s != NULL; s = s->outer_scope()) {
228 s->scope_inside_with_ = true; 228 s->scope_inside_with_ = true;
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 for (int i = 0; i < inner_scopes_.length(); i++) { 1388 for (int i = 0; i < inner_scopes_.length(); i++) {
1389 Scope* inner_scope = inner_scopes_.at(i); 1389 Scope* inner_scope = inner_scopes_.at(i);
1390 if (inner_scope->is_module_scope()) { 1390 if (inner_scope->is_module_scope()) {
1391 inner_scope->LinkModules(info); 1391 inner_scope->LinkModules(info);
1392 } 1392 }
1393 } 1393 }
1394 } 1394 }
1395 1395
1396 1396
1397 } } // namespace v8::internal 1397 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/scopes.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698