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

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

Issue 1941683003: PPC/s390: modify if/else block to fix debug build (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment, using ok instead of CHECK_OK Created 4 years, 7 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 | « no previous file | 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 return ParseSubStatement(allow_function, ok); 278 return ParseSubStatement(allow_function, ok);
279 } 279 }
280 280
281 PreParser::Statement PreParser::ParseScopedStatement(bool legacy, bool* ok) { 281 PreParser::Statement PreParser::ParseScopedStatement(bool legacy, bool* ok) {
282 if (is_strict(language_mode()) || peek() != Token::FUNCTION || 282 if (is_strict(language_mode()) || peek() != Token::FUNCTION ||
283 (legacy && allow_harmony_restrictive_declarations())) { 283 (legacy && allow_harmony_restrictive_declarations())) {
284 return ParseSubStatement(kDisallowLabelledFunctionStatement, ok); 284 return ParseSubStatement(kDisallowLabelledFunctionStatement, ok);
285 } else { 285 } else {
286 Scope* body_scope = NewScope(scope_, BLOCK_SCOPE); 286 Scope* body_scope = NewScope(scope_, BLOCK_SCOPE);
287 BlockState block_state(&scope_, body_scope); 287 BlockState block_state(&scope_, body_scope);
288 return ParseFunctionDeclaration(CHECK_OK); 288 return ParseFunctionDeclaration(ok);
289 } 289 }
290 } 290 }
291 291
292 PreParser::Statement PreParser::ParseSubStatement( 292 PreParser::Statement PreParser::ParseSubStatement(
293 AllowLabelledFunctionStatement allow_function, bool* ok) { 293 AllowLabelledFunctionStatement allow_function, bool* ok) {
294 // Statement :: 294 // Statement ::
295 // Block 295 // Block
296 // VariableStatement 296 // VariableStatement
297 // EmptyStatement 297 // EmptyStatement
298 // ExpressionStatement 298 // ExpressionStatement
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 } 1223 }
1224 Expect(Token::RBRACE, CHECK_OK); 1224 Expect(Token::RBRACE, CHECK_OK);
1225 return PreParserExpression::Default(); 1225 return PreParserExpression::Default();
1226 } 1226 }
1227 1227
1228 #undef CHECK_OK 1228 #undef CHECK_OK
1229 1229
1230 1230
1231 } // namespace internal 1231 } // namespace internal
1232 } // namespace v8 1232 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698