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

Unified Diff: src/parsing/preparser.h

Issue 2578893005: Remove class fields desugaring (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 026ea069895118363d6b8fbf77e846cbec05988b..5a9e8fef65540dd2c772a1e85621d2867484d0be 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -322,8 +322,6 @@ class PreParserExpression {
int position() const { return kNoSourcePosition; }
void set_function_token_position(int position) {}
- void set_is_class_field_initializer(bool is_class_field_initializer) {}
-
private:
enum Type {
kEmpty,
@@ -974,11 +972,6 @@ class PreParser : public ParserBase<PreParser> {
PreParserExpressionList args,
int pos);
- V8_INLINE PreParserExpression
- RewriteSuperCall(PreParserExpression call_expression) {
- return call_expression;
- }
-
V8_INLINE void RewriteDestructuringAssignments() {}
V8_INLINE PreParserExpression RewriteExponentiation(PreParserExpression left,
@@ -1083,23 +1076,13 @@ class PreParser : public ParserBase<PreParser> {
ClassLiteralProperty::Kind kind,
bool is_static, bool is_constructor,
ClassInfo* class_info, bool* ok) {
- if (kind == ClassLiteralProperty::FIELD && !is_static && !is_constructor) {
- class_info->instance_field_initializers->Add(
- PreParserExpression::Default(), zone());
- }
}
V8_INLINE PreParserExpression RewriteClassLiteral(PreParserIdentifier name,
ClassInfo* class_info,
int pos, bool* ok) {
bool has_default_constructor = !class_info->has_seen_constructor;
- bool has_instance_fields =
- class_info->instance_field_initializers->length() > 0;
// Account for the default constructor.
if (has_default_constructor) GetNextFunctionLiteralId();
- if (allow_harmony_class_fields() && has_instance_fields) {
- // Account for initializer function.
- GetNextFunctionLiteralId();
- }
return PreParserExpression::Default();
}
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698