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

Side by Side Diff: src/parser.cc

Issue 1022413003: Fix unintentional typo in Parser::ParseLazy() comments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 // function. Setting this avoids prevents ExpressionFromIdentifier() 1143 // function. Setting this avoids prevents ExpressionFromIdentifier()
1144 // from creating unresolved variables in already-resolved scopes. 1144 // from creating unresolved variables in already-resolved scopes.
1145 parsing_lazy_arrow_parameters_ = true; 1145 parsing_lazy_arrow_parameters_ = true;
1146 Expression* expression = ParseExpression(false, &ok); 1146 Expression* expression = ParseExpression(false, &ok);
1147 if (ok) { 1147 if (ok) {
1148 // Scanning must end at the same position that was recorded 1148 // Scanning must end at the same position that was recorded
1149 // previously. If not, parsing has been interrupted due to a 1149 // previously. If not, parsing has been interrupted due to a
1150 // stack overflow, at which point the partially parsed arrow 1150 // stack overflow, at which point the partially parsed arrow
1151 // function concise body happens to be a valid expression. This 1151 // function concise body happens to be a valid expression. This
1152 // is a problem only for arrow functions with single statement 1152 // is a problem only for arrow functions with single statement
1153 // bodies, since there is no end token suck as "}" for normal 1153 // bodies, since there is no end token such as "}" for normal
1154 // functions. 1154 // functions.
1155 if (scanner()->location().end_pos == shared_info->end_position()) { 1155 if (scanner()->location().end_pos == shared_info->end_position()) {
1156 // The pre-parser saw an arrow function here, so the full parser 1156 // The pre-parser saw an arrow function here, so the full parser
1157 // must produce a FunctionLiteral. 1157 // must produce a FunctionLiteral.
1158 DCHECK(expression->IsFunctionLiteral()); 1158 DCHECK(expression->IsFunctionLiteral());
1159 result = expression->AsFunctionLiteral(); 1159 result = expression->AsFunctionLiteral();
1160 } else { 1160 } else {
1161 result = NULL; 1161 result = NULL;
1162 ok = false; 1162 ok = false;
1163 } 1163 }
(...skipping 4394 matching lines...) Expand 10 before | Expand all | Expand 10 after
5558 } else { 5558 } else {
5559 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data()); 5559 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data());
5560 running_hash = StringHasher::ComputeRunningHash(running_hash, data, 5560 running_hash = StringHasher::ComputeRunningHash(running_hash, data,
5561 raw_string->length()); 5561 raw_string->length());
5562 } 5562 }
5563 } 5563 }
5564 5564
5565 return running_hash; 5565 return running_hash;
5566 } 5566 }
5567 } } // namespace v8::internal 5567 } } // namespace v8::internal
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