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

Side by Side Diff: src/preparser.cc

Issue 1365803004: [presubmit] Fix whitespace/semicolon linter violations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/objects.cc ('k') | src/runtime/runtime-date.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 // 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 scope_, IsArrowFunction(kind) ? ARROW_SCOPE : FUNCTION_SCOPE, kind); 115 scope_, IsArrowFunction(kind) ? ARROW_SCOPE : FUNCTION_SCOPE, kind);
116 if (!has_simple_parameters) function_scope->SetHasNonSimpleParameters(); 116 if (!has_simple_parameters) function_scope->SetHasNonSimpleParameters();
117 PreParserFactory function_factory(NULL); 117 PreParserFactory function_factory(NULL);
118 FunctionState function_state(&function_state_, &scope_, function_scope, kind, 118 FunctionState function_state(&function_state_, &scope_, function_scope, kind,
119 &function_factory); 119 &function_factory);
120 DCHECK_EQ(Token::LBRACE, scanner()->current_token()); 120 DCHECK_EQ(Token::LBRACE, scanner()->current_token());
121 bool ok = true; 121 bool ok = true;
122 int start_position = peek_position(); 122 int start_position = peek_position();
123 ParseLazyFunctionLiteralBody(&ok, bookmark); 123 ParseLazyFunctionLiteralBody(&ok, bookmark);
124 if (bookmark && bookmark->HasBeenReset()) { 124 if (bookmark && bookmark->HasBeenReset()) {
125 ; // Do nothing, as we've just aborted scanning this function. 125 // Do nothing, as we've just aborted scanning this function.
126 } else if (stack_overflow()) { 126 } else if (stack_overflow()) {
127 return kPreParseStackOverflow; 127 return kPreParseStackOverflow;
128 } else if (!ok) { 128 } else if (!ok) {
129 ReportUnexpectedToken(scanner()->current_token()); 129 ReportUnexpectedToken(scanner()->current_token());
130 } else { 130 } else {
131 DCHECK_EQ(Token::RBRACE, scanner()->peek()); 131 DCHECK_EQ(Token::RBRACE, scanner()->peek());
132 if (is_strict(scope_->language_mode())) { 132 if (is_strict(scope_->language_mode())) {
133 int end_pos = scanner()->location().end_pos; 133 int end_pos = scanner()->location().end_pos;
134 CheckStrictOctalLiteral(start_position, end_pos, &ok); 134 CheckStrictOctalLiteral(start_position, end_pos, &ok);
135 if (!ok) return kPreParseSuccess; 135 if (!ok) return kPreParseSuccess;
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 1231
1232 DCHECK(!spread_pos.IsValid()); 1232 DCHECK(!spread_pos.IsValid());
1233 1233
1234 return Expression::Default(); 1234 return Expression::Default();
1235 } 1235 }
1236 1236
1237 #undef CHECK_OK 1237 #undef CHECK_OK
1238 1238
1239 1239
1240 } } // v8::internal 1240 } } // v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698