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

Side by Side Diff: src/scopes.h

Issue 7399023: Pass isolate to AST ID functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A bit less ugly 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/rewriter.cc ('k') | src/scopes.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 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 void AllocateNonParameterLocals(); 418 void AllocateNonParameterLocals();
419 void AllocateVariablesRecursively(); 419 void AllocateVariablesRecursively();
420 420
421 private: 421 private:
422 // Construct a function scope based on the scope info. 422 // Construct a function scope based on the scope info.
423 Scope(Scope* inner_scope, Handle<SerializedScopeInfo> scope_info); 423 Scope(Scope* inner_scope, Handle<SerializedScopeInfo> scope_info);
424 424
425 // Construct a catch scope with a binding for the name. 425 // Construct a catch scope with a binding for the name.
426 Scope(Scope* inner_scope, Handle<String> catch_variable_name); 426 Scope(Scope* inner_scope, Handle<String> catch_variable_name);
427 427
428 inline Slot* NewSlot(Variable* var, Slot::Type type, int index) {
429 return new(isolate_->zone()) Slot(isolate_, var, type, index);
430 }
431
428 void AddInnerScope(Scope* inner_scope) { 432 void AddInnerScope(Scope* inner_scope) {
429 if (inner_scope != NULL) { 433 if (inner_scope != NULL) {
430 inner_scopes_.Add(inner_scope); 434 inner_scopes_.Add(inner_scope);
431 inner_scope->outer_scope_ = this; 435 inner_scope->outer_scope_ = this;
432 } 436 }
433 } 437 }
434 438
435 void SetDefaults(Type type, 439 void SetDefaults(Type type,
436 Scope* outer_scope, 440 Scope* outer_scope,
437 Handle<SerializedScopeInfo> scope_info); 441 Handle<SerializedScopeInfo> scope_info);
438 }; 442 };
439 443
440 } } // namespace v8::internal 444 } } // namespace v8::internal
441 445
442 #endif // V8_SCOPES_H_ 446 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698