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

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

Issue 2989493002: Simplify and fix implicit closure check, speed up Closure_equals (Closed)
Patch Set: Avoid overloaded NewClosureFunction 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 #ifndef PRODUCT 4 #ifndef PRODUCT
5 #include "vm/source_report.h" 5 #include "vm/source_report.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ((end_pos_ > TokenPosition::kMinSource) && 75 ((end_pos_ > TokenPosition::kMinSource) &&
76 (func.token_pos() > end_pos_))) { 76 (func.token_pos() > end_pos_))) {
77 // The function does not intersect with the requested token range. 77 // The function does not intersect with the requested token range.
78 return true; 78 return true;
79 } 79 }
80 } 80 }
81 81
82 switch (func.kind()) { 82 switch (func.kind()) {
83 case RawFunction::kRegularFunction: 83 case RawFunction::kRegularFunction:
84 case RawFunction::kClosureFunction: 84 case RawFunction::kClosureFunction:
85 case RawFunction::kImplicitClosureFunction:
85 case RawFunction::kGetterFunction: 86 case RawFunction::kGetterFunction:
86 case RawFunction::kSetterFunction: 87 case RawFunction::kSetterFunction:
87 case RawFunction::kConstructor: 88 case RawFunction::kConstructor:
88 break; 89 break;
89 default: 90 default:
90 return true; 91 return true;
91 } 92 }
92 if (func.is_abstract() || func.IsImplicitConstructor() || 93 if (func.is_abstract() || func.IsImplicitConstructor() ||
93 func.IsRedirectingFactory()) { 94 func.IsRedirectingFactory()) {
94 return true; 95 return true;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 VisitClosures(&ranges); 511 VisitClosures(&ranges);
511 } 512 }
512 513
513 // Print the script table. 514 // Print the script table.
514 JSONArray scripts(&report, "scripts"); 515 JSONArray scripts(&report, "scripts");
515 PrintScriptTable(&scripts); 516 PrintScriptTable(&scripts);
516 } 517 }
517 518
518 } // namespace dart 519 } // namespace dart
519 #endif // PRODUCT 520 #endif // PRODUCT
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698