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

Side by Side Diff: runtime/observatory/lib/src/elements/function_view.dart

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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library function_view_element; 5 library function_view_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/class_ref.dart'; 10 import 'package:observatory/src/elements/class_ref.dart';
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 _r.dirty(); 393 _r.dirty();
394 } 394 }
395 395
396 static String _functionKindToString(M.FunctionKind kind) { 396 static String _functionKindToString(M.FunctionKind kind) {
397 switch (kind) { 397 switch (kind) {
398 case M.FunctionKind.regular: 398 case M.FunctionKind.regular:
399 return 'regular'; 399 return 'regular';
400 case M.FunctionKind.closure: 400 case M.FunctionKind.closure:
401 return 'closure'; 401 return 'closure';
402 case M.FunctionKind.implicitClosure:
403 return 'implicit closure';
402 case M.FunctionKind.getter: 404 case M.FunctionKind.getter:
403 return 'getter'; 405 return 'getter';
404 case M.FunctionKind.setter: 406 case M.FunctionKind.setter:
405 return 'setter'; 407 return 'setter';
406 case M.FunctionKind.constructor: 408 case M.FunctionKind.constructor:
407 return 'constructor'; 409 return 'constructor';
408 case M.FunctionKind.implicitGetter: 410 case M.FunctionKind.implicitGetter:
409 return 'implicit getter'; 411 return 'implicit getter';
410 case M.FunctionKind.implicitSetter: 412 case M.FunctionKind.implicitSetter:
411 return 'implicit setter'; 413 return 'implicit setter';
(...skipping 16 matching lines...) Expand all
428 case M.FunctionKind.stub: 430 case M.FunctionKind.stub:
429 return 'stub'; 431 return 'stub';
430 case M.FunctionKind.tag: 432 case M.FunctionKind.tag:
431 return 'tag'; 433 return 'tag';
432 case M.FunctionKind.signatureFunction: 434 case M.FunctionKind.signatureFunction:
433 return 'signature function'; 435 return 'signature function';
434 } 436 }
435 throw new Exception('Unknown Functionkind ($kind)'); 437 throw new Exception('Unknown Functionkind ($kind)');
436 } 438 }
437 } 439 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698