| OLD | NEW |
| 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 observatory_element; | 5 library observatory_element; |
| 6 | 6 |
| 7 import 'dart:math'; | 7 import 'dart:math'; |
| 8 import 'package:polymer/polymer.dart'; | 8 import 'package:polymer/polymer.dart'; |
| 9 | 9 |
| 10 /// Base class for all Observatory custom elements. | 10 /// Base class for all Observatory custom elements. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool isInstance(String type) { | 119 bool isInstance(String type) { |
| 120 return type == 'Instance'; | 120 return type == 'Instance'; |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool isClosure(String type) { | 123 bool isClosure(String type) { |
| 124 return type == 'Closure'; | 124 return type == 'Closure'; |
| 125 } | 125 } |
| 126 | 126 |
| 127 bool isDouble(String type) { |
| 128 return type == 'Double'; |
| 129 } |
| 130 |
| 127 bool isList(String type) { | 131 bool isList(String type) { |
| 128 return (type == 'GrowableObjectArray' || | 132 return (type == 'GrowableObjectArray' || |
| 129 type == 'Array'); | 133 type == 'Array'); |
| 130 } | 134 } |
| 131 | 135 |
| 132 bool isUnexpected(String type) { | 136 bool isUnexpected(String type) { |
| 133 return (!['Null', | 137 return (!['Null', |
| 134 'Smi', | 138 'Smi', |
| 135 'Mint', | 139 'Mint', |
| 136 'Biginit', | 140 'Biginit', |
| 137 'Bool', | 141 'Bool', |
| 138 'String', | 142 'String', |
| 139 'Closure', | 143 'Closure', |
| 144 'Double', |
| 140 'Instance', | 145 'Instance', |
| 141 'GrowableObjectArray', | 146 'GrowableObjectArray', |
| 142 'Array', | 147 'Array', |
| 143 'Error'].contains(type)); | 148 'Error'].contains(type)); |
| 144 } | 149 } |
| 145 } | 150 } |
| OLD | NEW |