Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// Contains encoding, decoding and detection functionality for the | 5 /// Contains encoding, decoding and detection functionality for the |
| 6 /// representation of program data at runtime. | 6 /// representation of program data at runtime. |
| 7 /// | 7 /// |
| 8 /// This library is shared between the compiler and the runtime system. | 8 /// This library is shared between the compiler and the runtime system. |
| 9 library dart2js.runtime_data; | 9 library dart2js.runtime_data; |
| 10 | 10 |
| 11 | 11 |
| 12 String encodeTypedefFieldDescriptor(int typeIndex) { | 12 String encodeTypedefFieldDescriptor(int typeIndex) { |
| 13 return ":$typeIndex;"; | 13 return ":$typeIndex;"; |
| 14 } | 14 } |
| 15 | 15 |
| 16 bool isTypedefDescriptor(String descriptor) { | 16 bool isTypedefDescriptor(String descriptor) { |
| 17 return descriptor.startsWith(':'); | 17 return descriptor.startsWith(':'); |
| 18 } | 18 } |
| 19 | 19 |
| 20 int getTypeFromTypedef(String descriptor) { | 20 int getTypeFromTypedef(String descriptor) { |
| 21 return int.parse(descriptor.substring(1, descriptor.length - 1)); | 21 return int.parse(descriptor.substring(1, descriptor.length - 1)); |
| 22 } | 22 } |
|
karlklose
2014/11/28 10:19:00
Revert this change.
floitsch
2014/11/28 10:40:16
Done.
| |
| OLD | NEW |