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

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

Issue 1696603002: Remove AssignmentExpressionFlags enum, handle error checking in callers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Eliminate early return Created 4 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/parsing/parser-base.h ('k') | test/cctest/test-parsing.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_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 PreParserIdentifier AsIdentifier() const { 190 PreParserIdentifier AsIdentifier() const {
191 DCHECK(IsIdentifier()); 191 DCHECK(IsIdentifier());
192 return PreParserIdentifier(IdentifierTypeField::decode(code_)); 192 return PreParserIdentifier(IdentifierTypeField::decode(code_));
193 } 193 }
194 194
195 bool IsAssignment() const { 195 bool IsAssignment() const {
196 return TypeField::decode(code_) == kExpression && 196 return TypeField::decode(code_) == kExpression &&
197 ExpressionTypeField::decode(code_) == kAssignment; 197 ExpressionTypeField::decode(code_) == kAssignment;
198 } 198 }
199 199
200 bool IsRewritableAssignmentExpression() const { return IsAssignment(); }
201
200 bool IsObjectLiteral() const { 202 bool IsObjectLiteral() const {
201 return TypeField::decode(code_) == kObjectLiteralExpression; 203 return TypeField::decode(code_) == kObjectLiteralExpression;
202 } 204 }
203 205
204 bool IsArrayLiteral() const { 206 bool IsArrayLiteral() const {
205 return TypeField::decode(code_) == kArrayLiteralExpression; 207 return TypeField::decode(code_) == kArrayLiteralExpression;
206 } 208 }
207 209
208 bool IsStringLiteral() const { 210 bool IsStringLiteral() const {
209 return TypeField::decode(code_) == kStringLiteralExpression; 211 return TypeField::decode(code_) == kStringLiteralExpression;
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 const PreParserFormalParameters& parameters, FunctionKind kind, 1163 const PreParserFormalParameters& parameters, FunctionKind kind,
1162 FunctionLiteral::FunctionType function_type, bool* ok) { 1164 FunctionLiteral::FunctionType function_type, bool* ok) {
1163 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1165 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1164 kind, function_type, ok); 1166 kind, function_type, ok);
1165 } 1167 }
1166 1168
1167 } // namespace internal 1169 } // namespace internal
1168 } // namespace v8 1170 } // namespace v8
1169 1171
1170 #endif // V8_PARSING_PREPARSER_H 1172 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698