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

Side by Side Diff: src/parsing/preparser.cc

Issue 2368313002: Don't use different function scopes when parsing with temp zones (Closed)
Patch Set: Make sure arguments_ is properly analyzed as well, since it's used as a signal for optimization Created 4 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/parsing/parser-base.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #include <cmath> 5 #include <cmath>
6 6
7 #include "src/allocation.h" 7 #include "src/allocation.h"
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 *ok = false; 261 *ok = false;
262 return EmptyExpression(); 262 return EmptyExpression();
263 } 263 }
264 if (IsEvalOrArguments(name)) { 264 if (IsEvalOrArguments(name)) {
265 ReportMessageAt(class_name_location, MessageTemplate::kStrictEvalArguments); 265 ReportMessageAt(class_name_location, MessageTemplate::kStrictEvalArguments);
266 *ok = false; 266 *ok = false;
267 return EmptyExpression(); 267 return EmptyExpression();
268 } 268 }
269 269
270 LanguageMode class_language_mode = language_mode(); 270 LanguageMode class_language_mode = language_mode();
271 BlockState block_state(&scope_state_); 271 BlockState block_state(zone(), &scope_state_);
272 scope()->SetLanguageMode( 272 scope()->SetLanguageMode(
273 static_cast<LanguageMode>(class_language_mode | STRICT)); 273 static_cast<LanguageMode>(class_language_mode | STRICT));
274 // TODO(marja): Make PreParser use scope names too. 274 // TODO(marja): Make PreParser use scope names too.
275 // this->scope()->SetScopeName(name); 275 // this->scope()->SetScopeName(name);
276 276
277 bool has_extends = Check(Token::EXTENDS); 277 bool has_extends = Check(Token::EXTENDS);
278 if (has_extends) { 278 if (has_extends) {
279 ExpressionClassifier extends_classifier(this); 279 ExpressionClassifier extends_classifier(this);
280 ParseLeftHandSideExpression(CHECK_OK); 280 ParseLeftHandSideExpression(CHECK_OK);
281 ValidateExpression(CHECK_OK); 281 ValidateExpression(CHECK_OK);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 return PreParserExpression::FromIdentifier(name); 317 return PreParserExpression::FromIdentifier(name);
318 } 318 }
319 319
320 #undef CHECK_OK 320 #undef CHECK_OK
321 #undef CHECK_OK_CUSTOM 321 #undef CHECK_OK_CUSTOM
322 322
323 323
324 } // namespace internal 324 } // namespace internal
325 } // namespace v8 325 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698