| OLD | NEW |
| 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 // Defines message visitors, serialization, and deserialization. | 5 // Defines message visitors, serialization, and deserialization. |
| 6 | 6 |
| 7 /** Serialize [message] (or simulate serialization). */ | 7 /** Serialize [message] (or simulate serialization). */ |
| 8 _serializeMessage(message) { | 8 _serializeMessage(message) { |
| 9 if (_globalState.needSerialization) { | 9 if (_globalState.needSerialization) { |
| 10 return new _JsSerializer().traverse(message); | 10 return new _JsSerializer().traverse(message); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return new _JsCopier().traverse(x); | 155 return new _JsCopier().traverse(x); |
| 156 } | 156 } |
| 157 | 157 |
| 158 // only visible for testing purposes | 158 // only visible for testing purposes |
| 159 static serialize(x) { | 159 static serialize(x) { |
| 160 _Serializer serializer = new _JsSerializer(); | 160 _Serializer serializer = new _JsSerializer(); |
| 161 _Deserializer deserializer = new _JsDeserializer(); | 161 _Deserializer deserializer = new _JsDeserializer(); |
| 162 return deserializer.deserialize(serializer.traverse(x)); | 162 return deserializer.deserialize(serializer.traverse(x)); |
| 163 } | 163 } |
| 164 } | 164 } |
| OLD | NEW |