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

Side by Side Diff: src/scopes.h

Issue 9401008: Parsing of basic module declarations (no imports/exports yet). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Lasse's comments. Created 8 years, 10 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
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void set_end_position(int statement_pos) { 256 void set_end_position(int statement_pos) {
257 end_position_ = statement_pos; 257 end_position_ = statement_pos;
258 } 258 }
259 259
260 // --------------------------------------------------------------------------- 260 // ---------------------------------------------------------------------------
261 // Predicates. 261 // Predicates.
262 262
263 // Specific scope types. 263 // Specific scope types.
264 bool is_eval_scope() const { return type_ == EVAL_SCOPE; } 264 bool is_eval_scope() const { return type_ == EVAL_SCOPE; }
265 bool is_function_scope() const { return type_ == FUNCTION_SCOPE; } 265 bool is_function_scope() const { return type_ == FUNCTION_SCOPE; }
266 bool is_module_scope() const { return type_ == MODULE_SCOPE; }
266 bool is_global_scope() const { return type_ == GLOBAL_SCOPE; } 267 bool is_global_scope() const { return type_ == GLOBAL_SCOPE; }
267 bool is_catch_scope() const { return type_ == CATCH_SCOPE; } 268 bool is_catch_scope() const { return type_ == CATCH_SCOPE; }
268 bool is_block_scope() const { return type_ == BLOCK_SCOPE; } 269 bool is_block_scope() const { return type_ == BLOCK_SCOPE; }
269 bool is_with_scope() const { return type_ == WITH_SCOPE; } 270 bool is_with_scope() const { return type_ == WITH_SCOPE; }
270 bool is_declaration_scope() const { 271 bool is_declaration_scope() const {
271 return is_eval_scope() || is_function_scope() || is_global_scope(); 272 return is_eval_scope() || is_function_scope() || is_global_scope();
272 } 273 }
273 bool is_classic_mode() const { 274 bool is_classic_mode() const {
274 return language_mode() == CLASSIC_MODE; 275 return language_mode() == CLASSIC_MODE;
275 } 276 }
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 581 }
581 582
582 void SetDefaults(ScopeType type, 583 void SetDefaults(ScopeType type,
583 Scope* outer_scope, 584 Scope* outer_scope,
584 Handle<ScopeInfo> scope_info); 585 Handle<ScopeInfo> scope_info);
585 }; 586 };
586 587
587 } } // namespace v8::internal 588 } } // namespace v8::internal
588 589
589 #endif // V8_SCOPES_H_ 590 #endif // V8_SCOPES_H_
OLDNEW
« src/parser.cc ('K') | « src/runtime.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698