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/preparser.h

Issue 909093003: Parsing: Make Scope not know about Isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/runtime/runtime-debug.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PREPARSER_H 5 #ifndef V8_PREPARSER_H
6 #define V8_PREPARSER_H 6 #define V8_PREPARSER_H
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 ParserBase* parser_; 303 ParserBase* parser_;
304 Mode old_mode_; 304 Mode old_mode_;
305 }; 305 };
306 306
307 Scope* NewScope(Scope* parent, ScopeType scope_type, 307 Scope* NewScope(Scope* parent, ScopeType scope_type,
308 FunctionKind kind = kNormalFunction) { 308 FunctionKind kind = kNormalFunction) {
309 DCHECK(ast_value_factory()); 309 DCHECK(ast_value_factory());
310 DCHECK(scope_type != MODULE_SCOPE || allow_harmony_modules()); 310 DCHECK(scope_type != MODULE_SCOPE || allow_harmony_modules());
311 DCHECK((scope_type == FUNCTION_SCOPE && IsValidFunctionKind(kind)) || 311 DCHECK((scope_type == FUNCTION_SCOPE && IsValidFunctionKind(kind)) ||
312 kind == kNormalFunction); 312 kind == kNormalFunction);
313 Scope* result = new (zone()) 313 Scope* result =
314 Scope(isolate(), zone(), parent, scope_type, ast_value_factory()); 314 new (zone()) Scope(zone(), parent, scope_type, ast_value_factory());
315 bool uninitialized_this = 315 bool uninitialized_this =
316 FLAG_experimental_classes && IsSubclassConstructor(kind); 316 FLAG_experimental_classes && IsSubclassConstructor(kind);
317 result->Initialize(uninitialized_this); 317 result->Initialize(uninitialized_this);
318 return result; 318 return result;
319 } 319 }
320 320
321 Isolate* isolate() const { return isolate_; } 321 Isolate* isolate() const { return isolate_; }
322 Scanner* scanner() const { return scanner_; } 322 Scanner* scanner() const { return scanner_; }
323 AstValueFactory* ast_value_factory() const { return ast_value_factory_; } 323 AstValueFactory* ast_value_factory() const { return ast_value_factory_; }
324 int position() { return scanner_->location().beg_pos; } 324 int position() { return scanner_->location().beg_pos; }
(...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 *ok = false; 3060 *ok = false;
3061 return; 3061 return;
3062 } 3062 }
3063 has_seen_constructor_ = true; 3063 has_seen_constructor_ = true;
3064 return; 3064 return;
3065 } 3065 }
3066 } 3066 }
3067 } } // v8::internal 3067 } } // v8::internal
3068 3068
3069 #endif // V8_PREPARSER_H 3069 #endif // V8_PREPARSER_H
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698