| 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 patch class _ReceivePortFactory { | 5 patch class _ReceivePortFactory { |
| 6 /* patch */ factory ReceivePort() { | 6 /* patch */ factory ReceivePort() { |
| 7 return new _ReceivePortImpl(); | 7 return new _ReceivePortImpl(); |
| 8 } | 8 } |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 completer.complete(value); | 84 completer.complete(value); |
| 85 } | 85 } |
| 86 }); | 86 }); |
| 87 return completer.future; | 87 return completer.future; |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool operator==(var other) { | 90 bool operator==(var other) { |
| 91 return (other is _SendPortImpl) && _id == other._id; | 91 return (other is _SendPortImpl) && _id == other._id; |
| 92 } | 92 } |
| 93 | 93 |
| 94 int hashCode() { | 94 int get hashCode { |
| 95 return _id; | 95 return _id; |
| 96 } | 96 } |
| 97 | 97 |
| 98 /*--- private implementation ---*/ | 98 /*--- private implementation ---*/ |
| 99 const _SendPortImpl(int id) : _id = id; | 99 const _SendPortImpl(int id) : _id = id; |
| 100 | 100 |
| 101 // _SendPortImpl._create is called from the VM when a new SendPort instance is | 101 // _SendPortImpl._create is called from the VM when a new SendPort instance is |
| 102 // needed by the VM code. | 102 // needed by the VM code. |
| 103 static SendPort _create(int id) { | 103 static SendPort _create(int id) { |
| 104 return new _SendPortImpl(id); | 104 return new _SendPortImpl(id); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 120 if (_portInternal === null) { | 120 if (_portInternal === null) { |
| 121 _portInternal = _getPortInternal(); | 121 _portInternal = _getPortInternal(); |
| 122 } | 122 } |
| 123 return _portInternal; | 123 return _portInternal; |
| 124 } | 124 } |
| 125 | 125 |
| 126 patch spawnFunction(void topLevelFunction()) native "isolate_spawnFunction"; | 126 patch spawnFunction(void topLevelFunction()) native "isolate_spawnFunction"; |
| 127 | 127 |
| 128 patch spawnUri(String uri) native "isolate_spawnUri"; | 128 patch spawnUri(String uri) native "isolate_spawnUri"; |
| 129 | 129 |
| OLD | NEW |