| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 interface Mint factory MintImpl { | 5 interface Mint factory MintImpl { |
| 6 | 6 |
| 7 Mint(); | 7 Mint(); |
| 8 | 8 |
| 9 Purse createPurse(int balance); | 9 Purse createPurse(int balance); |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // THE REST OF THIS FILE COULD BE AUTOGENERATED | 128 // THE REST OF THIS FILE COULD BE AUTOGENERATED |
| 129 // --------------------------------------------------------------------------- | 129 // --------------------------------------------------------------------------- |
| 130 | 130 |
| 131 interface Mint$Proxy { | 131 interface Mint$Proxy { |
| 132 | 132 |
| 133 Purse$Proxy createPurse(int balance); // Promise<int> balance. | 133 Purse$Proxy createPurse(int balance); // Promise<int> balance. |
| 134 | 134 |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 class Mint$ProxyImpl extends Proxy implements Mint$Proxy { | 138 class Mint$ProxyImpl extends ProxyImpl implements Mint$Proxy { |
| 139 | 139 |
| 140 Mint$ProxyImpl(Proxy isolate) : super.forReply(isolate.call([null])) {} | 140 Mint$ProxyImpl(Proxy isolate) : super.forReply(isolate.call([null])) {} |
| 141 | 141 |
| 142 Purse$Proxy createPurse(int balance) { | 142 Purse$Proxy createPurse(int balance) { |
| 143 return new Purse$ProxyImpl(this.call([balance])); | 143 return new Purse$ProxyImpl(this.call([balance])); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } | 146 } |
| 147 | 147 |
| 148 | 148 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 178 | 178 |
| 179 interface Purse$Proxy { | 179 interface Purse$Proxy { |
| 180 | 180 |
| 181 Promise<int> queryBalance(); | 181 Promise<int> queryBalance(); |
| 182 Purse$Proxy sproutPurse(); | 182 Purse$Proxy sproutPurse(); |
| 183 Promise<int> deposit(int amount, Purse$Proxy source); // Promise<int> amount. | 183 Promise<int> deposit(int amount, Purse$Proxy source); // Promise<int> amount. |
| 184 | 184 |
| 185 } | 185 } |
| 186 | 186 |
| 187 | 187 |
| 188 class Purse$ProxyImpl extends Proxy implements Purse$Proxy { | 188 class Purse$ProxyImpl extends ProxyImpl implements Purse$Proxy { |
| 189 | 189 |
| 190 Purse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } | 190 Purse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } |
| 191 | 191 |
| 192 Promise<int> queryBalance() { | 192 Promise<int> queryBalance() { |
| 193 return this.call(["balance"]); | 193 return this.call(["balance"]); |
| 194 } | 194 } |
| 195 | 195 |
| 196 Promise<int> deposit(int amount, Purse$Proxy source) { | 196 Promise<int> deposit(int amount, Purse$Proxy source) { |
| 197 return this.call(["deposit", amount, source]); | 197 return this.call(["deposit", amount, source]); |
| 198 } | 198 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 reply("Exception: Command not understood"); | 232 reply("Exception: Command not understood"); |
| 233 } | 233 } |
| 234 //print("command $command done"); | 234 //print("command $command done"); |
| 235 } | 235 } |
| 236 | 236 |
| 237 } | 237 } |
| 238 | 238 |
| 239 main() { | 239 main() { |
| 240 MintMakerPromiseTest.testMain(); | 240 MintMakerPromiseTest.testMain(); |
| 241 } | 241 } |
| OLD | NEW |