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

Side by Side Diff: runtime/vm/parser.cc

Issue 2984083002: Revert "Simplify and fix implicit closure check, speed up Closure_equals" (Closed)
Patch Set: Created 3 years, 5 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 | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 #include "vm/flags.h" 6 #include "vm/flags.h"
7 7
8 #ifndef DART_PRECOMPILED_RUNTIME 8 #ifndef DART_PRECOMPILED_RUNTIME
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 const Script& script = Script::Handle(zone, func.script()); 1082 const Script& script = Script::Handle(zone, func.script());
1083 Parser parser(script, parsed_function, func.token_pos()); 1083 Parser parser(script, parsed_function, func.token_pos());
1084 #ifndef PRODUCT 1084 #ifndef PRODUCT
1085 if (tds.enabled()) { 1085 if (tds.enabled()) {
1086 tds.SetNumArguments(1); 1086 tds.SetNumArguments(1);
1087 tds.CopyArgument(0, "function", String::Handle(func.name()).ToCString()); 1087 tds.CopyArgument(0, "function", String::Handle(func.name()).ToCString());
1088 } 1088 }
1089 #endif // !PRODUCT 1089 #endif // !PRODUCT
1090 SequenceNode* node_sequence = NULL; 1090 SequenceNode* node_sequence = NULL;
1091 switch (func.kind()) { 1091 switch (func.kind()) {
1092 case RawFunction::kImplicitClosureFunction:
1093 node_sequence = parser.ParseImplicitClosure(func);
1094 break;
1095 case RawFunction::kClosureFunction: 1092 case RawFunction::kClosureFunction:
1093 if (func.IsImplicitClosureFunction()) {
1094 node_sequence = parser.ParseImplicitClosure(func);
1095 break;
1096 }
1096 if (func.IsConstructorClosureFunction()) { 1097 if (func.IsConstructorClosureFunction()) {
1097 node_sequence = parser.ParseConstructorClosure(func); 1098 node_sequence = parser.ParseConstructorClosure(func);
1098 break; 1099 break;
1099 } 1100 }
1100 // Fall-through: Handle non-implicit closures. 1101 // Fall-through: Handle non-implicit closures.
1101 case RawFunction::kRegularFunction: 1102 case RawFunction::kRegularFunction:
1102 case RawFunction::kGetterFunction: 1103 case RawFunction::kGetterFunction:
1103 case RawFunction::kSetterFunction: 1104 case RawFunction::kSetterFunction:
1104 case RawFunction::kConstructor: 1105 case RawFunction::kConstructor:
1105 // The call to a redirecting factory is redirected. 1106 // The call to a redirecting factory is redirected.
(...skipping 13994 matching lines...) Expand 10 before | Expand all | Expand 10 after
15100 bool Parser::FieldHasFunctionLiteralInitializer(const Field& field, 15101 bool Parser::FieldHasFunctionLiteralInitializer(const Field& field,
15101 TokenPosition* start, 15102 TokenPosition* start,
15102 TokenPosition* end) { 15103 TokenPosition* end) {
15103 UNREACHABLE(); 15104 UNREACHABLE();
15104 return false; 15105 return false;
15105 } 15106 }
15106 15107
15107 } // namespace dart 15108 } // namespace dart
15108 15109
15109 #endif // DART_PRECOMPILED_RUNTIME 15110 #endif // DART_PRECOMPILED_RUNTIME
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698