OLD | NEW |
1 #!/usr/bin/env node | 1 #!/usr/bin/env node |
2 // ********** Library dart:core ************** | 2 // ********** Library dart:core ************** |
3 // ********** Natives dart:core ************** | 3 // ********** Natives dart:core ************** |
4 /** | 4 /** |
5 * Generates a dynamic call stub for a function. | 5 * Generates a dynamic call stub for a function. |
6 * Our goal is to create a stub method like this on-the-fly: | 6 * Our goal is to create a stub method like this on-the-fly: |
7 * function($0, $1, capture) { this($0, $1, true, capture); } | 7 * function($0, $1, capture) { this($0, $1, true, capture); } |
8 * | 8 * |
9 * This stub then replaces the dynamic one on Function, with one that is | 9 * This stub then replaces the dynamic one on Function, with one that is |
10 * specialized for that particular function, taking into account its default | 10 * specialized for that particular function, taking into account its default |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 function AssertError(failedAssertion, url, line, column) { | 190 function AssertError(failedAssertion, url, line, column) { |
191 this.failedAssertion = failedAssertion; | 191 this.failedAssertion = failedAssertion; |
192 this.url = url; | 192 this.url = url; |
193 this.line = line; | 193 this.line = line; |
194 this.column = column; | 194 this.column = column; |
195 // Initializers done | 195 // Initializers done |
196 } | 196 } |
197 AssertError.prototype.toString = function() { | 197 AssertError.prototype.toString = function() { |
198 return ("Failed assertion: '" + this.failedAssertion + "' is not true ") + ("i
n " + this.url + " at line " + this.line + ", column " + this.column + "."); | 198 return ("Failed assertion: '" + this.failedAssertion + "' is not true ") + ("i
n " + this.url + " at line " + this.line + ", column " + this.column + "."); |
199 } | 199 } |
| 200 AssertError.prototype.toString$0 = function() { |
| 201 return this.toString(); |
| 202 }; |
200 // ********** Code for Object ************** | 203 // ********** Code for Object ************** |
201 Object.prototype.get$dynamic = function() { | 204 Object.prototype.get$dynamic = function() { |
202 return this; | 205 return this; |
203 } | 206 } |
204 Object.prototype.noSuchMethod = function(name, args) { | 207 Object.prototype.noSuchMethod = function(name, args) { |
205 $throw(new NoSuchMethodException(this, name, args)); | 208 $throw(new NoSuchMethodException(this, name, args)); |
206 } | 209 } |
207 Object.prototype._get$3 = function($0, $1, $2) { | 210 Object.prototype._get$3 = function($0, $1, $2) { |
208 return this.noSuchMethod("_get", [$0, $1, $2]); | 211 return this.noSuchMethod("_get", [$0, $1, $2]); |
209 } | 212 }; |
210 ; | |
211 Object.prototype._set$4 = function($0, $1, $2, $3) { | 213 Object.prototype._set$4 = function($0, $1, $2, $3) { |
212 return this.noSuchMethod("_set", [$0, $1, $2, $3]); | 214 return this.noSuchMethod("_set", [$0, $1, $2, $3]); |
213 } | 215 }; |
214 ; | 216 Object.prototype.accept$1 = function($0) { |
| 217 return this.noSuchMethod("accept", [$0]); |
| 218 }; |
| 219 Object.prototype.add$1 = function($0) { |
| 220 return this.noSuchMethod("add", [$0]); |
| 221 }; |
| 222 Object.prototype.addAll$1 = function($0) { |
| 223 return this.noSuchMethod("addAll", [$0]); |
| 224 }; |
| 225 Object.prototype.addDirectSubtype$1 = function($0) { |
| 226 return this.noSuchMethod("addDirectSubtype", [$0]); |
| 227 }; |
| 228 Object.prototype.addMethod$2 = function($0, $1) { |
| 229 return this.noSuchMethod("addMethod", [$0, $1]); |
| 230 }; |
| 231 Object.prototype.addSource$1 = function($0) { |
| 232 return this.noSuchMethod("addSource", [$0]); |
| 233 }; |
| 234 Object.prototype.beginArguments$1 = function($0) { |
| 235 return this.noSuchMethod("beginArguments", [$0]); |
| 236 }; |
| 237 Object.prototype.beginBlock$1 = function($0) { |
| 238 return this.noSuchMethod("beginBlock", [$0]); |
| 239 }; |
| 240 Object.prototype.beginClass$1 = function($0) { |
| 241 return this.noSuchMethod("beginClass", [$0]); |
| 242 }; |
| 243 Object.prototype.beginExpressionStatement$1 = function($0) { |
| 244 return this.noSuchMethod("beginExpressionStatement", [$0]); |
| 245 }; |
| 246 Object.prototype.beginForStatement$1 = function($0) { |
| 247 return this.noSuchMethod("beginForStatement", [$0]); |
| 248 }; |
| 249 Object.prototype.beginFormalParameter$1 = function($0) { |
| 250 return this.noSuchMethod("beginFormalParameter", [$0]); |
| 251 }; |
| 252 Object.prototype.beginFormalParameters$1 = function($0) { |
| 253 return this.noSuchMethod("beginFormalParameters", [$0]); |
| 254 }; |
| 255 Object.prototype.beginFunction$1 = function($0) { |
| 256 return this.noSuchMethod("beginFunction", [$0]); |
| 257 }; |
| 258 Object.prototype.beginFunctionBody$1 = function($0) { |
| 259 return this.noSuchMethod("beginFunctionBody", [$0]); |
| 260 }; |
| 261 Object.prototype.beginFunctionName$1 = function($0) { |
| 262 return this.noSuchMethod("beginFunctionName", [$0]); |
| 263 }; |
| 264 Object.prototype.beginFunctionTypeAlias$1 = function($0) { |
| 265 return this.noSuchMethod("beginFunctionTypeAlias", [$0]); |
| 266 }; |
| 267 Object.prototype.beginIfStatement$1 = function($0) { |
| 268 return this.noSuchMethod("beginIfStatement", [$0]); |
| 269 }; |
| 270 Object.prototype.beginInitializedIdentifier$1 = function($0) { |
| 271 return this.noSuchMethod("beginInitializedIdentifier", [$0]); |
| 272 }; |
| 273 Object.prototype.beginInitializer$1 = function($0) { |
| 274 return this.noSuchMethod("beginInitializer", [$0]); |
| 275 }; |
| 276 Object.prototype.beginInterface$1 = function($0) { |
| 277 return this.noSuchMethod("beginInterface", [$0]); |
| 278 }; |
| 279 Object.prototype.beginLibraryTag$1 = function($0) { |
| 280 return this.noSuchMethod("beginLibraryTag", [$0]); |
| 281 }; |
| 282 Object.prototype.beginReturnStatement$1 = function($0) { |
| 283 return this.noSuchMethod("beginReturnStatement", [$0]); |
| 284 }; |
| 285 Object.prototype.beginSend$1 = function($0) { |
| 286 return this.noSuchMethod("beginSend", [$0]); |
| 287 }; |
| 288 Object.prototype.beginThrowStatement$1 = function($0) { |
| 289 return this.noSuchMethod("beginThrowStatement", [$0]); |
| 290 }; |
| 291 Object.prototype.beginTopLevelMember$1 = function($0) { |
| 292 return this.noSuchMethod("beginTopLevelMember", [$0]); |
| 293 }; |
215 Object.prototype.beginTypeArguments$1 = function($0) { | 294 Object.prototype.beginTypeArguments$1 = function($0) { |
216 return this.noSuchMethod("beginTypeArguments", [$0]); | 295 return this.noSuchMethod("beginTypeArguments", [$0]); |
217 } | 296 }; |
218 ; | 297 Object.prototype.beginTypeVariable$1 = function($0) { |
| 298 return this.noSuchMethod("beginTypeVariable", [$0]); |
| 299 }; |
219 Object.prototype.beginTypeVariables$1 = function($0) { | 300 Object.prototype.beginTypeVariables$1 = function($0) { |
220 return this.noSuchMethod("beginTypeVariables", [$0]); | 301 return this.noSuchMethod("beginTypeVariables", [$0]); |
221 } | 302 }; |
222 ; | 303 Object.prototype.beginVariablesDeclaration$1 = function($0) { |
| 304 return this.noSuchMethod("beginVariablesDeclaration", [$0]); |
| 305 }; |
| 306 Object.prototype.block$0 = function() { |
| 307 return this.noSuchMethod("block", []); |
| 308 }; |
| 309 Object.prototype.canInvoke$2 = function($0, $1) { |
| 310 return this.noSuchMethod("canInvoke", [$0, $1]); |
| 311 }; |
| 312 Object.prototype.charCodeAt$1 = function($0) { |
| 313 return this.noSuchMethod("charCodeAt", [$0]); |
| 314 }; |
| 315 Object.prototype.checkFirstClass$1 = function($0) { |
| 316 return this.noSuchMethod("checkFirstClass", [$0]); |
| 317 }; |
| 318 Object.prototype.compareTo$1 = function($0) { |
| 319 return this.noSuchMethod("compareTo", [$0]); |
| 320 }; |
| 321 Object.prototype.computeType$2 = function($0, $1) { |
| 322 return this.noSuchMethod("computeType", [$0, $1]); |
| 323 }; |
| 324 Object.prototype.computeValue$0 = function() { |
| 325 return this.noSuchMethod("computeValue", []); |
| 326 }; |
| 327 Object.prototype.contains$1 = function($0) { |
| 328 return this.noSuchMethod("contains", [$0]); |
| 329 }; |
| 330 Object.prototype.convertTo$3 = function($0, $1, $2) { |
| 331 return this.noSuchMethod("convertTo", [$0, $1, $2]); |
| 332 }; |
| 333 Object.prototype.convertTo$4 = function($0, $1, $2, $3) { |
| 334 return this.noSuchMethod("convertTo", [$0, $1, $2, $3]); |
| 335 }; |
| 336 Object.prototype.copyWithNewType$1 = function($0) { |
| 337 return this.noSuchMethod("copyWithNewType", [$0]); |
| 338 }; |
| 339 Object.prototype.endArguments$3 = function($0, $1, $2) { |
| 340 return this.noSuchMethod("endArguments", [$0, $1, $2]); |
| 341 }; |
| 342 Object.prototype.endBlock$3 = function($0, $1, $2) { |
| 343 return this.noSuchMethod("endBlock", [$0, $1, $2]); |
| 344 }; |
| 345 Object.prototype.endClass$5 = function($0, $1, $2, $3, $4) { |
| 346 return this.noSuchMethod("endClass", [$0, $1, $2, $3, $4]); |
| 347 }; |
| 348 Object.prototype.endExpressionStatement$1 = function($0) { |
| 349 return this.noSuchMethod("endExpressionStatement", [$0]); |
| 350 }; |
| 351 Object.prototype.endForStatement$2 = function($0, $1) { |
| 352 return this.noSuchMethod("endForStatement", [$0, $1]); |
| 353 }; |
| 354 Object.prototype.endFormalParameter$1 = function($0) { |
| 355 return this.noSuchMethod("endFormalParameter", [$0]); |
| 356 }; |
| 357 Object.prototype.endFormalParameters$3 = function($0, $1, $2) { |
| 358 return this.noSuchMethod("endFormalParameters", [$0, $1, $2]); |
| 359 }; |
| 360 Object.prototype.endFunctionBody$3 = function($0, $1, $2) { |
| 361 return this.noSuchMethod("endFunctionBody", [$0, $1, $2]); |
| 362 }; |
| 363 Object.prototype.endFunctionName$1 = function($0) { |
| 364 return this.noSuchMethod("endFunctionName", [$0]); |
| 365 }; |
| 366 Object.prototype.endFunctionTypeAlias$1 = function($0) { |
| 367 return this.noSuchMethod("endFunctionTypeAlias", [$0]); |
| 368 }; |
| 369 Object.prototype.endIfStatement$2 = function($0, $1) { |
| 370 return this.noSuchMethod("endIfStatement", [$0, $1]); |
| 371 }; |
| 372 Object.prototype.endInitializedIdentifier$0 = function() { |
| 373 return this.noSuchMethod("endInitializedIdentifier", []); |
| 374 }; |
| 375 Object.prototype.endInitializer$1 = function($0) { |
| 376 return this.noSuchMethod("endInitializer", [$0]); |
| 377 }; |
| 378 Object.prototype.endInterface$1 = function($0) { |
| 379 return this.noSuchMethod("endInterface", [$0]); |
| 380 }; |
| 381 Object.prototype.endRethrowStatement$2 = function($0, $1) { |
| 382 return this.noSuchMethod("endRethrowStatement", [$0, $1]); |
| 383 }; |
| 384 Object.prototype.endReturnStatement$3 = function($0, $1, $2) { |
| 385 return this.noSuchMethod("endReturnStatement", [$0, $1, $2]); |
| 386 }; |
| 387 Object.prototype.endSend$1 = function($0) { |
| 388 return this.noSuchMethod("endSend", [$0]); |
| 389 }; |
| 390 Object.prototype.endThrowStatement$2 = function($0, $1) { |
| 391 return this.noSuchMethod("endThrowStatement", [$0, $1]); |
| 392 }; |
| 393 Object.prototype.endTopLevelField$2 = function($0, $1) { |
| 394 return this.noSuchMethod("endTopLevelField", [$0, $1]); |
| 395 }; |
| 396 Object.prototype.endTopLevelMethod$2 = function($0, $1) { |
| 397 return this.noSuchMethod("endTopLevelMethod", [$0, $1]); |
| 398 }; |
| 399 Object.prototype.endType$1 = function($0) { |
| 400 return this.noSuchMethod("endType", [$0]); |
| 401 }; |
223 Object.prototype.endTypeArguments$3 = function($0, $1, $2) { | 402 Object.prototype.endTypeArguments$3 = function($0, $1, $2) { |
224 return this.noSuchMethod("endTypeArguments", [$0, $1, $2]); | 403 return this.noSuchMethod("endTypeArguments", [$0, $1, $2]); |
225 } | 404 }; |
226 ; | 405 Object.prototype.endTypeVariable$1 = function($0) { |
| 406 return this.noSuchMethod("endTypeVariable", [$0]); |
| 407 }; |
227 Object.prototype.endTypeVariables$3 = function($0, $1, $2) { | 408 Object.prototype.endTypeVariables$3 = function($0, $1, $2) { |
228 return this.noSuchMethod("endTypeVariables", [$0, $1, $2]); | 409 return this.noSuchMethod("endTypeVariables", [$0, $1, $2]); |
229 } | 410 }; |
230 ; | 411 Object.prototype.endVariablesDeclaration$2 = function($0, $1) { |
| 412 return this.noSuchMethod("endVariablesDeclaration", [$0, $1]); |
| 413 }; |
| 414 Object.prototype.endsWith$1 = function($0) { |
| 415 return this.noSuchMethod("endsWith", [$0]); |
| 416 }; |
| 417 Object.prototype.ensureSubtypeOf$3 = function($0, $1, $2) { |
| 418 return this.noSuchMethod("ensureSubtypeOf", [$0, $1, $2]); |
| 419 }; |
| 420 Object.prototype.expected$2 = function($0, $1) { |
| 421 return this.noSuchMethod("expected", [$0, $1]); |
| 422 }; |
| 423 Object.prototype.expectedBlock$1 = function($0) { |
| 424 return this.noSuchMethod("expectedBlock", [$0]); |
| 425 }; |
| 426 Object.prototype.expectedIdentifier$1 = function($0) { |
| 427 return this.noSuchMethod("expectedIdentifier", [$0]); |
| 428 }; |
| 429 Object.prototype.expectedType$1 = function($0) { |
| 430 return this.noSuchMethod("expectedType", [$0]); |
| 431 }; |
| 432 Object.prototype.filter$1 = function($0) { |
| 433 return this.noSuchMethod("filter", [$0]); |
| 434 }; |
| 435 Object.prototype.genValue$2 = function($0, $1) { |
| 436 return this.noSuchMethod("genValue", [$0, $1]); |
| 437 }; |
| 438 Object.prototype.generate$1 = function($0) { |
| 439 return this.noSuchMethod("generate", [$0]); |
| 440 }; |
| 441 Object.prototype.generateBody$2 = function($0, $1) { |
| 442 return this.noSuchMethod("generateBody", [$0, $1]); |
| 443 }; |
| 444 Object.prototype.getBeginToken$0 = function() { |
| 445 return this.noSuchMethod("getBeginToken", []); |
| 446 }; |
| 447 Object.prototype.getConstructor$1 = function($0) { |
| 448 return this.noSuchMethod("getConstructor", [$0]); |
| 449 }; |
| 450 Object.prototype.getEndToken$0 = function() { |
| 451 return this.noSuchMethod("getEndToken", []); |
| 452 }; |
| 453 Object.prototype.getKeys$0 = function() { |
| 454 return this.noSuchMethod("getKeys", []); |
| 455 }; |
| 456 Object.prototype.getMember$1 = function($0) { |
| 457 return this.noSuchMethod("getMember", [$0]); |
| 458 }; |
| 459 Object.prototype.getOrMakeConcreteType$1 = function($0) { |
| 460 return this.noSuchMethod("getOrMakeConcreteType", [$0]); |
| 461 }; |
| 462 Object.prototype.get_$3 = function($0, $1, $2) { |
| 463 return this.noSuchMethod("get_", [$0, $1, $2]); |
| 464 }; |
| 465 Object.prototype.handleAssignmentExpression$1 = function($0) { |
| 466 return this.noSuchMethod("handleAssignmentExpression", [$0]); |
| 467 }; |
| 468 Object.prototype.handleBinaryExpression$1 = function($0) { |
| 469 return this.noSuchMethod("handleBinaryExpression", [$0]); |
| 470 }; |
| 471 Object.prototype.handleConditionalExpression$2 = function($0, $1) { |
| 472 return this.noSuchMethod("handleConditionalExpression", [$0, $1]); |
| 473 }; |
| 474 Object.prototype.handleFinalKeyword$1 = function($0) { |
| 475 return this.noSuchMethod("handleFinalKeyword", [$0]); |
| 476 }; |
| 477 Object.prototype.handleIdentifier$1 = function($0) { |
| 478 return this.noSuchMethod("handleIdentifier", [$0]); |
| 479 }; |
| 480 Object.prototype.handleLiteralBool$1 = function($0) { |
| 481 return this.noSuchMethod("handleLiteralBool", [$0]); |
| 482 }; |
| 483 Object.prototype.handleLiteralDouble$1 = function($0) { |
| 484 return this.noSuchMethod("handleLiteralDouble", [$0]); |
| 485 }; |
| 486 Object.prototype.handleLiteralInt$1 = function($0) { |
| 487 return this.noSuchMethod("handleLiteralInt", [$0]); |
| 488 }; |
| 489 Object.prototype.handleLiteralString$1 = function($0) { |
| 490 return this.noSuchMethod("handleLiteralString", [$0]); |
| 491 }; |
| 492 Object.prototype.handleNoArguments$1 = function($0) { |
| 493 return this.noSuchMethod("handleNoArguments", [$0]); |
| 494 }; |
| 495 Object.prototype.handleNoType$1 = function($0) { |
| 496 return this.noSuchMethod("handleNoType", [$0]); |
| 497 }; |
231 Object.prototype.handleNoTypeArguments$1 = function($0) { | 498 Object.prototype.handleNoTypeArguments$1 = function($0) { |
232 return this.noSuchMethod("handleNoTypeArguments", [$0]); | 499 return this.noSuchMethod("handleNoTypeArguments", [$0]); |
233 } | 500 }; |
234 ; | |
235 Object.prototype.handleNoTypeVariables$1 = function($0) { | 501 Object.prototype.handleNoTypeVariables$1 = function($0) { |
236 return this.noSuchMethod("handleNoTypeVariables", [$0]); | 502 return this.noSuchMethod("handleNoTypeVariables", [$0]); |
237 } | 503 }; |
238 ; | 504 Object.prototype.handleVarKeyword$1 = function($0) { |
| 505 return this.noSuchMethod("handleVarKeyword", [$0]); |
| 506 }; |
| 507 Object.prototype.handleVoidKeyword$1 = function($0) { |
| 508 return this.noSuchMethod("handleVoidKeyword", [$0]); |
| 509 }; |
| 510 Object.prototype.hasNext$0 = function() { |
| 511 return this.noSuchMethod("hasNext", []); |
| 512 }; |
| 513 Object.prototype.hashCode$0 = function() { |
| 514 return this.noSuchMethod("hashCode", []); |
| 515 }; |
| 516 Object.prototype.indexOf$2 = function($0, $1) { |
| 517 return this.noSuchMethod("indexOf", [$0, $1]); |
| 518 }; |
| 519 Object.prototype.instanceOf$3$isTrue$forceCheck = function($0, $1, $2, isTrue, f
orceCheck) { |
| 520 return this.noSuchMethod("instanceOf", [$0, $1, $2, isTrue, forceCheck]); |
| 521 }; |
| 522 Object.prototype.instanceOf$4 = function($0, $1, $2, $3) { |
| 523 return this.noSuchMethod("instanceOf", [$0, $1, $2, $3]); |
| 524 }; |
239 Object.prototype.invoke$4 = function($0, $1, $2, $3) { | 525 Object.prototype.invoke$4 = function($0, $1, $2, $3) { |
240 return this.noSuchMethod("invoke", [$0, $1, $2, $3]); | 526 return this.noSuchMethod("invoke", [$0, $1, $2, $3]); |
241 } | 527 }; |
242 ; | 528 Object.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
| 529 return this.noSuchMethod("invoke", [$0, $1, $2, $3, isDynamic]); |
| 530 }; |
| 531 Object.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
| 532 return this.noSuchMethod("invoke", [$0, $1, $2, $3, $4]); |
| 533 }; |
| 534 Object.prototype.isAssignable$1 = function($0) { |
| 535 return this.noSuchMethod("isAssignable", [$0]); |
| 536 }; |
| 537 Object.prototype.isEmpty$0 = function() { |
| 538 return this.noSuchMethod("isEmpty", []); |
| 539 }; |
| 540 Object.prototype.isExitBlock$0 = function() { |
| 541 return this.noSuchMethod("isExitBlock", []); |
| 542 }; |
| 543 Object.prototype.isInBasicBlock$0 = function() { |
| 544 return this.noSuchMethod("isInBasicBlock", []); |
| 545 }; |
| 546 Object.prototype.isLiteralNumber$0 = function() { |
| 547 return this.noSuchMethod("isLiteralNumber", []); |
| 548 }; |
| 549 Object.prototype.isLiteralString$0 = function() { |
| 550 return this.noSuchMethod("isLiteralString", []); |
| 551 }; |
| 552 Object.prototype.isSubtypeOf$1 = function($0) { |
| 553 return this.noSuchMethod("isSubtypeOf", [$0]); |
| 554 }; |
| 555 Object.prototype.iterator$0 = function() { |
| 556 return this.noSuchMethod("iterator", []); |
| 557 }; |
| 558 Object.prototype.last$0 = function() { |
| 559 return this.noSuchMethod("last", []); |
| 560 }; |
| 561 Object.prototype.lookup$1 = function($0) { |
| 562 return this.noSuchMethod("lookup", [$0]); |
| 563 }; |
| 564 Object.prototype.markUsed$0 = function() { |
| 565 return this.noSuchMethod("markUsed", []); |
| 566 }; |
| 567 Object.prototype.namesInOrder$1 = function($0) { |
| 568 return this.noSuchMethod("namesInOrder", [$0]); |
| 569 }; |
| 570 Object.prototype.needsConversion$1 = function($0) { |
| 571 return this.noSuchMethod("needsConversion", [$0]); |
| 572 }; |
| 573 Object.prototype.next$0 = function() { |
| 574 return this.noSuchMethod("next", []); |
| 575 }; |
| 576 Object.prototype.parseClass$1 = function($0) { |
| 577 return this.noSuchMethod("parseClass", [$0]); |
| 578 }; |
| 579 Object.prototype.parseFunction$1 = function($0) { |
| 580 return this.noSuchMethod("parseFunction", [$0]); |
| 581 }; |
| 582 Object.prototype.printOn$1 = function($0) { |
| 583 return this.noSuchMethod("printOn", [$0]); |
| 584 }; |
| 585 Object.prototype.provideFieldSyntax$0 = function() { |
| 586 return this.noSuchMethod("provideFieldSyntax", []); |
| 587 }; |
| 588 Object.prototype.providePropertySyntax$0 = function() { |
| 589 return this.noSuchMethod("providePropertySyntax", []); |
| 590 }; |
| 591 Object.prototype.removeLast$0 = function() { |
| 592 return this.noSuchMethod("removeLast", []); |
| 593 }; |
| 594 Object.prototype.replaceAll$2 = function($0, $1) { |
| 595 return this.noSuchMethod("replaceAll", [$0, $1]); |
| 596 }; |
| 597 Object.prototype.replaceFirst$2 = function($0, $1) { |
| 598 return this.noSuchMethod("replaceFirst", [$0, $1]); |
| 599 }; |
| 600 Object.prototype.resolve$0 = function() { |
| 601 return this.noSuchMethod("resolve", []); |
| 602 }; |
| 603 Object.prototype.resolve$1 = function($0) { |
| 604 return this.noSuchMethod("resolve", [$0]); |
| 605 }; |
| 606 Object.prototype.resolve$2 = function($0, $1) { |
| 607 return this.noSuchMethod("resolve", [$0, $1]); |
| 608 }; |
| 609 Object.prototype.resolveMember$1 = function($0) { |
| 610 return this.noSuchMethod("resolveMember", [$0]); |
| 611 }; |
| 612 Object.prototype.resolveTypeParams$1 = function($0) { |
| 613 return this.noSuchMethod("resolveTypeParams", [$0]); |
| 614 }; |
| 615 Object.prototype.setDefinition$1 = function($0) { |
| 616 return this.noSuchMethod("setDefinition", [$0]); |
| 617 }; |
| 618 Object.prototype.setGenerateAtUseSite$0 = function() { |
| 619 return this.noSuchMethod("setGenerateAtUseSite", []); |
| 620 }; |
| 621 Object.prototype.set_$4 = function($0, $1, $2, $3) { |
| 622 return this.noSuchMethod("set_", [$0, $1, $2, $3]); |
| 623 }; |
| 624 Object.prototype.some$1 = function($0) { |
| 625 return this.noSuchMethod("some", [$0]); |
| 626 }; |
| 627 Object.prototype.sort$1 = function($0) { |
| 628 return this.noSuchMethod("sort", [$0]); |
| 629 }; |
| 630 Object.prototype.startsWith$1 = function($0) { |
| 631 return this.noSuchMethod("startsWith", [$0]); |
| 632 }; |
| 633 Object.prototype.substring$1 = function($0) { |
| 634 return this.noSuchMethod("substring", [$0]); |
| 635 }; |
| 636 Object.prototype.substring$2 = function($0, $1) { |
| 637 return this.noSuchMethod("substring", [$0, $1]); |
| 638 }; |
| 639 Object.prototype.toString$0 = function() { |
| 640 return this.toString(); |
| 641 }; |
| 642 Object.prototype.unexpected$1 = function($0) { |
| 643 return this.noSuchMethod("unexpected", [$0]); |
| 644 }; |
| 645 Object.prototype.unexpectedEof$0 = function() { |
| 646 return this.noSuchMethod("unexpectedEof", []); |
| 647 }; |
| 648 Object.prototype.unimplemented$1 = function($0) { |
| 649 return this.noSuchMethod("unimplemented", [$0]); |
| 650 }; |
| 651 Object.prototype.visit$1 = function($0) { |
| 652 return this.noSuchMethod("visit", [$0]); |
| 653 }; |
243 Object.prototype.visitPostfixExpression$1 = function($0) { | 654 Object.prototype.visitPostfixExpression$1 = function($0) { |
244 return this.noSuchMethod("visitPostfixExpression", [$0]); | 655 return this.noSuchMethod("visitPostfixExpression", [$0]); |
245 } | 656 }; |
246 ; | 657 Object.prototype.visitSources$0 = function() { |
| 658 return this.noSuchMethod("visitSources", []); |
| 659 }; |
| 660 Object.prototype.writeDefinition$2 = function($0, $1) { |
| 661 return this.noSuchMethod("writeDefinition", [$0, $1]); |
| 662 }; |
247 function $assert_bool(x) { | 663 function $assert_bool(x) { |
248 if (x == null || typeof(x) == "boolean") return x; | 664 if (x == null || typeof(x) == "boolean") return x; |
249 throw new TypeError("'" + x + "' is not a bool."); | 665 throw new TypeError("'" + x + "' is not a bool."); |
250 } | 666 } |
251 // ********** Code for IllegalAccessException ************** | 667 // ********** Code for IllegalAccessException ************** |
252 function IllegalAccessException() { | 668 function IllegalAccessException() { |
253 // Initializers done | 669 // Initializers done |
254 } | 670 } |
255 IllegalAccessException.prototype.toString = function() { | 671 IllegalAccessException.prototype.toString = function() { |
256 return "Attempt to modify an immutable object"; | 672 return "Attempt to modify an immutable object"; |
257 } | 673 } |
| 674 IllegalAccessException.prototype.toString$0 = function() { |
| 675 return this.toString(); |
| 676 }; |
258 // ********** Code for NoSuchMethodException ************** | 677 // ********** Code for NoSuchMethodException ************** |
259 function NoSuchMethodException(_receiver, _functionName, _arguments) { | 678 function NoSuchMethodException(_receiver, _functionName, _arguments) { |
260 this._receiver = _receiver; | 679 this._receiver = _receiver; |
261 this._functionName = _functionName; | 680 this._functionName = _functionName; |
262 this._arguments = _arguments; | 681 this._arguments = _arguments; |
263 // Initializers done | 682 // Initializers done |
264 } | 683 } |
265 NoSuchMethodException.prototype.toString = function() { | 684 NoSuchMethodException.prototype.toString = function() { |
266 var sb = new StringBufferImpl(""); | 685 var sb = new StringBufferImpl(""); |
267 for (var i = 0; | 686 for (var i = 0; |
268 i < this._arguments.length; i++) { | 687 i < this._arguments.length; i++) { |
269 if (i > 0) { | 688 if (i > 0) { |
270 sb.add(", "); | 689 sb.add(", "); |
271 } | 690 } |
272 sb.add(this._arguments.$index(i)); | 691 sb.add(this._arguments.$index(i)); |
273 } | 692 } |
274 sb.add("]"); | 693 sb.add("]"); |
275 return ("NoSuchMethodException - receiver: '" + this._receiver + "' ") + ("fun
ction name: '" + this._functionName + "' arguments: [" + sb + "]"); | 694 return ("NoSuchMethodException - receiver: '" + this._receiver + "' ") + ("fun
ction name: '" + this._functionName + "' arguments: [" + sb + "]"); |
276 } | 695 } |
| 696 NoSuchMethodException.prototype.toString$0 = function() { |
| 697 return this.toString(); |
| 698 }; |
277 // ********** Code for ObjectNotClosureException ************** | 699 // ********** Code for ObjectNotClosureException ************** |
278 function ObjectNotClosureException() {} | 700 function ObjectNotClosureException() {} |
279 ObjectNotClosureException.prototype.toString = function() { | 701 ObjectNotClosureException.prototype.toString = function() { |
280 return "Object is not closure"; | 702 return "Object is not closure"; |
281 } | 703 } |
| 704 ObjectNotClosureException.prototype.toString$0 = function() { |
| 705 return this.toString(); |
| 706 }; |
282 // ********** Code for StackOverflowException ************** | 707 // ********** Code for StackOverflowException ************** |
283 function StackOverflowException() {} | 708 function StackOverflowException() {} |
284 StackOverflowException.prototype.toString = function() { | 709 StackOverflowException.prototype.toString = function() { |
285 return "Stack Overflow"; | 710 return "Stack Overflow"; |
286 } | 711 } |
| 712 StackOverflowException.prototype.toString$0 = function() { |
| 713 return this.toString(); |
| 714 }; |
287 // ********** Code for BadNumberFormatException ************** | 715 // ********** Code for BadNumberFormatException ************** |
288 function BadNumberFormatException() {} | 716 function BadNumberFormatException() {} |
289 BadNumberFormatException.prototype.toString = function() { | 717 BadNumberFormatException.prototype.toString = function() { |
290 return ("BadNumberFormatException: '" + this._s + "'"); | 718 return ("BadNumberFormatException: '" + this._s + "'"); |
291 } | 719 } |
| 720 BadNumberFormatException.prototype.toString$0 = function() { |
| 721 return this.toString(); |
| 722 }; |
292 // ********** Code for NullPointerException ************** | 723 // ********** Code for NullPointerException ************** |
293 function NullPointerException() {} | 724 function NullPointerException() {} |
294 NullPointerException.prototype.toString = function() { | 725 NullPointerException.prototype.toString = function() { |
295 return "NullPointerException"; | 726 return "NullPointerException"; |
296 } | 727 } |
| 728 NullPointerException.prototype.toString$0 = function() { |
| 729 return this.toString(); |
| 730 }; |
297 // ********** Code for NoMoreElementsException ************** | 731 // ********** Code for NoMoreElementsException ************** |
298 function NoMoreElementsException() { | 732 function NoMoreElementsException() { |
299 // Initializers done | 733 // Initializers done |
300 } | 734 } |
301 NoMoreElementsException.prototype.toString = function() { | 735 NoMoreElementsException.prototype.toString = function() { |
302 return "NoMoreElementsException"; | 736 return "NoMoreElementsException"; |
303 } | 737 } |
| 738 NoMoreElementsException.prototype.toString$0 = function() { |
| 739 return this.toString(); |
| 740 }; |
304 // ********** Code for EmptyQueueException ************** | 741 // ********** Code for EmptyQueueException ************** |
305 function EmptyQueueException() { | 742 function EmptyQueueException() { |
306 // Initializers done | 743 // Initializers done |
307 } | 744 } |
308 EmptyQueueException.prototype.toString = function() { | 745 EmptyQueueException.prototype.toString = function() { |
309 return "EmptyQueueException"; | 746 return "EmptyQueueException"; |
310 } | 747 } |
| 748 EmptyQueueException.prototype.toString$0 = function() { |
| 749 return this.toString(); |
| 750 }; |
311 // ********** Code for IntegerDivisionByZeroException ************** | 751 // ********** Code for IntegerDivisionByZeroException ************** |
312 function IntegerDivisionByZeroException() {} | 752 function IntegerDivisionByZeroException() {} |
313 IntegerDivisionByZeroException.prototype.toString = function() { | 753 IntegerDivisionByZeroException.prototype.toString = function() { |
314 return "IntegerDivisionByZeroException"; | 754 return "IntegerDivisionByZeroException"; |
315 } | 755 } |
| 756 IntegerDivisionByZeroException.prototype.toString$0 = function() { |
| 757 return this.toString(); |
| 758 }; |
316 // ********** Code for Function ************** | 759 // ********** Code for Function ************** |
317 Function.prototype.to$call$0 = function() { | 760 Function.prototype.to$call$0 = function() { |
318 this.call$0 = this.$genStub(0); | 761 this.call$0 = this.$genStub(0); |
319 this.to$call$0 = function() { return this.call$0; }; | 762 this.to$call$0 = function() { return this.call$0; }; |
320 return this.call$0; | 763 return this.call$0; |
321 }; | 764 }; |
322 Function.prototype.call$0 = function() { | 765 Function.prototype.call$0 = function() { |
323 return this.to$call$0()(); | 766 return this.to$call$0()(); |
324 }; | 767 }; |
325 function to$call$0(f) { return f && f.to$call$0(); } | 768 function to$call$0(f) { return f && f.to$call$0(); } |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 ListFactory = Array; | 1337 ListFactory = Array; |
895 ListFactory.prototype.is$ListFactory = function(){return this;}; | 1338 ListFactory.prototype.is$ListFactory = function(){return this;}; |
896 ListFactory.prototype.is$List = function(){return this;}; | 1339 ListFactory.prototype.is$List = function(){return this;}; |
897 ListFactory.prototype.is$List$ArgumentNode = function(){return this;}; | 1340 ListFactory.prototype.is$List$ArgumentNode = function(){return this;}; |
898 ListFactory.prototype.is$List$Definition = function(){return this;}; | 1341 ListFactory.prototype.is$List$Definition = function(){return this;}; |
899 ListFactory.prototype.is$List$EvaluatedValue = function(){return this;}; | 1342 ListFactory.prototype.is$List$EvaluatedValue = function(){return this;}; |
900 ListFactory.prototype.is$List$String = function(){return this;}; | 1343 ListFactory.prototype.is$List$String = function(){return this;}; |
901 ListFactory.prototype.is$List$Type = function(){return this;}; | 1344 ListFactory.prototype.is$List$Type = function(){return this;}; |
902 ListFactory.prototype.is$List$Value = function(){return this;}; | 1345 ListFactory.prototype.is$List$Value = function(){return this;}; |
903 ListFactory.prototype.is$List$int = function(){return this;}; | 1346 ListFactory.prototype.is$List$int = function(){return this;}; |
| 1347 ListFactory.prototype.is$Collection$E = function(){return this;}; |
| 1348 ListFactory.prototype.is$Collection$Object = function(){return this;}; |
904 ListFactory.prototype.is$Collection$Type = function(){return this;}; | 1349 ListFactory.prototype.is$Collection$Type = function(){return this;}; |
905 ListFactory.prototype.is$Iterable = function(){return this;}; | 1350 ListFactory.prototype.is$Iterable = function(){return this;}; |
906 ListFactory.ListFactory$from$factory = function(other) { | 1351 ListFactory.ListFactory$from$factory = function(other) { |
907 var list = []; | 1352 var list = []; |
908 for (var $i = other.iterator(); $i.hasNext(); ) { | 1353 for (var $i = other.iterator(); $i.hasNext$0(); ) { |
909 var e = $i.next(); | 1354 var e = $i.next$0(); |
910 list.add(e); | 1355 list.add(e); |
911 } | 1356 } |
912 return (list && list.is$ListFactory()); | 1357 return (list && list.is$ListFactory()); |
913 } | 1358 } |
914 ListFactory.prototype.add = function(value) { | 1359 ListFactory.prototype.add = function(value) { |
915 this.push(value); | 1360 this.push(value); |
916 } | 1361 } |
917 ListFactory.prototype.addLast = function(value) { | 1362 ListFactory.prototype.addLast = function(value) { |
918 this.push(value); | 1363 this.push(value); |
919 } | 1364 } |
920 ListFactory.prototype.addAll = function(collection) { | 1365 ListFactory.prototype.addAll = function(collection) { |
921 for (var $i = collection.iterator(); $i.hasNext(); ) { | 1366 for (var $i = collection.iterator(); $i.hasNext$0(); ) { |
922 var item = $i.next(); | 1367 var item = $i.next$0(); |
923 this.add(item); | 1368 this.add(item); |
924 } | 1369 } |
925 } | 1370 } |
926 ListFactory.prototype.clear = function() { | 1371 ListFactory.prototype.clear = function() { |
927 this.length = 0; | 1372 this.length = 0; |
928 } | 1373 } |
929 ListFactory.prototype.removeLast = function() { | 1374 ListFactory.prototype.removeLast = function() { |
930 return this.pop(); | 1375 return this.pop(); |
931 } | 1376 } |
932 ListFactory.prototype.last = function() { | 1377 ListFactory.prototype.last = function() { |
933 return this[this.length - 1]; | 1378 return this[this.length - 1]; |
934 } | 1379 } |
935 ListFactory.prototype.getRange = function(start, length) { | 1380 ListFactory.prototype.getRange = function(start, length) { |
936 return this.slice(start, start + length); | 1381 return this.slice(start, start + length); |
937 } | 1382 } |
938 ListFactory.prototype.isEmpty = function() { | 1383 ListFactory.prototype.isEmpty = function() { |
939 return this.length == 0; | 1384 return this.length == 0; |
940 } | 1385 } |
941 ListFactory.prototype.iterator = function() { | 1386 ListFactory.prototype.iterator = function() { |
942 return new ListIterator(this); | 1387 return new ListIterator(this); |
943 } | 1388 } |
| 1389 ListFactory.prototype.add$1 = ListFactory.prototype.add; |
| 1390 ListFactory.prototype.addAll$1 = function($0) { |
| 1391 return this.addAll(($0 && $0.is$Collection$E())); |
| 1392 }; |
| 1393 ListFactory.prototype.filter$1 = ListFactory.prototype.filter; |
| 1394 ListFactory.prototype.indexOf$2 = ListFactory.prototype.indexOf; |
| 1395 ListFactory.prototype.isEmpty$0 = function() { |
| 1396 return this.isEmpty(); |
| 1397 }; |
| 1398 ListFactory.prototype.iterator$0 = function() { |
| 1399 return this.iterator(); |
| 1400 }; |
| 1401 ListFactory.prototype.last$0 = function() { |
| 1402 return this.last(); |
| 1403 }; |
| 1404 ListFactory.prototype.removeLast$0 = function() { |
| 1405 return this.removeLast(); |
| 1406 }; |
| 1407 ListFactory.prototype.some$1 = ListFactory.prototype.some; |
| 1408 ListFactory.prototype.sort$1 = ListFactory.prototype.sort; |
944 ListFactory$DoubleLinkedQueueEntry$KeyValuePair$K$V = ListFactory; | 1409 ListFactory$DoubleLinkedQueueEntry$KeyValuePair$K$V = ListFactory; |
945 ListFactory$DoubleLinkedQueueEntry$KeyValuePair$Node$Element = ListFactory; | 1410 ListFactory$DoubleLinkedQueueEntry$KeyValuePair$Node$Element = ListFactory; |
946 ListFactory$DoubleLinkedQueueEntry$KeyValuePair$String$Keyword = ListFactory; | 1411 ListFactory$DoubleLinkedQueueEntry$KeyValuePair$String$Keyword = ListFactory; |
947 ListFactory$E = ListFactory; | 1412 ListFactory$E = ListFactory; |
948 ListFactory$EvaluatedValue = ListFactory; | 1413 ListFactory$EvaluatedValue = ListFactory; |
949 ListFactory$HBasicBlock = ListFactory; | 1414 ListFactory$HBasicBlock = ListFactory; |
950 ListFactory$HInstruction = ListFactory; | 1415 ListFactory$HInstruction = ListFactory; |
951 ListFactory$K = ListFactory; | 1416 ListFactory$K = ListFactory; |
952 ListFactory$KeywordState = ListFactory; | 1417 ListFactory$KeywordState = ListFactory; |
953 ListFactory$String = ListFactory; | 1418 ListFactory$String = ListFactory; |
954 ListFactory$T = ListFactory; | 1419 ListFactory$T = ListFactory; |
955 ListFactory$Type = ListFactory; | 1420 ListFactory$Type = ListFactory; |
956 ListFactory$V = ListFactory; | 1421 ListFactory$V = ListFactory; |
957 // ********** Code for ListIterator ************** | 1422 // ********** Code for ListIterator ************** |
958 function ListIterator(array) { | 1423 function ListIterator(array) { |
959 this._array = array; | 1424 this._array = array; |
960 this._pos = 0; | 1425 this._pos = 0; |
961 // Initializers done | 1426 // Initializers done |
962 } | 1427 } |
963 ListIterator.prototype.is$Iterator$T = function(){return this;}; | 1428 ListIterator.prototype.is$Iterator$T = function(){return this;}; |
964 ListIterator.prototype.hasNext = function() { | 1429 ListIterator.prototype.hasNext = function() { |
965 return this._array.length > this._pos; | 1430 return this._array.length > this._pos; |
966 } | 1431 } |
967 ListIterator.prototype.next = function() { | 1432 ListIterator.prototype.next = function() { |
968 if (!this.hasNext()) { | 1433 if (!this.hasNext()) { |
969 $throw(const$0/*const NoMoreElementsException()*/); | 1434 $throw(const$0/*const NoMoreElementsException()*/); |
970 } | 1435 } |
971 return this._array.$index(this._pos++); | 1436 return this._array.$index(this._pos++); |
972 } | 1437 } |
| 1438 ListIterator.prototype.hasNext$0 = function() { |
| 1439 return this.hasNext(); |
| 1440 }; |
| 1441 ListIterator.prototype.next$0 = function() { |
| 1442 return this.next(); |
| 1443 }; |
973 // ********** Code for ImmutableList ************** | 1444 // ********** Code for ImmutableList ************** |
974 function ImmutableList(length) { | 1445 function ImmutableList(length) { |
975 this._length = length; | 1446 this._length = length; |
976 ListFactory$E.call(this, length); | 1447 ListFactory$E.call(this, length); |
977 // Initializers done | 1448 // Initializers done |
978 } | 1449 } |
979 /** Implements extends for Dart classes on JavaScript prototypes. */ | 1450 /** Implements extends for Dart classes on JavaScript prototypes. */ |
980 function $inherits(child, parent) { | 1451 function $inherits(child, parent) { |
981 if (child.prototype.__proto__) { | 1452 if (child.prototype.__proto__) { |
982 child.prototype.__proto__ = parent.prototype; | 1453 child.prototype.__proto__ = parent.prototype; |
(...skipping 10 matching lines...) Expand all Loading... |
993 for (var i = 0; | 1464 for (var i = 0; |
994 i < other.length; i++) { | 1465 i < other.length; i++) { |
995 list._setindex(i, other.$index(i)); | 1466 list._setindex(i, other.$index(i)); |
996 } | 1467 } |
997 return list; | 1468 return list; |
998 } | 1469 } |
999 ImmutableList.prototype.get$length = function() { | 1470 ImmutableList.prototype.get$length = function() { |
1000 return this._length; | 1471 return this._length; |
1001 } | 1472 } |
1002 ImmutableList.prototype.set$length = function(length) { | 1473 ImmutableList.prototype.set$length = function(length) { |
1003 $throw(const$14/*const IllegalAccessException()*/); | 1474 $throw(const$4/*const IllegalAccessException()*/); |
1004 } | 1475 } |
1005 Object.defineProperty(ImmutableList.prototype, "length", { | 1476 Object.defineProperty(ImmutableList.prototype, "length", { |
1006 get: ImmutableList.prototype.get$length, | 1477 get: ImmutableList.prototype.get$length, |
1007 set: ImmutableList.prototype.set$length | 1478 set: ImmutableList.prototype.set$length |
1008 }); | 1479 }); |
1009 ImmutableList.prototype._setindex = function(index, value) { | 1480 ImmutableList.prototype._setindex = function(index, value) { |
1010 return this[index] = value; | 1481 return this[index] = value; |
1011 } | 1482 } |
1012 ImmutableList.prototype.$setindex = function(index, value) { | 1483 ImmutableList.prototype.$setindex = function(index, value) { |
1013 $throw(const$14/*const IllegalAccessException()*/); | 1484 $throw(const$4/*const IllegalAccessException()*/); |
1014 } | 1485 } |
1015 ImmutableList.prototype.removeRange = function(start, length) { | 1486 ImmutableList.prototype.removeRange = function(start, length) { |
1016 $throw(const$14/*const IllegalAccessException()*/); | 1487 $throw(const$4/*const IllegalAccessException()*/); |
1017 } | 1488 } |
1018 ImmutableList.prototype.insertRange = function(start, length, initialValue) { | 1489 ImmutableList.prototype.insertRange = function(start, length, initialValue) { |
1019 $throw(const$14/*const IllegalAccessException()*/); | 1490 $throw(const$4/*const IllegalAccessException()*/); |
1020 } | 1491 } |
1021 ImmutableList.prototype.sort = function(compare) { | 1492 ImmutableList.prototype.sort = function(compare) { |
1022 $throw(const$14/*const IllegalAccessException()*/); | 1493 $throw(const$4/*const IllegalAccessException()*/); |
1023 } | 1494 } |
1024 ImmutableList.prototype.add = function(element) { | 1495 ImmutableList.prototype.add = function(element) { |
1025 $throw(const$14/*const IllegalAccessException()*/); | 1496 $throw(const$4/*const IllegalAccessException()*/); |
1026 } | 1497 } |
1027 ImmutableList.prototype.addLast = function(element) { | 1498 ImmutableList.prototype.addLast = function(element) { |
1028 $throw(const$14/*const IllegalAccessException()*/); | 1499 $throw(const$4/*const IllegalAccessException()*/); |
1029 } | 1500 } |
1030 ImmutableList.prototype.addAll = function(elements) { | 1501 ImmutableList.prototype.addAll = function(elements) { |
1031 $throw(const$14/*const IllegalAccessException()*/); | 1502 $throw(const$4/*const IllegalAccessException()*/); |
1032 } | 1503 } |
1033 ImmutableList.prototype.clear = function() { | 1504 ImmutableList.prototype.clear = function() { |
1034 $throw(const$14/*const IllegalAccessException()*/); | 1505 $throw(const$4/*const IllegalAccessException()*/); |
1035 } | 1506 } |
1036 ImmutableList.prototype.removeLast = function() { | 1507 ImmutableList.prototype.removeLast = function() { |
1037 $throw(const$14/*const IllegalAccessException()*/); | 1508 $throw(const$4/*const IllegalAccessException()*/); |
1038 } | 1509 } |
| 1510 ImmutableList.prototype.add$1 = ImmutableList.prototype.add; |
| 1511 ImmutableList.prototype.addAll$1 = function($0) { |
| 1512 return this.addAll(($0 && $0.is$Collection$E())); |
| 1513 }; |
| 1514 ImmutableList.prototype.removeLast$0 = function() { |
| 1515 return this.removeLast(); |
| 1516 }; |
| 1517 ImmutableList.prototype.sort$1 = ImmutableList.prototype.sort; |
1039 // ********** Code for ImmutableMap ************** | 1518 // ********** Code for ImmutableMap ************** |
1040 function ImmutableMap(keyValuePairs) { | 1519 function ImmutableMap(keyValuePairs) { |
1041 this._internal = $map([]); | 1520 this._internal = $map([]); |
1042 // Initializers done | 1521 // Initializers done |
1043 for (var i = 0; | 1522 for (var i = 0; |
1044 i < keyValuePairs.length; i += 2) { | 1523 i < keyValuePairs.length; i += 2) { |
1045 this._internal.$setindex(keyValuePairs.$index(i), keyValuePairs.$index(i + 1
)); | 1524 this._internal.$setindex(keyValuePairs.$index(i), keyValuePairs.$index(i + 1
)); |
1046 } | 1525 } |
1047 } | 1526 } |
1048 ImmutableMap.prototype.is$Map$Node$Element = function(){return this;}; | 1527 ImmutableMap.prototype.is$Map$Node$Element = function(){return this;}; |
(...skipping 16 matching lines...) Expand all Loading... |
1065 ImmutableMap.prototype.getKeys = function() { | 1544 ImmutableMap.prototype.getKeys = function() { |
1066 return this._internal.getKeys(); | 1545 return this._internal.getKeys(); |
1067 } | 1546 } |
1068 ImmutableMap.prototype.getValues = function() { | 1547 ImmutableMap.prototype.getValues = function() { |
1069 return this._internal.getValues(); | 1548 return this._internal.getValues(); |
1070 } | 1549 } |
1071 ImmutableMap.prototype.containsKey = function(key) { | 1550 ImmutableMap.prototype.containsKey = function(key) { |
1072 return this._internal.containsKey(key); | 1551 return this._internal.containsKey(key); |
1073 } | 1552 } |
1074 ImmutableMap.prototype.$setindex = function(key, value) { | 1553 ImmutableMap.prototype.$setindex = function(key, value) { |
1075 $throw(const$14/*const IllegalAccessException()*/); | 1554 $throw(const$4/*const IllegalAccessException()*/); |
1076 } | 1555 } |
| 1556 ImmutableMap.prototype.getKeys$0 = function() { |
| 1557 return this.getKeys(); |
| 1558 }; |
| 1559 ImmutableMap.prototype.isEmpty$0 = function() { |
| 1560 return this.isEmpty(); |
| 1561 }; |
1077 // ********** Code for MatchImplementation ************** | 1562 // ********** Code for MatchImplementation ************** |
1078 function MatchImplementation(pattern, str, _start, _end, _groups) { | 1563 function MatchImplementation(pattern, str, _start, _end, _groups) { |
1079 this.pattern = pattern; | 1564 this.pattern = pattern; |
1080 this.str = str; | 1565 this.str = str; |
1081 this._start = _start; | 1566 this._start = _start; |
1082 this._end = _end; | 1567 this._end = _end; |
1083 this._groups = _groups; | 1568 this._groups = _groups; |
1084 // Initializers done | 1569 // Initializers done |
1085 } | 1570 } |
1086 MatchImplementation.prototype.$index = function(group) { | 1571 MatchImplementation.prototype.$index = function(group) { |
1087 return $assert_String(this._groups.$index(group)); | 1572 return $assert_String(this._groups.$index(group)); |
1088 } | 1573 } |
1089 // ********** Code for NumImplementation ************** | 1574 // ********** Code for NumImplementation ************** |
1090 NumImplementation = Number; | 1575 NumImplementation = Number; |
| 1576 NumImplementation.prototype.is$NumImplementation = function(){return this;}; |
| 1577 NumImplementation.prototype.is$Comparable = function(){return this;}; |
1091 NumImplementation.prototype.isNaN = function() { | 1578 NumImplementation.prototype.isNaN = function() { |
1092 return isNaN(this); | 1579 return isNaN(this); |
1093 } | 1580 } |
1094 NumImplementation.prototype.isNegative = function() { | 1581 NumImplementation.prototype.isNegative = function() { |
1095 return this == 0 ? (1 / this) < 0 : this < 0; | 1582 return this == 0 ? (1 / this) < 0 : this < 0; |
1096 } | 1583 } |
1097 NumImplementation.prototype.hashCode = function() { | 1584 NumImplementation.prototype.hashCode = function() { |
1098 return this & 0xFFFFFFF; | 1585 return this & 0xFFFFFFF; |
1099 } | 1586 } |
1100 NumImplementation.prototype.toInt = function() { | 1587 NumImplementation.prototype.toInt = function() { |
(...skipping 30 matching lines...) Expand all Loading... |
1131 else if (this.isNaN()) { | 1618 else if (this.isNaN()) { |
1132 if (other.isNaN()) { | 1619 if (other.isNaN()) { |
1133 return 0; | 1620 return 0; |
1134 } | 1621 } |
1135 return 1; | 1622 return 1; |
1136 } | 1623 } |
1137 else { | 1624 else { |
1138 return -1; | 1625 return -1; |
1139 } | 1626 } |
1140 } | 1627 } |
| 1628 NumImplementation.prototype.compareTo$1 = function($0) { |
| 1629 return this.compareTo(($0 && $0.is$NumImplementation())); |
| 1630 }; |
| 1631 NumImplementation.prototype.hashCode$0 = function() { |
| 1632 return this.hashCode(); |
| 1633 }; |
1141 // ********** Code for ExceptionImplementation ************** | 1634 // ********** Code for ExceptionImplementation ************** |
1142 function ExceptionImplementation(_msg) { | 1635 function ExceptionImplementation(_msg) { |
1143 this._msg = _msg; | 1636 this._msg = _msg; |
1144 // Initializers done | 1637 // Initializers done |
1145 } | 1638 } |
1146 ExceptionImplementation.prototype.toString = function() { | 1639 ExceptionImplementation.prototype.toString = function() { |
1147 return (this._msg == null) ? "Exception" : ("Exception: " + this._msg + ""); | 1640 return (this._msg == null) ? "Exception" : ("Exception: " + this._msg + ""); |
1148 } | 1641 } |
| 1642 ExceptionImplementation.prototype.toString$0 = function() { |
| 1643 return this.toString(); |
| 1644 }; |
1149 // ********** Code for HashMapImplementation ************** | 1645 // ********** Code for HashMapImplementation ************** |
1150 function HashMapImplementation() { | 1646 function HashMapImplementation() { |
1151 // Initializers done | 1647 // Initializers done |
1152 if (HashMapImplementation._deletedKey == null) { | 1648 if (HashMapImplementation._deletedKey == null) { |
1153 HashMapImplementation._deletedKey = new Object(); | 1649 HashMapImplementation._deletedKey = new Object(); |
1154 } | 1650 } |
1155 this._numberOfEntries = 0; | 1651 this._numberOfEntries = 0; |
1156 this._numberOfDeleted = 0; | 1652 this._numberOfDeleted = 0; |
1157 this._loadLimit = HashMapImplementation._computeLoadLimit(8/*HashMapImplementa
tion._INITIAL_CAPACITY*/); | 1653 this._loadLimit = HashMapImplementation._computeLoadLimit(8/*HashMapImplementa
tion._INITIAL_CAPACITY*/); |
1158 this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); | 1654 this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); |
(...skipping 13 matching lines...) Expand all Loading... |
1172 HashMapImplementation._computeLoadLimit = function(capacity) { | 1668 HashMapImplementation._computeLoadLimit = function(capacity) { |
1173 return $truncdiv((capacity * 3), 4); | 1669 return $truncdiv((capacity * 3), 4); |
1174 } | 1670 } |
1175 HashMapImplementation._firstProbe = function(hashCode, length) { | 1671 HashMapImplementation._firstProbe = function(hashCode, length) { |
1176 return hashCode & (length - 1); | 1672 return hashCode & (length - 1); |
1177 } | 1673 } |
1178 HashMapImplementation._nextProbe = function(currentProbe, numberOfProbes, length
) { | 1674 HashMapImplementation._nextProbe = function(currentProbe, numberOfProbes, length
) { |
1179 return (currentProbe + numberOfProbes) & (length - 1); | 1675 return (currentProbe + numberOfProbes) & (length - 1); |
1180 } | 1676 } |
1181 HashMapImplementation.prototype._probeForAdding = function(key) { | 1677 HashMapImplementation.prototype._probeForAdding = function(key) { |
1182 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode()), this
._keys.length); | 1678 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), th
is._keys.length); |
1183 var numberOfProbes = 1; | 1679 var numberOfProbes = 1; |
1184 var initialHash = hash; | 1680 var initialHash = hash; |
1185 var insertionIndex = -1; | 1681 var insertionIndex = -1; |
1186 while (true) { | 1682 while (true) { |
1187 var existingKey = this._keys.$index(hash); | 1683 var existingKey = this._keys.$index(hash); |
1188 if (existingKey == null) { | 1684 if (existingKey == null) { |
1189 if (insertionIndex < 0) return hash; | 1685 if (insertionIndex < 0) return hash; |
1190 return insertionIndex; | 1686 return insertionIndex; |
1191 } | 1687 } |
1192 else if ($eq(existingKey, key)) { | 1688 else if ($notnull_bool($eq(existingKey, key))) { |
1193 return hash; | 1689 return hash; |
1194 } | 1690 } |
1195 else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === exis
tingKey)) { | 1691 else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === exis
tingKey)) { |
1196 insertionIndex = hash; | 1692 insertionIndex = hash; |
1197 } | 1693 } |
1198 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); | 1694 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); |
1199 } | 1695 } |
1200 } | 1696 } |
1201 HashMapImplementation.prototype._probeForLookup = function(key) { | 1697 HashMapImplementation.prototype._probeForLookup = function(key) { |
1202 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode()), this
._keys.length); | 1698 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), th
is._keys.length); |
1203 var numberOfProbes = 1; | 1699 var numberOfProbes = 1; |
1204 var initialHash = hash; | 1700 var initialHash = hash; |
1205 while (true) { | 1701 while (true) { |
1206 var existingKey = this._keys.$index(hash); | 1702 var existingKey = this._keys.$index(hash); |
1207 if (existingKey == null) return -1; | 1703 if (existingKey == null) return -1; |
1208 if ($eq(existingKey, key)) return hash; | 1704 if ($notnull_bool($eq(existingKey, key))) return hash; |
1209 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); | 1705 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); |
1210 } | 1706 } |
1211 } | 1707 } |
1212 HashMapImplementation.prototype._ensureCapacity = function() { | 1708 HashMapImplementation.prototype._ensureCapacity = function() { |
1213 var newNumberOfEntries = this._numberOfEntries + 1; | 1709 var newNumberOfEntries = this._numberOfEntries + 1; |
1214 if (newNumberOfEntries >= this._loadLimit) { | 1710 if (newNumberOfEntries >= this._loadLimit) { |
1215 this._grow(this._keys.length * 2); | 1711 this._grow(this._keys.length * 2); |
1216 return; | 1712 return; |
1217 } | 1713 } |
1218 var capacity = this._keys.length; | 1714 var capacity = this._keys.length; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 var i = 0; | 1800 var i = 0; |
1305 this.forEach(function _(key, value) { | 1801 this.forEach(function _(key, value) { |
1306 list.$setindex(i++, value); | 1802 list.$setindex(i++, value); |
1307 } | 1803 } |
1308 ); | 1804 ); |
1309 return list; | 1805 return list; |
1310 } | 1806 } |
1311 HashMapImplementation.prototype.containsKey = function(key) { | 1807 HashMapImplementation.prototype.containsKey = function(key) { |
1312 return (this._probeForLookup(key) != -1); | 1808 return (this._probeForLookup(key) != -1); |
1313 } | 1809 } |
| 1810 HashMapImplementation.prototype.getKeys$0 = function() { |
| 1811 return this.getKeys(); |
| 1812 }; |
| 1813 HashMapImplementation.prototype.isEmpty$0 = function() { |
| 1814 return this.isEmpty(); |
| 1815 }; |
1314 // ********** Code for HashMapImplementation$E$E ************** | 1816 // ********** Code for HashMapImplementation$E$E ************** |
1315 function HashMapImplementation$E$E() { | 1817 function HashMapImplementation$E$E() { |
1316 // Initializers done | 1818 // Initializers done |
1317 if (HashMapImplementation._deletedKey == null) { | 1819 if (HashMapImplementation._deletedKey == null) { |
1318 HashMapImplementation._deletedKey = new Object(); | 1820 HashMapImplementation._deletedKey = new Object(); |
1319 } | 1821 } |
1320 this._numberOfEntries = 0; | 1822 this._numberOfEntries = 0; |
1321 this._numberOfDeleted = 0; | 1823 this._numberOfDeleted = 0; |
1322 this._loadLimit = HashMapImplementation._computeLoadLimit(8/*HashMapImplementa
tion._INITIAL_CAPACITY*/); | 1824 this._loadLimit = HashMapImplementation._computeLoadLimit(8/*HashMapImplementa
tion._INITIAL_CAPACITY*/); |
1323 this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); | 1825 this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); |
1324 this._values = new ListFactory$E(8/*HashMapImplementation._INITIAL_CAPACITY*/)
; | 1826 this._values = new ListFactory$E(8/*HashMapImplementation._INITIAL_CAPACITY*/)
; |
1325 } | 1827 } |
1326 $inherits(HashMapImplementation$E$E, HashMapImplementation); | 1828 $inherits(HashMapImplementation$E$E, HashMapImplementation); |
1327 HashMapImplementation$E$E.prototype.is$Map$Node$Element = function(){return this
;}; | 1829 HashMapImplementation$E$E.prototype.is$Map$Node$Element = function(){return this
;}; |
1328 HashMapImplementation$E$E.prototype.is$Map$String$Member = function(){return thi
s;}; | 1830 HashMapImplementation$E$E.prototype.is$Map$String$Member = function(){return thi
s;}; |
1329 HashMapImplementation$E$E._computeLoadLimit = function(capacity) { | 1831 HashMapImplementation$E$E._computeLoadLimit = function(capacity) { |
1330 return $truncdiv((capacity * 3), 4); | 1832 return $truncdiv((capacity * 3), 4); |
1331 } | 1833 } |
1332 HashMapImplementation$E$E._firstProbe = function(hashCode, length) { | 1834 HashMapImplementation$E$E._firstProbe = function(hashCode, length) { |
1333 return hashCode & (length - 1); | 1835 return hashCode & (length - 1); |
1334 } | 1836 } |
1335 HashMapImplementation$E$E._nextProbe = function(currentProbe, numberOfProbes, le
ngth) { | 1837 HashMapImplementation$E$E._nextProbe = function(currentProbe, numberOfProbes, le
ngth) { |
1336 return (currentProbe + numberOfProbes) & (length - 1); | 1838 return (currentProbe + numberOfProbes) & (length - 1); |
1337 } | 1839 } |
1338 HashMapImplementation$E$E.prototype._probeForAdding = function(key) { | 1840 HashMapImplementation$E$E.prototype._probeForAdding = function(key) { |
1339 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode()), this
._keys.length); | 1841 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), th
is._keys.length); |
1340 var numberOfProbes = 1; | 1842 var numberOfProbes = 1; |
1341 var initialHash = hash; | 1843 var initialHash = hash; |
1342 var insertionIndex = -1; | 1844 var insertionIndex = -1; |
1343 while (true) { | 1845 while (true) { |
1344 var existingKey = this._keys.$index(hash); | 1846 var existingKey = this._keys.$index(hash); |
1345 if (existingKey == null) { | 1847 if (existingKey == null) { |
1346 if (insertionIndex < 0) return hash; | 1848 if (insertionIndex < 0) return hash; |
1347 return insertionIndex; | 1849 return insertionIndex; |
1348 } | 1850 } |
1349 else if ($eq(existingKey, key)) { | 1851 else if ($notnull_bool($eq(existingKey, key))) { |
1350 return hash; | 1852 return hash; |
1351 } | 1853 } |
1352 else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === exis
tingKey)) { | 1854 else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === exis
tingKey)) { |
1353 insertionIndex = hash; | 1855 insertionIndex = hash; |
1354 } | 1856 } |
1355 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); | 1857 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); |
1356 } | 1858 } |
1357 } | 1859 } |
1358 HashMapImplementation$E$E.prototype._probeForLookup = function(key) { | 1860 HashMapImplementation$E$E.prototype._probeForLookup = function(key) { |
1359 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode()), this
._keys.length); | 1861 var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), th
is._keys.length); |
1360 var numberOfProbes = 1; | 1862 var numberOfProbes = 1; |
1361 var initialHash = hash; | 1863 var initialHash = hash; |
1362 while (true) { | 1864 while (true) { |
1363 var existingKey = this._keys.$index(hash); | 1865 var existingKey = this._keys.$index(hash); |
1364 if (existingKey == null) return -1; | 1866 if (existingKey == null) return -1; |
1365 if ($eq(existingKey, key)) return hash; | 1867 if ($notnull_bool($eq(existingKey, key))) return hash; |
1366 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); | 1868 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.l
ength); |
1367 } | 1869 } |
1368 } | 1870 } |
1369 HashMapImplementation$E$E.prototype._ensureCapacity = function() { | 1871 HashMapImplementation$E$E.prototype._ensureCapacity = function() { |
1370 var newNumberOfEntries = this._numberOfEntries + 1; | 1872 var newNumberOfEntries = this._numberOfEntries + 1; |
1371 if (newNumberOfEntries >= this._loadLimit) { | 1873 if (newNumberOfEntries >= this._loadLimit) { |
1372 this._grow(this._keys.length * 2); | 1874 this._grow(this._keys.length * 2); |
1373 return; | 1875 return; |
1374 } | 1876 } |
1375 var capacity = this._keys.length; | 1877 var capacity = this._keys.length; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 HashMapImplementation$Type$Type.prototype.is$Map$String$Member = false; | 2083 HashMapImplementation$Type$Type.prototype.is$Map$String$Member = false; |
1582 HashMapImplementation$Type$Type._computeLoadLimit = function(capacity) { | 2084 HashMapImplementation$Type$Type._computeLoadLimit = function(capacity) { |
1583 return $truncdiv((capacity * 3), 4); | 2085 return $truncdiv((capacity * 3), 4); |
1584 } | 2086 } |
1585 // ********** Code for HashSetImplementation ************** | 2087 // ********** Code for HashSetImplementation ************** |
1586 function HashSetImplementation() { | 2088 function HashSetImplementation() { |
1587 // Initializers done | 2089 // Initializers done |
1588 this._backingMap = new HashMapImplementation$E$E(); | 2090 this._backingMap = new HashMapImplementation$E$E(); |
1589 } | 2091 } |
1590 HashSetImplementation.prototype.is$HashSetImplementation = function(){return thi
s;}; | 2092 HashSetImplementation.prototype.is$HashSetImplementation = function(){return thi
s;}; |
| 2093 HashSetImplementation.prototype.is$Collection$E = function(){return this;}; |
| 2094 HashSetImplementation.prototype.is$Collection$Object = function(){return this;}; |
1591 HashSetImplementation.prototype.is$Collection$Type = function(){return this;}; | 2095 HashSetImplementation.prototype.is$Collection$Type = function(){return this;}; |
1592 HashSetImplementation.prototype.is$Iterable = function(){return this;}; | 2096 HashSetImplementation.prototype.is$Iterable = function(){return this;}; |
1593 HashSetImplementation.HashSetImplementation$from$factory = function(other) { | 2097 HashSetImplementation.HashSetImplementation$from$factory = function(other) { |
1594 var set = new HashSetImplementation(); | 2098 var set = new HashSetImplementation(); |
1595 for (var $i = other.iterator(); $i.hasNext(); ) { | 2099 for (var $i = other.iterator(); $i.hasNext$0(); ) { |
1596 var e = $i.next(); | 2100 var e = $i.next$0(); |
1597 set.add(e); | 2101 set.add(e); |
1598 } | 2102 } |
1599 return (set && set.is$HashSetImplementation()); | 2103 return (set && set.is$HashSetImplementation()); |
1600 } | 2104 } |
1601 HashSetImplementation.prototype.add = function(value) { | 2105 HashSetImplementation.prototype.add = function(value) { |
1602 this._backingMap.$setindex(value, value); | 2106 this._backingMap.$setindex(value, value); |
1603 } | 2107 } |
1604 HashSetImplementation.prototype.contains = function(value) { | 2108 HashSetImplementation.prototype.contains = function(value) { |
1605 return this._backingMap.containsKey(value); | 2109 return this._backingMap.containsKey(value); |
1606 } | 2110 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1639 } | 2143 } |
1640 HashSetImplementation.prototype.get$length = function() { | 2144 HashSetImplementation.prototype.get$length = function() { |
1641 return this._backingMap.get$length(); | 2145 return this._backingMap.get$length(); |
1642 } | 2146 } |
1643 Object.defineProperty(HashSetImplementation.prototype, "length", { | 2147 Object.defineProperty(HashSetImplementation.prototype, "length", { |
1644 get: HashSetImplementation.prototype.get$length | 2148 get: HashSetImplementation.prototype.get$length |
1645 }); | 2149 }); |
1646 HashSetImplementation.prototype.iterator = function() { | 2150 HashSetImplementation.prototype.iterator = function() { |
1647 return new HashSetIterator$E(this); | 2151 return new HashSetIterator$E(this); |
1648 } | 2152 } |
| 2153 HashSetImplementation.prototype.add$1 = HashSetImplementation.prototype.add; |
| 2154 HashSetImplementation.prototype.addAll$1 = function($0) { |
| 2155 return this.addAll(($0 && $0.is$Collection$E())); |
| 2156 }; |
| 2157 HashSetImplementation.prototype.contains$1 = HashSetImplementation.prototype.con
tains; |
| 2158 HashSetImplementation.prototype.filter$1 = HashSetImplementation.prototype.filte
r; |
| 2159 HashSetImplementation.prototype.isEmpty$0 = function() { |
| 2160 return this.isEmpty(); |
| 2161 }; |
| 2162 HashSetImplementation.prototype.iterator$0 = function() { |
| 2163 return this.iterator(); |
| 2164 }; |
| 2165 HashSetImplementation.prototype.some$1 = HashSetImplementation.prototype.some; |
1649 // ********** Code for HashSetImplementation$E ************** | 2166 // ********** Code for HashSetImplementation$E ************** |
1650 function HashSetImplementation$E() { | 2167 function HashSetImplementation$E() { |
1651 // Initializers done | 2168 // Initializers done |
1652 this._backingMap = new HashMapImplementation$E$E(); | 2169 this._backingMap = new HashMapImplementation$E$E(); |
1653 } | 2170 } |
1654 $inherits(HashSetImplementation$E, HashSetImplementation); | 2171 $inherits(HashSetImplementation$E, HashSetImplementation); |
| 2172 HashSetImplementation$E.prototype.is$Collection$E = function(){return this;}; |
| 2173 HashSetImplementation$E.prototype.is$Collection$Object = function(){return this;
}; |
1655 HashSetImplementation$E.prototype.is$Collection$Type = function(){return this;}; | 2174 HashSetImplementation$E.prototype.is$Collection$Type = function(){return this;}; |
1656 HashSetImplementation$E.prototype.is$Iterable = function(){return this;}; | 2175 HashSetImplementation$E.prototype.is$Iterable = function(){return this;}; |
1657 // ********** Code for HashSetImplementation$String ************** | 2176 // ********** Code for HashSetImplementation$String ************** |
1658 function HashSetImplementation$String() { | 2177 function HashSetImplementation$String() { |
1659 // Initializers done | 2178 // Initializers done |
1660 this._backingMap = new HashMapImplementation$String$String(); | 2179 this._backingMap = new HashMapImplementation$String$String(); |
1661 } | 2180 } |
1662 $inherits(HashSetImplementation$String, HashSetImplementation); | 2181 $inherits(HashSetImplementation$String, HashSetImplementation); |
| 2182 HashSetImplementation$String.prototype.is$Collection$E = function(){return this;
}; |
| 2183 HashSetImplementation$String.prototype.is$Collection$Object = function(){return
this;}; |
1663 HashSetImplementation$String.prototype.is$Collection$Type = false; | 2184 HashSetImplementation$String.prototype.is$Collection$Type = false; |
1664 HashSetImplementation$String.prototype.is$Iterable = function(){return this;}; | 2185 HashSetImplementation$String.prototype.is$Iterable = function(){return this;}; |
1665 // ********** Code for HashSetImplementation$Type ************** | 2186 // ********** Code for HashSetImplementation$Type ************** |
1666 function HashSetImplementation$Type() { | 2187 function HashSetImplementation$Type() { |
1667 // Initializers done | 2188 // Initializers done |
1668 this._backingMap = new HashMapImplementation$Type$Type(); | 2189 this._backingMap = new HashMapImplementation$Type$Type(); |
1669 } | 2190 } |
1670 $inherits(HashSetImplementation$Type, HashSetImplementation); | 2191 $inherits(HashSetImplementation$Type, HashSetImplementation); |
| 2192 HashSetImplementation$Type.prototype.is$Collection$E = function(){return this;}; |
| 2193 HashSetImplementation$Type.prototype.is$Collection$Object = function(){return th
is;}; |
1671 HashSetImplementation$Type.prototype.is$Collection$Type = function(){return this
;}; | 2194 HashSetImplementation$Type.prototype.is$Collection$Type = function(){return this
;}; |
1672 HashSetImplementation$Type.prototype.is$Iterable = function(){return this;}; | 2195 HashSetImplementation$Type.prototype.is$Iterable = function(){return this;}; |
1673 // ********** Code for HashSetIterator ************** | 2196 // ********** Code for HashSetIterator ************** |
1674 function HashSetIterator(set_) { | 2197 function HashSetIterator(set_) { |
1675 this._nextValidIndex = -1; | 2198 this._nextValidIndex = -1; |
1676 this._entries = set_._backingMap._keys; | 2199 this._entries = set_._backingMap._keys; |
1677 // Initializers done | 2200 // Initializers done |
1678 this._advance(); | 2201 this._advance(); |
1679 } | 2202 } |
1680 HashSetIterator.prototype.is$Iterator$T = function(){return this;}; | 2203 HashSetIterator.prototype.is$Iterator$T = function(){return this;}; |
(...skipping 15 matching lines...) Expand all Loading... |
1696 HashSetIterator.prototype._advance = function() { | 2219 HashSetIterator.prototype._advance = function() { |
1697 var length = this._entries.length; | 2220 var length = this._entries.length; |
1698 var entry; | 2221 var entry; |
1699 var deletedKey = HashMapImplementation._deletedKey; | 2222 var deletedKey = HashMapImplementation._deletedKey; |
1700 do { | 2223 do { |
1701 if (++this._nextValidIndex >= length) break; | 2224 if (++this._nextValidIndex >= length) break; |
1702 entry = this._entries.$index(this._nextValidIndex); | 2225 entry = this._entries.$index(this._nextValidIndex); |
1703 } | 2226 } |
1704 while ((entry == null) || (entry === deletedKey)) | 2227 while ((entry == null) || (entry === deletedKey)) |
1705 } | 2228 } |
| 2229 HashSetIterator.prototype.hasNext$0 = function() { |
| 2230 return this.hasNext(); |
| 2231 }; |
| 2232 HashSetIterator.prototype.next$0 = function() { |
| 2233 return this.next(); |
| 2234 }; |
1706 // ********** Code for HashSetIterator$E ************** | 2235 // ********** Code for HashSetIterator$E ************** |
1707 function HashSetIterator$E(set_) { | 2236 function HashSetIterator$E(set_) { |
1708 this._nextValidIndex = -1; | 2237 this._nextValidIndex = -1; |
1709 this._entries = set_._backingMap._keys; | 2238 this._entries = set_._backingMap._keys; |
1710 // Initializers done | 2239 // Initializers done |
1711 this._advance(); | 2240 this._advance(); |
1712 } | 2241 } |
1713 $inherits(HashSetIterator$E, HashSetIterator); | 2242 $inherits(HashSetIterator$E, HashSetIterator); |
1714 HashSetIterator$E.prototype.is$Iterator$T = function(){return this;}; | 2243 HashSetIterator$E.prototype.is$Iterator$T = function(){return this;}; |
1715 HashSetIterator$E.prototype._advance = function() { | 2244 HashSetIterator$E.prototype._advance = function() { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 } | 2326 } |
1798 LinkedHashMapImplementation.prototype.get$length = function() { | 2327 LinkedHashMapImplementation.prototype.get$length = function() { |
1799 return this._map.get$length(); | 2328 return this._map.get$length(); |
1800 } | 2329 } |
1801 Object.defineProperty(LinkedHashMapImplementation.prototype, "length", { | 2330 Object.defineProperty(LinkedHashMapImplementation.prototype, "length", { |
1802 get: LinkedHashMapImplementation.prototype.get$length | 2331 get: LinkedHashMapImplementation.prototype.get$length |
1803 }); | 2332 }); |
1804 LinkedHashMapImplementation.prototype.isEmpty = function() { | 2333 LinkedHashMapImplementation.prototype.isEmpty = function() { |
1805 return this.get$length() == 0; | 2334 return this.get$length() == 0; |
1806 } | 2335 } |
| 2336 LinkedHashMapImplementation.prototype.getKeys$0 = function() { |
| 2337 return this.getKeys(); |
| 2338 }; |
| 2339 LinkedHashMapImplementation.prototype.isEmpty$0 = function() { |
| 2340 return this.isEmpty(); |
| 2341 }; |
1807 // ********** Code for LinkedHashMapImplementation$Node$Element ************** | 2342 // ********** Code for LinkedHashMapImplementation$Node$Element ************** |
1808 function LinkedHashMapImplementation$Node$Element() { | 2343 function LinkedHashMapImplementation$Node$Element() { |
1809 // Initializers done | 2344 // Initializers done |
1810 this._map = new HashMapImplementation$Node$DoubleLinkedQueueEntry$KeyValuePair
$Node$Element(); | 2345 this._map = new HashMapImplementation$Node$DoubleLinkedQueueEntry$KeyValuePair
$Node$Element(); |
1811 this._list = new DoubleLinkedQueue$KeyValuePair$Node$Element(); | 2346 this._list = new DoubleLinkedQueue$KeyValuePair$Node$Element(); |
1812 } | 2347 } |
1813 $inherits(LinkedHashMapImplementation$Node$Element, LinkedHashMapImplementation)
; | 2348 $inherits(LinkedHashMapImplementation$Node$Element, LinkedHashMapImplementation)
; |
1814 LinkedHashMapImplementation$Node$Element.prototype.is$Map$Node$Element = functio
n(){return this;}; | 2349 LinkedHashMapImplementation$Node$Element.prototype.is$Map$Node$Element = functio
n(){return this;}; |
1815 LinkedHashMapImplementation$Node$Element.prototype.is$Map$String$Member = false; | 2350 LinkedHashMapImplementation$Node$Element.prototype.is$Map$String$Member = false; |
1816 // ********** Code for LinkedHashMapImplementation$String$Keyword ************** | 2351 // ********** Code for LinkedHashMapImplementation$String$Keyword ************** |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 $inherits(DoubleLinkedQueueEntry$KeyValuePair$String$Keyword, DoubleLinkedQueueE
ntry); | 2436 $inherits(DoubleLinkedQueueEntry$KeyValuePair$String$Keyword, DoubleLinkedQueueE
ntry); |
1902 DoubleLinkedQueueEntry$KeyValuePair$String$Keyword.prototype.is$DoubleLinkedQueu
eEntry$KeyValuePair$K$V = function(){return this;}; | 2437 DoubleLinkedQueueEntry$KeyValuePair$String$Keyword.prototype.is$DoubleLinkedQueu
eEntry$KeyValuePair$K$V = function(){return this;}; |
1903 // ********** Code for _DoubleLinkedQueueEntrySentinel ************** | 2438 // ********** Code for _DoubleLinkedQueueEntrySentinel ************** |
1904 function _DoubleLinkedQueueEntrySentinel() { | 2439 function _DoubleLinkedQueueEntrySentinel() { |
1905 DoubleLinkedQueueEntry$E.call(this, null); | 2440 DoubleLinkedQueueEntry$E.call(this, null); |
1906 // Initializers done | 2441 // Initializers done |
1907 this._link(this, this); | 2442 this._link(this, this); |
1908 } | 2443 } |
1909 $inherits(_DoubleLinkedQueueEntrySentinel, DoubleLinkedQueueEntry$E); | 2444 $inherits(_DoubleLinkedQueueEntrySentinel, DoubleLinkedQueueEntry$E); |
1910 _DoubleLinkedQueueEntrySentinel.prototype.remove = function() { | 2445 _DoubleLinkedQueueEntrySentinel.prototype.remove = function() { |
1911 $throw(const$5/*const EmptyQueueException()*/); | 2446 $throw(const$9/*const EmptyQueueException()*/); |
1912 } | 2447 } |
1913 _DoubleLinkedQueueEntrySentinel.prototype._asNonSentinelEntry = function() { | 2448 _DoubleLinkedQueueEntrySentinel.prototype._asNonSentinelEntry = function() { |
1914 return null; | 2449 return null; |
1915 } | 2450 } |
1916 _DoubleLinkedQueueEntrySentinel.prototype.get$element = function() { | 2451 _DoubleLinkedQueueEntrySentinel.prototype.get$element = function() { |
1917 $throw(const$5/*const EmptyQueueException()*/); | 2452 $throw(const$9/*const EmptyQueueException()*/); |
1918 } | 2453 } |
1919 // ********** Code for _DoubleLinkedQueueEntrySentinel$E ************** | 2454 // ********** Code for _DoubleLinkedQueueEntrySentinel$E ************** |
1920 function _DoubleLinkedQueueEntrySentinel$E() { | 2455 function _DoubleLinkedQueueEntrySentinel$E() { |
1921 DoubleLinkedQueueEntry$E.call(this, null); | 2456 DoubleLinkedQueueEntry$E.call(this, null); |
1922 // Initializers done | 2457 // Initializers done |
1923 this._link(this, this); | 2458 this._link(this, this); |
1924 } | 2459 } |
1925 $inherits(_DoubleLinkedQueueEntrySentinel$E, _DoubleLinkedQueueEntrySentinel); | 2460 $inherits(_DoubleLinkedQueueEntrySentinel$E, _DoubleLinkedQueueEntrySentinel); |
1926 _DoubleLinkedQueueEntrySentinel$E.prototype._link = function(p, n) { | 2461 _DoubleLinkedQueueEntrySentinel$E.prototype._link = function(p, n) { |
1927 this._next = n; | 2462 this._next = n; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1980 this._previous = p; | 2515 this._previous = p; |
1981 p._next = this; | 2516 p._next = this; |
1982 n._previous = this; | 2517 n._previous = this; |
1983 } | 2518 } |
1984 // ********** Code for DoubleLinkedQueue ************** | 2519 // ********** Code for DoubleLinkedQueue ************** |
1985 function DoubleLinkedQueue() { | 2520 function DoubleLinkedQueue() { |
1986 // Initializers done | 2521 // Initializers done |
1987 this._sentinel = new _DoubleLinkedQueueEntrySentinel$E(); | 2522 this._sentinel = new _DoubleLinkedQueueEntrySentinel$E(); |
1988 } | 2523 } |
1989 DoubleLinkedQueue.prototype.is$DoubleLinkedQueue = function(){return this;}; | 2524 DoubleLinkedQueue.prototype.is$DoubleLinkedQueue = function(){return this;}; |
| 2525 DoubleLinkedQueue.prototype.is$Collection$E = function(){return this;}; |
| 2526 DoubleLinkedQueue.prototype.is$Collection$Object = function(){return this;}; |
1990 DoubleLinkedQueue.prototype.is$Collection$Type = function(){return this;}; | 2527 DoubleLinkedQueue.prototype.is$Collection$Type = function(){return this;}; |
1991 DoubleLinkedQueue.prototype.is$Iterable = function(){return this;}; | 2528 DoubleLinkedQueue.prototype.is$Iterable = function(){return this;}; |
1992 DoubleLinkedQueue.DoubleLinkedQueue$from$factory = function(other) { | 2529 DoubleLinkedQueue.DoubleLinkedQueue$from$factory = function(other) { |
1993 var list = new DoubleLinkedQueue(); | 2530 var list = new DoubleLinkedQueue(); |
1994 for (var $i = other.iterator(); $i.hasNext(); ) { | 2531 for (var $i = other.iterator(); $i.hasNext$0(); ) { |
1995 var e = $i.next(); | 2532 var e = $i.next$0(); |
1996 list.addLast(e); | 2533 list.addLast(e); |
1997 } | 2534 } |
1998 return (list && list.is$DoubleLinkedQueue()); | 2535 return (list && list.is$DoubleLinkedQueue()); |
1999 } | 2536 } |
2000 DoubleLinkedQueue.prototype.addLast = function(value) { | 2537 DoubleLinkedQueue.prototype.addLast = function(value) { |
2001 this._sentinel.prepend(value); | 2538 this._sentinel.prepend(value); |
2002 } | 2539 } |
2003 DoubleLinkedQueue.prototype.add = function(value) { | 2540 DoubleLinkedQueue.prototype.add = function(value) { |
2004 this.addLast(value); | 2541 this.addLast(value); |
2005 } | 2542 } |
2006 DoubleLinkedQueue.prototype.addAll = function(collection) { | 2543 DoubleLinkedQueue.prototype.addAll = function(collection) { |
2007 for (var $i = collection.iterator(); $i.hasNext(); ) { | 2544 for (var $i = collection.iterator(); $i.hasNext$0(); ) { |
2008 var e = $i.next(); | 2545 var e = $i.next$0(); |
2009 this.add(e); | 2546 this.add(e); |
2010 } | 2547 } |
2011 } | 2548 } |
2012 DoubleLinkedQueue.prototype.removeLast = function() { | 2549 DoubleLinkedQueue.prototype.removeLast = function() { |
2013 return this._sentinel._previous.remove(); | 2550 return this._sentinel._previous.remove(); |
2014 } | 2551 } |
2015 DoubleLinkedQueue.prototype.last = function() { | 2552 DoubleLinkedQueue.prototype.last = function() { |
2016 return this._sentinel._previous.get$element(); | 2553 return this._sentinel._previous.get$element(); |
2017 } | 2554 } |
2018 DoubleLinkedQueue.prototype.lastEntry = function() { | 2555 DoubleLinkedQueue.prototype.lastEntry = function() { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2052 var entry = this._sentinel._next; | 2589 var entry = this._sentinel._next; |
2053 while (entry !== this._sentinel) { | 2590 while (entry !== this._sentinel) { |
2054 if (f(entry._element)) other.addLast(entry._element); | 2591 if (f(entry._element)) other.addLast(entry._element); |
2055 entry = entry._next; | 2592 entry = entry._next; |
2056 } | 2593 } |
2057 return other; | 2594 return other; |
2058 } | 2595 } |
2059 DoubleLinkedQueue.prototype.iterator = function() { | 2596 DoubleLinkedQueue.prototype.iterator = function() { |
2060 return new _DoubleLinkedQueueIterator$E(this._sentinel); | 2597 return new _DoubleLinkedQueueIterator$E(this._sentinel); |
2061 } | 2598 } |
| 2599 DoubleLinkedQueue.prototype.add$1 = DoubleLinkedQueue.prototype.add; |
| 2600 DoubleLinkedQueue.prototype.addAll$1 = function($0) { |
| 2601 return this.addAll(($0 && $0.is$Collection$E())); |
| 2602 }; |
| 2603 DoubleLinkedQueue.prototype.filter$1 = DoubleLinkedQueue.prototype.filter; |
| 2604 DoubleLinkedQueue.prototype.isEmpty$0 = function() { |
| 2605 return this.isEmpty(); |
| 2606 }; |
| 2607 DoubleLinkedQueue.prototype.iterator$0 = function() { |
| 2608 return this.iterator(); |
| 2609 }; |
| 2610 DoubleLinkedQueue.prototype.last$0 = function() { |
| 2611 return this.last(); |
| 2612 }; |
| 2613 DoubleLinkedQueue.prototype.removeLast$0 = function() { |
| 2614 return this.removeLast(); |
| 2615 }; |
| 2616 DoubleLinkedQueue.prototype.some$1 = DoubleLinkedQueue.prototype.some; |
2062 // ********** Code for DoubleLinkedQueue$E ************** | 2617 // ********** Code for DoubleLinkedQueue$E ************** |
2063 function DoubleLinkedQueue$E() { | 2618 function DoubleLinkedQueue$E() { |
2064 // Initializers done | 2619 // Initializers done |
2065 this._sentinel = new _DoubleLinkedQueueEntrySentinel$E(); | 2620 this._sentinel = new _DoubleLinkedQueueEntrySentinel$E(); |
2066 } | 2621 } |
2067 $inherits(DoubleLinkedQueue$E, DoubleLinkedQueue); | 2622 $inherits(DoubleLinkedQueue$E, DoubleLinkedQueue); |
| 2623 DoubleLinkedQueue$E.prototype.is$Collection$E = function(){return this;}; |
| 2624 DoubleLinkedQueue$E.prototype.is$Collection$Object = function(){return this;}; |
2068 DoubleLinkedQueue$E.prototype.is$Collection$Type = function(){return this;}; | 2625 DoubleLinkedQueue$E.prototype.is$Collection$Type = function(){return this;}; |
2069 DoubleLinkedQueue$E.prototype.is$Iterable = function(){return this;}; | 2626 DoubleLinkedQueue$E.prototype.is$Iterable = function(){return this;}; |
2070 // ********** Code for DoubleLinkedQueue$KeyValuePair$K$V ************** | 2627 // ********** Code for DoubleLinkedQueue$KeyValuePair$K$V ************** |
2071 function DoubleLinkedQueue$KeyValuePair$K$V() { | 2628 function DoubleLinkedQueue$KeyValuePair$K$V() { |
2072 // Initializers done | 2629 // Initializers done |
2073 this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$K$V(); | 2630 this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$K$V(); |
2074 } | 2631 } |
2075 $inherits(DoubleLinkedQueue$KeyValuePair$K$V, DoubleLinkedQueue); | 2632 $inherits(DoubleLinkedQueue$KeyValuePair$K$V, DoubleLinkedQueue); |
| 2633 DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Collection$E = function(){return
this;}; |
| 2634 DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Collection$Object = function(){r
eturn this;}; |
2076 DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Collection$Type = false; | 2635 DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Collection$Type = false; |
2077 DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Iterable = function(){return thi
s;}; | 2636 DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Iterable = function(){return thi
s;}; |
2078 DoubleLinkedQueue$KeyValuePair$K$V.prototype.addLast = function(value) { | 2637 DoubleLinkedQueue$KeyValuePair$K$V.prototype.addLast = function(value) { |
2079 this._sentinel.prepend(value); | 2638 this._sentinel.prepend(value); |
2080 } | 2639 } |
2081 DoubleLinkedQueue$KeyValuePair$K$V.prototype.lastEntry = function() { | 2640 DoubleLinkedQueue$KeyValuePair$K$V.prototype.lastEntry = function() { |
2082 return this._sentinel.previousEntry(); | 2641 return this._sentinel.previousEntry(); |
2083 } | 2642 } |
2084 DoubleLinkedQueue$KeyValuePair$K$V.prototype.forEach = function(f) { | 2643 DoubleLinkedQueue$KeyValuePair$K$V.prototype.forEach = function(f) { |
2085 var entry = this._sentinel._next; | 2644 var entry = this._sentinel._next; |
2086 while (entry !== this._sentinel) { | 2645 while (entry !== this._sentinel) { |
2087 f(entry._element); | 2646 f(entry._element); |
2088 entry = entry._next; | 2647 entry = entry._next; |
2089 } | 2648 } |
2090 } | 2649 } |
2091 // ********** Code for DoubleLinkedQueue$KeyValuePair$Node$Element *************
* | 2650 // ********** Code for DoubleLinkedQueue$KeyValuePair$Node$Element *************
* |
2092 function DoubleLinkedQueue$KeyValuePair$Node$Element() { | 2651 function DoubleLinkedQueue$KeyValuePair$Node$Element() { |
2093 // Initializers done | 2652 // Initializers done |
2094 this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$Node$Element
(); | 2653 this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$Node$Element
(); |
2095 } | 2654 } |
2096 $inherits(DoubleLinkedQueue$KeyValuePair$Node$Element, DoubleLinkedQueue); | 2655 $inherits(DoubleLinkedQueue$KeyValuePair$Node$Element, DoubleLinkedQueue); |
| 2656 DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Collection$E = function
(){return this;}; |
| 2657 DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Collection$Object = fun
ction(){return this;}; |
2097 DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Collection$Type = false
; | 2658 DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Collection$Type = false
; |
2098 DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Iterable = function(){r
eturn this;}; | 2659 DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Iterable = function(){r
eturn this;}; |
2099 // ********** Code for DoubleLinkedQueue$KeyValuePair$String$Keyword ***********
*** | 2660 // ********** Code for DoubleLinkedQueue$KeyValuePair$String$Keyword ***********
*** |
2100 function DoubleLinkedQueue$KeyValuePair$String$Keyword() { | 2661 function DoubleLinkedQueue$KeyValuePair$String$Keyword() { |
2101 // Initializers done | 2662 // Initializers done |
2102 this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$String$Keywo
rd(); | 2663 this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$String$Keywo
rd(); |
2103 } | 2664 } |
2104 $inherits(DoubleLinkedQueue$KeyValuePair$String$Keyword, DoubleLinkedQueue); | 2665 $inherits(DoubleLinkedQueue$KeyValuePair$String$Keyword, DoubleLinkedQueue); |
| 2666 DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Collection$E = functi
on(){return this;}; |
| 2667 DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Collection$Object = f
unction(){return this;}; |
2105 DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Collection$Type = fal
se; | 2668 DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Collection$Type = fal
se; |
2106 DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Iterable = function()
{return this;}; | 2669 DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Iterable = function()
{return this;}; |
2107 // ********** Code for DoubleLinkedQueue$SourceString ************** | 2670 // ********** Code for DoubleLinkedQueue$SourceString ************** |
2108 function DoubleLinkedQueue$SourceString() {} | 2671 function DoubleLinkedQueue$SourceString() {} |
2109 $inherits(DoubleLinkedQueue$SourceString, DoubleLinkedQueue); | 2672 $inherits(DoubleLinkedQueue$SourceString, DoubleLinkedQueue); |
| 2673 DoubleLinkedQueue$SourceString.prototype.is$Collection$E = function(){return thi
s;}; |
| 2674 DoubleLinkedQueue$SourceString.prototype.is$Collection$Object = function(){retur
n this;}; |
2110 DoubleLinkedQueue$SourceString.prototype.is$Collection$Type = false; | 2675 DoubleLinkedQueue$SourceString.prototype.is$Collection$Type = false; |
2111 DoubleLinkedQueue$SourceString.prototype.is$Iterable = function(){return this;}; | 2676 DoubleLinkedQueue$SourceString.prototype.is$Iterable = function(){return this;}; |
2112 DoubleLinkedQueue$SourceString.DoubleLinkedQueue$from$factory = function(other)
{ | 2677 DoubleLinkedQueue$SourceString.DoubleLinkedQueue$from$factory = function(other)
{ |
2113 var list = new DoubleLinkedQueue(); | 2678 var list = new DoubleLinkedQueue(); |
2114 for (var $i = other.iterator(); $i.hasNext(); ) { | 2679 for (var $i = other.iterator(); $i.hasNext$0(); ) { |
2115 var e = $i.next(); | 2680 var e = $i.next$0(); |
2116 list.addLast(e); | 2681 list.addLast(e); |
2117 } | 2682 } |
2118 return (list && list.is$DoubleLinkedQueue()); | 2683 return (list && list.is$DoubleLinkedQueue()); |
2119 } | 2684 } |
2120 // ********** Code for _DoubleLinkedQueueIterator ************** | 2685 // ********** Code for _DoubleLinkedQueueIterator ************** |
2121 function _DoubleLinkedQueueIterator(_sentinel) { | 2686 function _DoubleLinkedQueueIterator(_sentinel) { |
2122 this._sentinel = _sentinel; | 2687 this._sentinel = _sentinel; |
2123 // Initializers done | 2688 // Initializers done |
2124 this._currentEntry = this._sentinel; | 2689 this._currentEntry = this._sentinel; |
2125 } | 2690 } |
2126 _DoubleLinkedQueueIterator.prototype.is$Iterator$T = function(){return this;}; | 2691 _DoubleLinkedQueueIterator.prototype.is$Iterator$T = function(){return this;}; |
2127 _DoubleLinkedQueueIterator.prototype.hasNext = function() { | 2692 _DoubleLinkedQueueIterator.prototype.hasNext = function() { |
2128 return this._currentEntry._next !== this._sentinel; | 2693 return this._currentEntry._next !== this._sentinel; |
2129 } | 2694 } |
2130 _DoubleLinkedQueueIterator.prototype.next = function() { | 2695 _DoubleLinkedQueueIterator.prototype.next = function() { |
2131 if (!this.hasNext()) { | 2696 if (!this.hasNext()) { |
2132 $throw(const$0/*const NoMoreElementsException()*/); | 2697 $throw(const$0/*const NoMoreElementsException()*/); |
2133 } | 2698 } |
2134 this._currentEntry = this._currentEntry._next; | 2699 this._currentEntry = this._currentEntry._next; |
2135 return this._currentEntry.get$element(); | 2700 return this._currentEntry.get$element(); |
2136 } | 2701 } |
| 2702 _DoubleLinkedQueueIterator.prototype.hasNext$0 = function() { |
| 2703 return this.hasNext(); |
| 2704 }; |
| 2705 _DoubleLinkedQueueIterator.prototype.next$0 = function() { |
| 2706 return this.next(); |
| 2707 }; |
2137 // ********** Code for _DoubleLinkedQueueIterator$E ************** | 2708 // ********** Code for _DoubleLinkedQueueIterator$E ************** |
2138 function _DoubleLinkedQueueIterator$E(_sentinel) { | 2709 function _DoubleLinkedQueueIterator$E(_sentinel) { |
2139 this._sentinel = _sentinel; | 2710 this._sentinel = _sentinel; |
2140 // Initializers done | 2711 // Initializers done |
2141 this._currentEntry = this._sentinel; | 2712 this._currentEntry = this._sentinel; |
2142 } | 2713 } |
2143 $inherits(_DoubleLinkedQueueIterator$E, _DoubleLinkedQueueIterator); | 2714 $inherits(_DoubleLinkedQueueIterator$E, _DoubleLinkedQueueIterator); |
2144 _DoubleLinkedQueueIterator$E.prototype.is$Iterator$T = function(){return this;}; | 2715 _DoubleLinkedQueueIterator$E.prototype.is$Iterator$T = function(){return this;}; |
2145 // ********** Code for StopWatchImplementation ************** | 2716 // ********** Code for StopWatchImplementation ************** |
2146 function StopWatchImplementation() { | 2717 function StopWatchImplementation() { |
(...skipping 29 matching lines...) Expand all Loading... |
2176 } | 2747 } |
2177 StopWatchImplementation.prototype.frequency = function() { | 2748 StopWatchImplementation.prototype.frequency = function() { |
2178 return Clock.frequency(); | 2749 return Clock.frequency(); |
2179 } | 2750 } |
2180 // ********** Code for StringBufferImpl ************** | 2751 // ********** Code for StringBufferImpl ************** |
2181 function StringBufferImpl(content) { | 2752 function StringBufferImpl(content) { |
2182 // Initializers done | 2753 // Initializers done |
2183 this.clear(); | 2754 this.clear(); |
2184 this.add(content); | 2755 this.add(content); |
2185 } | 2756 } |
| 2757 StringBufferImpl.prototype.is$StringBuffer = function(){return this;}; |
2186 StringBufferImpl.prototype.get$length = function() { | 2758 StringBufferImpl.prototype.get$length = function() { |
2187 return this._length; | 2759 return this._length; |
2188 } | 2760 } |
2189 Object.defineProperty(StringBufferImpl.prototype, "length", { | 2761 Object.defineProperty(StringBufferImpl.prototype, "length", { |
2190 get: StringBufferImpl.prototype.get$length | 2762 get: StringBufferImpl.prototype.get$length |
2191 }); | 2763 }); |
2192 StringBufferImpl.prototype.isEmpty = function() { | 2764 StringBufferImpl.prototype.isEmpty = function() { |
2193 return this._length == 0; | 2765 return this._length == 0; |
2194 } | 2766 } |
2195 StringBufferImpl.prototype.add = function(obj) { | 2767 StringBufferImpl.prototype.add = function(obj) { |
2196 var str = obj.toString(); | 2768 var str = $assert_String(obj.toString()); |
2197 if (str == null || str.isEmpty()) return this; | 2769 if (str == null || str.isEmpty()) return this; |
2198 this._buffer.add(str); | 2770 this._buffer.add(str); |
2199 this._length += str.length; | 2771 this._length += str.length; |
2200 return this; | 2772 return this; |
2201 } | 2773 } |
2202 StringBufferImpl.prototype.addAll = function(objects) { | 2774 StringBufferImpl.prototype.addAll = function(objects) { |
2203 for (var $i = objects.iterator(); $i.hasNext(); ) { | 2775 for (var $i = objects.iterator(); $i.hasNext$0(); ) { |
2204 var obj = $i.next(); | 2776 var obj = $i.next$0(); |
2205 this.add(obj); | 2777 this.add(obj); |
2206 } | 2778 } |
2207 return this; | 2779 return this; |
2208 } | 2780 } |
2209 StringBufferImpl.prototype.clear = function() { | 2781 StringBufferImpl.prototype.clear = function() { |
2210 this._buffer = new ListFactory$String(); | 2782 this._buffer = new ListFactory$String(); |
2211 this._length = 0; | 2783 this._length = 0; |
2212 return this; | 2784 return this; |
2213 } | 2785 } |
2214 StringBufferImpl.prototype.toString = function() { | 2786 StringBufferImpl.prototype.toString = function() { |
2215 if (this._buffer.length == 0) return ""; | 2787 if (this._buffer.length == 0) return ""; |
2216 if (this._buffer.length == 1) return $assert_String(this._buffer.$index(0)); | 2788 if (this._buffer.length == 1) return $assert_String(this._buffer.$index(0)); |
2217 var result = StringBase.concatAll(this._buffer); | 2789 var result = StringBase.concatAll(this._buffer); |
2218 this._buffer.clear(); | 2790 this._buffer.clear(); |
2219 this._buffer.add(result); | 2791 this._buffer.add(result); |
2220 return result; | 2792 return result; |
2221 } | 2793 } |
| 2794 StringBufferImpl.prototype.add$1 = StringBufferImpl.prototype.add; |
| 2795 StringBufferImpl.prototype.addAll$1 = function($0) { |
| 2796 return this.addAll(($0 && $0.is$Collection$Object())); |
| 2797 }; |
| 2798 StringBufferImpl.prototype.isEmpty$0 = function() { |
| 2799 return this.isEmpty(); |
| 2800 }; |
| 2801 StringBufferImpl.prototype.toString$0 = function() { |
| 2802 return this.toString(); |
| 2803 }; |
2222 // ********** Code for StringBase ************** | 2804 // ********** Code for StringBase ************** |
2223 function StringBase() {} | 2805 function StringBase() {} |
2224 StringBase.createFromCharCodes = function(charCodes) { | 2806 StringBase.createFromCharCodes = function(charCodes) { |
2225 if (Object.getPrototypeOf(charCodes) !== Array.prototype) { | 2807 if (Object.getPrototypeOf(charCodes) !== Array.prototype) { |
2226 var length = charCodes.length; | 2808 var length = charCodes.length; |
2227 var tmp = new Array(length); | 2809 var tmp = new Array(length); |
2228 for (var i = 0; i < length; i++) { | 2810 for (var i = 0; i < length; i++) { |
2229 tmp[i] = charCodes.$index(i); | 2811 tmp[i] = charCodes.$index(i); |
2230 } | 2812 } |
2231 charCodes = tmp; | 2813 charCodes = tmp; |
2232 } | 2814 } |
2233 return String.fromCharCode.apply(null, charCodes); | 2815 return String.fromCharCode.apply(null, charCodes); |
2234 } | 2816 } |
2235 StringBase.join = function(strings, separator) { | 2817 StringBase.join = function(strings, separator) { |
2236 if (strings.length == 0) return ''; | 2818 if (strings.length == 0) return ''; |
2237 var s = $assert_String(strings.$index(0)); | 2819 var s = $assert_String(strings.$index(0)); |
2238 for (var i = 1; | 2820 for (var i = 1; |
2239 i < strings.length; i++) { | 2821 i < strings.length; i++) { |
2240 s = s + separator + strings.$index(i); | 2822 s = s + separator + strings.$index(i); |
2241 } | 2823 } |
2242 return s; | 2824 return s; |
2243 } | 2825 } |
2244 StringBase.concatAll = function(strings) { | 2826 StringBase.concatAll = function(strings) { |
2245 return StringBase.join(strings, ""); | 2827 return StringBase.join(strings, ""); |
2246 } | 2828 } |
2247 // ********** Code for StringImplementation ************** | 2829 // ********** Code for StringImplementation ************** |
2248 StringImplementation = String; | 2830 StringImplementation = String; |
| 2831 StringImplementation.prototype.is$Pattern = function(){return this;}; |
| 2832 StringImplementation.prototype.is$Comparable = function(){return this;}; |
2249 StringImplementation.prototype.endsWith = function(other) { | 2833 StringImplementation.prototype.endsWith = function(other) { |
2250 if (other.length > this.length) return false; | 2834 if (other.length > this.length) return false; |
2251 return other == this.substring(this.length - other.length); | 2835 return other == this.substring(this.length - other.length); |
2252 } | 2836 } |
2253 StringImplementation.prototype.startsWith = function(other) { | 2837 StringImplementation.prototype.startsWith = function(other) { |
2254 if (other.length > this.length) return false; | 2838 if (other.length > this.length) return false; |
2255 return other == this.substring(0, other.length); | 2839 return other == this.substring(0, other.length); |
2256 } | 2840 } |
2257 StringImplementation.prototype.isEmpty = function() { | 2841 StringImplementation.prototype.isEmpty = function() { |
2258 return this.length == 0; | 2842 return this.length == 0; |
(...skipping 19 matching lines...) Expand all Loading... |
2278 this.hash_ += this.hash_ << 3; | 2862 this.hash_ += this.hash_ << 3; |
2279 this.hash_ ^= this.hash_ >> 11; | 2863 this.hash_ ^= this.hash_ >> 11; |
2280 this.hash_ += this.hash_ << 15; | 2864 this.hash_ += this.hash_ << 15; |
2281 this.hash_ = this.hash_ & ((1 << 29) - 1); | 2865 this.hash_ = this.hash_ & ((1 << 29) - 1); |
2282 } | 2866 } |
2283 return this.hash_; | 2867 return this.hash_; |
2284 } | 2868 } |
2285 StringImplementation.prototype.compareTo = function(other) { | 2869 StringImplementation.prototype.compareTo = function(other) { |
2286 return this == other ? 0 : this < other ? -1 : 1; | 2870 return this == other ? 0 : this < other ? -1 : 1; |
2287 } | 2871 } |
| 2872 StringImplementation.prototype.charCodeAt$1 = function($0) { |
| 2873 return this.charCodeAt($assert_num($0)); |
| 2874 }; |
| 2875 StringImplementation.prototype.compareTo$1 = function($0) { |
| 2876 return this.compareTo($assert_String($0)); |
| 2877 }; |
| 2878 StringImplementation.prototype.endsWith$1 = function($0) { |
| 2879 return this.endsWith($assert_String($0)); |
| 2880 }; |
| 2881 StringImplementation.prototype.hashCode$0 = function() { |
| 2882 return this.hashCode(); |
| 2883 }; |
| 2884 StringImplementation.prototype.indexOf$2 = function($0, $1) { |
| 2885 return this.indexOf($assert_String($0), $assert_num($1)); |
| 2886 }; |
| 2887 StringImplementation.prototype.isEmpty$0 = function() { |
| 2888 return this.isEmpty(); |
| 2889 }; |
| 2890 StringImplementation.prototype.replaceAll$2 = function($0, $1) { |
| 2891 return this.replaceAll(($0 && $0.is$Pattern()), $assert_String($1)); |
| 2892 }; |
| 2893 StringImplementation.prototype.replaceFirst$2 = function($0, $1) { |
| 2894 return this.replaceFirst(($0 && $0.is$Pattern()), $assert_String($1)); |
| 2895 }; |
| 2896 StringImplementation.prototype.startsWith$1 = function($0) { |
| 2897 return this.startsWith($assert_String($0)); |
| 2898 }; |
| 2899 StringImplementation.prototype.substring$1 = function($0) { |
| 2900 return this.substring($assert_num($0)); |
| 2901 }; |
| 2902 StringImplementation.prototype.substring$2 = function($0, $1) { |
| 2903 return this.substring($assert_num($0), $assert_num($1)); |
| 2904 }; |
2288 // ********** Code for Collections ************** | 2905 // ********** Code for Collections ************** |
2289 function Collections() {} | 2906 function Collections() {} |
2290 Collections.forEach = function(iterable, f) { | 2907 Collections.forEach = function(iterable, f) { |
2291 for (var $i = iterable.iterator(); $i.hasNext(); ) { | 2908 for (var $i = iterable.iterator(); $i.hasNext$0(); ) { |
2292 var e = $i.next(); | 2909 var e = $i.next$0(); |
2293 f(e); | 2910 f(e); |
2294 } | 2911 } |
2295 } | 2912 } |
2296 Collections.some = function(iterable, f) { | 2913 Collections.some = function(iterable, f) { |
2297 for (var $i = iterable.iterator(); $i.hasNext(); ) { | 2914 for (var $i = iterable.iterator(); $i.hasNext$0(); ) { |
2298 var e = $i.next(); | 2915 var e = $i.next$0(); |
2299 if (f(e)) return true; | 2916 if (f(e)) return true; |
2300 } | 2917 } |
2301 return false; | 2918 return false; |
2302 } | 2919 } |
2303 Collections.filter = function(source, destination, f) { | 2920 Collections.filter = function(source, destination, f) { |
2304 for (var $i = source.iterator(); $i.hasNext(); ) { | 2921 for (var $i = source.iterator(); $i.hasNext$0(); ) { |
2305 var e = $i.next(); | 2922 var e = $i.next$0(); |
2306 if (f(e)) destination.add(e); | 2923 if (f(e)) destination.add(e); |
2307 } | 2924 } |
2308 return destination; | 2925 return destination; |
2309 } | 2926 } |
2310 // ********** Code for DateImplementation ************** | 2927 // ********** Code for DateImplementation ************** |
2311 function DateImplementation() {} | 2928 function DateImplementation() {} |
2312 DateImplementation.fromEpoch$ctor = function(value, timeZone) { | 2929 DateImplementation.fromEpoch$ctor = function(value, timeZone) { |
2313 this.value = value; | 2930 this.value = value; |
2314 this.timeZone = timeZone; | 2931 this.timeZone = timeZone; |
2315 // Initializers done | 2932 // Initializers done |
2316 } | 2933 } |
2317 DateImplementation.fromEpoch$ctor.prototype = DateImplementation.prototype; | 2934 DateImplementation.fromEpoch$ctor.prototype = DateImplementation.prototype; |
2318 DateImplementation.now$ctor = function() { | 2935 DateImplementation.now$ctor = function() { |
2319 this.timeZone = new TimeZoneImplementation.local$ctor(); | 2936 this.timeZone = new TimeZoneImplementation.local$ctor(); |
2320 this.value = DateImplementation._now(); | 2937 this.value = DateImplementation._now(); |
2321 // Initializers done | 2938 // Initializers done |
2322 this._asJs(); | 2939 this._asJs(); |
2323 } | 2940 } |
2324 DateImplementation.now$ctor.prototype = DateImplementation.prototype; | 2941 DateImplementation.now$ctor.prototype = DateImplementation.prototype; |
| 2942 DateImplementation.prototype.is$Date = function(){return this;}; |
| 2943 DateImplementation.prototype.is$Comparable = function(){return this;}; |
2325 DateImplementation.prototype.get$value = function() { return this.value; }; | 2944 DateImplementation.prototype.get$value = function() { return this.value; }; |
2326 DateImplementation.prototype.$eq = function(other) { | 2945 DateImplementation.prototype.$eq = function(other) { |
2327 if (!((other instanceof DateImplementation))) return false; | 2946 if (!((other instanceof DateImplementation))) return false; |
2328 return (this.value == other.get$value()) && ($eq(this.timeZone, other.timeZone
)); | 2947 return (this.value == other.get$value()) && ($eq(this.timeZone, other.timeZone
)); |
2329 } | 2948 } |
2330 DateImplementation.prototype.compareTo = function(other) { | 2949 DateImplementation.prototype.compareTo = function(other) { |
2331 return this.value.compareTo(other.value); | 2950 return this.value.compareTo(other.value); |
2332 } | 2951 } |
2333 DateImplementation.prototype.get$year = function() { | 2952 DateImplementation.prototype.get$year = function() { |
2334 return this.isUtc ? this._asJs().getUTCFullYear() : | 2953 return this.isUtc ? this._asJs().getUTCFullYear() : |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2382 } | 3001 } |
2383 DateImplementation._now = function() { | 3002 DateImplementation._now = function() { |
2384 return new Date().valueOf(); | 3003 return new Date().valueOf(); |
2385 } | 3004 } |
2386 DateImplementation.prototype._asJs = function() { | 3005 DateImplementation.prototype._asJs = function() { |
2387 if (!this.date) { | 3006 if (!this.date) { |
2388 this.date = new Date(this.value); | 3007 this.date = new Date(this.value); |
2389 } | 3008 } |
2390 return this.date; | 3009 return this.date; |
2391 } | 3010 } |
| 3011 DateImplementation.prototype.add$1 = function($0) { |
| 3012 return this.add(($0 && $0.is$Duration())); |
| 3013 }; |
| 3014 DateImplementation.prototype.compareTo$1 = function($0) { |
| 3015 return this.compareTo(($0 && $0.is$Date())); |
| 3016 }; |
| 3017 DateImplementation.prototype.toString$0 = function() { |
| 3018 return this.toString(); |
| 3019 }; |
2392 // ********** Code for TimeZoneImplementation ************** | 3020 // ********** Code for TimeZoneImplementation ************** |
2393 function TimeZoneImplementation() {} | 3021 function TimeZoneImplementation() {} |
2394 TimeZoneImplementation.local$ctor = function() { | 3022 TimeZoneImplementation.local$ctor = function() { |
2395 this.isUtc = false; | 3023 this.isUtc = false; |
2396 // Initializers done | 3024 // Initializers done |
2397 } | 3025 } |
2398 TimeZoneImplementation.local$ctor.prototype = TimeZoneImplementation.prototype; | 3026 TimeZoneImplementation.local$ctor.prototype = TimeZoneImplementation.prototype; |
2399 TimeZoneImplementation.prototype.$eq = function(other) { | 3027 TimeZoneImplementation.prototype.$eq = function(other) { |
2400 if (!((other instanceof TimeZoneImplementation))) return false; | 3028 if (!((other instanceof TimeZoneImplementation))) return false; |
2401 return $eq(this.isUtc, other.isUtc); | 3029 return $eq(this.isUtc, other.isUtc); |
2402 } | 3030 } |
2403 TimeZoneImplementation.prototype.toString = function() { | 3031 TimeZoneImplementation.prototype.toString = function() { |
2404 if ($notnull_bool(this.isUtc)) return "TimeZone (UTC)"; | 3032 if ($notnull_bool(this.isUtc)) return "TimeZone (UTC)"; |
2405 return "TimeZone (Local)"; | 3033 return "TimeZone (Local)"; |
2406 } | 3034 } |
| 3035 TimeZoneImplementation.prototype.toString$0 = function() { |
| 3036 return this.toString(); |
| 3037 }; |
2407 // ********** Code for top level ************** | 3038 // ********** Code for top level ************** |
2408 // ********** Library node ************** | 3039 // ********** Library node ************** |
2409 // ********** Code for process ************** | 3040 // ********** Code for process ************** |
2410 // ********** Code for vm ************** | 3041 // ********** Code for vm ************** |
2411 vm = require('vm'); | 3042 vm = require('vm'); |
2412 // ********** Code for fs ************** | 3043 // ********** Code for fs ************** |
2413 fs = require('fs'); | 3044 fs = require('fs'); |
2414 // ********** Code for path ************** | 3045 // ********** Code for path ************** |
2415 path = require('path'); | 3046 path = require('path'); |
2416 // ********** Code for top level ************** | 3047 // ********** Code for top level ************** |
2417 function createSandbox() { | 3048 function createSandbox() { |
2418 return {'require': require, 'process': process, 'console': console, | 3049 return {'require': require, 'process': process, 'console': console, |
2419 'setTimeout': setTimeout, 'clearTimeout': clearTimeout}; | 3050 'setTimeout': setTimeout, 'clearTimeout': clearTimeout}; |
2420 } | 3051 } |
2421 // ********** Library file_system ************** | 3052 // ********** Library file_system ************** |
2422 // ********** Code for top level ************** | 3053 // ********** Code for top level ************** |
2423 function joinPaths(path1, path2) { | 3054 function joinPaths(path1, path2) { |
2424 var pieces = path1.split('/'); | 3055 var pieces = path1.split('/'); |
2425 var $list = path2.split('/'); | 3056 var $list = path2.split('/'); |
2426 for (var $i = 0;$i < $list.length; $i++) { | 3057 for (var $i = 0;$i < $list.length; $i++) { |
2427 var piece = $list.$index($i); | 3058 var piece = $list.$index($i); |
2428 if ($notnull_bool($notnull_bool($notnull_bool($eq(piece, '..') && pieces.len
gth > 0) && $ne(pieces.last(), '.')) && $ne(pieces.last(), '..'))) { | 3059 if ($notnull_bool($notnull_bool($notnull_bool($eq(piece, '..') && pieces.len
gth > 0) && $ne(pieces.last$0(), '.')) && $ne(pieces.last$0(), '..'))) { |
2429 pieces.removeLast(); | 3060 pieces.removeLast$0(); |
2430 } | 3061 } |
2431 else if ($notnull_bool($ne(piece, ''))) { | 3062 else if ($notnull_bool($ne(piece, ''))) { |
2432 if ($notnull_bool(pieces.length > 0 && $eq(pieces.last(), '.'))) { | 3063 if ($notnull_bool(pieces.length > 0 && $eq(pieces.last$0(), '.'))) { |
2433 pieces.removeLast(); | 3064 pieces.removeLast$0(); |
2434 } | 3065 } |
2435 pieces.add(piece); | 3066 pieces.add$1(piece); |
2436 } | 3067 } |
2437 } | 3068 } |
2438 return Strings.join((pieces && pieces.is$List$String()), '/'); | 3069 return Strings.join((pieces && pieces.is$List$String()), '/'); |
2439 } | 3070 } |
2440 function dirname(path) { | 3071 function dirname(path) { |
2441 var lastSlash = path.lastIndexOf('/', path.length); | 3072 var lastSlash = path.lastIndexOf('/', path.length); |
2442 if (lastSlash == -1) { | 3073 if (lastSlash == -1) { |
2443 return '.'; | 3074 return '.'; |
2444 } | 3075 } |
2445 else { | 3076 else { |
(...skipping 30 matching lines...) Expand all Loading... |
2476 return Strings.join(strings, '/'); | 3107 return Strings.join(strings, '/'); |
2477 } | 3108 } |
2478 function readSync(fileName) { | 3109 function readSync(fileName) { |
2479 return new SourceFile(fileName, world.files.readAll(fileName)); | 3110 return new SourceFile(fileName, world.files.readAll(fileName)); |
2480 } | 3111 } |
2481 // ********** Library util_implementation ************** | 3112 // ********** Library util_implementation ************** |
2482 // ********** Code for LinkFactory ************** | 3113 // ********** Code for LinkFactory ************** |
2483 function LinkFactory() {} | 3114 function LinkFactory() {} |
2484 LinkFactory.createLink = function(head, tail) { | 3115 LinkFactory.createLink = function(head, tail) { |
2485 var $0; | 3116 var $0; |
2486 return new LinkEntry(head, (($0 = (tail == null) ? const$16/*const EmptyLink()
*/ : tail) && $0.is$Link$T())); | 3117 return new LinkEntry(head, (($0 = (tail == null) ? const$18/*const EmptyLink()
*/ : tail) && $0.is$Link$T())); |
2487 } | 3118 } |
2488 // ********** Code for AbstractLink ************** | 3119 // ********** Code for AbstractLink ************** |
2489 function AbstractLink() {} | 3120 function AbstractLink() {} |
2490 AbstractLink.prototype.is$Link = function(){return this;}; | 3121 AbstractLink.prototype.is$Link = function(){return this;}; |
2491 AbstractLink.prototype.is$Link$Element = function(){return this;}; | 3122 AbstractLink.prototype.is$Link$Element = function(){return this;}; |
2492 AbstractLink.prototype.is$Link$Node = function(){return this;}; | 3123 AbstractLink.prototype.is$Link$Node = function(){return this;}; |
2493 AbstractLink.prototype.is$Link$T = function(){return this;}; | 3124 AbstractLink.prototype.is$Link$T = function(){return this;}; |
2494 AbstractLink.prototype.is$Link$Token = function(){return this;}; | 3125 AbstractLink.prototype.is$Link$Token = function(){return this;}; |
2495 AbstractLink.prototype.is$Link$Type = function(){return this;}; | 3126 AbstractLink.prototype.is$Link$Type = function(){return this;}; |
2496 AbstractLink.prototype.is$Iterable = function(){return this;}; | 3127 AbstractLink.prototype.is$Iterable = function(){return this;}; |
2497 AbstractLink.prototype.get$head = function() { | 3128 AbstractLink.prototype.get$head = function() { |
2498 $throw("bug"); | 3129 $throw("bug"); |
2499 } | 3130 } |
2500 AbstractLink.prototype.get$tail = function() { | 3131 AbstractLink.prototype.get$tail = function() { |
2501 $throw("bug"); | 3132 $throw("bug"); |
2502 } | 3133 } |
2503 AbstractLink.prototype.prepend = function(element) { | 3134 AbstractLink.prototype.prepend = function(element) { |
2504 return LinkFactory.createLink(element, this); | 3135 return LinkFactory.createLink(element, this); |
2505 } | 3136 } |
2506 AbstractLink.prototype.iterator = function() { | 3137 AbstractLink.prototype.iterator = function() { |
2507 var $0; | 3138 var $0; |
2508 return (($0 = this.toList().iterator()) && $0.is$Iterator$T()); | 3139 return (($0 = this.toList().iterator$0()) && $0.is$Iterator$T()); |
2509 } | 3140 } |
2510 AbstractLink.prototype.printOn = function(buffer, separatedBy) { | 3141 AbstractLink.prototype.printOn = function(buffer, separatedBy) { |
2511 var $0; | 3142 var $0; |
2512 if ($notnull_bool(this.isEmpty())) return; | 3143 if ($notnull_bool(this.isEmpty())) return; |
2513 buffer.add(this.get$head() == null ? 'null' : this.get$head()); | 3144 buffer.add(this.get$head() == null ? 'null' : this.get$head()); |
2514 if (separatedBy == null) separatedBy = ''; | 3145 if (separatedBy == null) separatedBy = ''; |
2515 for (var link = (($0 = this.get$tail()) && $0.is$Link()); | 3146 for (var link = (($0 = this.get$tail()) && $0.is$Link()); |
2516 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link(
))) { | 3147 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link(
))) { |
2517 buffer.add(separatedBy); | 3148 buffer.add(separatedBy); |
2518 buffer.add(link.get$head() == null ? 'null' : link.get$head()); | 3149 buffer.add(link.get$head() == null ? 'null' : link.get$head()); |
2519 } | 3150 } |
2520 } | 3151 } |
2521 AbstractLink.prototype.toString = function() { | 3152 AbstractLink.prototype.toString = function() { |
2522 var buffer = new StringBufferImpl(""); | 3153 var buffer = new StringBufferImpl(""); |
2523 buffer.add('[ '); | 3154 buffer.add('[ '); |
2524 this.printOn(buffer, ', '); | 3155 this.printOn(buffer, ', '); |
2525 buffer.add(' ]'); | 3156 buffer.add(' ]'); |
2526 return buffer.toString(); | 3157 return buffer.toString(); |
2527 } | 3158 } |
| 3159 AbstractLink.prototype.isEmpty$0 = function() { |
| 3160 return this.isEmpty(); |
| 3161 }; |
| 3162 AbstractLink.prototype.iterator$0 = function() { |
| 3163 return this.iterator(); |
| 3164 }; |
| 3165 AbstractLink.prototype.printOn$1 = function($0) { |
| 3166 return this.printOn(($0 && $0.is$StringBuffer())); |
| 3167 }; |
| 3168 AbstractLink.prototype.toString$0 = function() { |
| 3169 return this.toString(); |
| 3170 }; |
2528 // ********** Code for AbstractLink$T ************** | 3171 // ********** Code for AbstractLink$T ************** |
2529 function AbstractLink$T() {} | 3172 function AbstractLink$T() {} |
2530 $inherits(AbstractLink$T, AbstractLink); | 3173 $inherits(AbstractLink$T, AbstractLink); |
2531 AbstractLink$T.prototype.is$Link = function(){return this;}; | 3174 AbstractLink$T.prototype.is$Link = function(){return this;}; |
2532 AbstractLink$T.prototype.is$Link$Element = function(){return this;}; | 3175 AbstractLink$T.prototype.is$Link$Element = function(){return this;}; |
2533 AbstractLink$T.prototype.is$Link$Node = function(){return this;}; | 3176 AbstractLink$T.prototype.is$Link$Node = function(){return this;}; |
2534 AbstractLink$T.prototype.is$Link$T = function(){return this;}; | 3177 AbstractLink$T.prototype.is$Link$T = function(){return this;}; |
2535 AbstractLink$T.prototype.is$Link$Token = function(){return this;}; | 3178 AbstractLink$T.prototype.is$Link$Token = function(){return this;}; |
2536 AbstractLink$T.prototype.is$Link$Type = function(){return this;}; | 3179 AbstractLink$T.prototype.is$Link$Type = function(){return this;}; |
2537 AbstractLink$T.prototype.is$Iterable = function(){return this;}; | 3180 AbstractLink$T.prototype.is$Iterable = function(){return this;}; |
2538 AbstractLink$T.prototype.iterator = function() { | 3181 AbstractLink$T.prototype.iterator = function() { |
2539 var $0; | 3182 var $0; |
2540 return (($0 = this.toList().iterator()) && $0.is$Iterator$T()); | 3183 return (($0 = this.toList().iterator$0()) && $0.is$Iterator$T()); |
2541 } | 3184 } |
2542 // ********** Code for LinkTail ************** | 3185 // ********** Code for LinkTail ************** |
2543 function LinkTail() { | 3186 function LinkTail() { |
2544 // Initializers done | 3187 // Initializers done |
2545 } | 3188 } |
2546 $inherits(LinkTail, AbstractLink$T); | 3189 $inherits(LinkTail, AbstractLink$T); |
2547 LinkTail.prototype.is$Link = function(){return this;}; | 3190 LinkTail.prototype.is$Link = function(){return this;}; |
2548 LinkTail.prototype.is$Link$Element = function(){return this;}; | 3191 LinkTail.prototype.is$Link$Element = function(){return this;}; |
2549 LinkTail.prototype.is$Link$Node = function(){return this;}; | 3192 LinkTail.prototype.is$Link$Node = function(){return this;}; |
2550 LinkTail.prototype.is$Link$T = function(){return this;}; | 3193 LinkTail.prototype.is$Link$T = function(){return this;}; |
2551 LinkTail.prototype.is$Link$Token = function(){return this;}; | 3194 LinkTail.prototype.is$Link$Token = function(){return this;}; |
2552 LinkTail.prototype.is$Link$Type = function(){return this;}; | 3195 LinkTail.prototype.is$Link$Type = function(){return this;}; |
2553 LinkTail.prototype.is$Iterable = function(){return this;}; | 3196 LinkTail.prototype.is$Iterable = function(){return this;}; |
2554 LinkTail.prototype.get$head = function() { | 3197 LinkTail.prototype.get$head = function() { |
2555 return null; | 3198 return null; |
2556 } | 3199 } |
2557 LinkTail.prototype.get$tail = function() { | 3200 LinkTail.prototype.get$tail = function() { |
2558 return null; | 3201 return null; |
2559 } | 3202 } |
2560 LinkTail.prototype.toList = function() { | 3203 LinkTail.prototype.toList = function() { |
2561 return const$15/*const []*/; | 3204 return const$5/*const <HInstruction>[]*/; |
2562 } | 3205 } |
2563 LinkTail.prototype.isEmpty = function() { | 3206 LinkTail.prototype.isEmpty = function() { |
2564 return true; | 3207 return true; |
2565 } | 3208 } |
| 3209 LinkTail.prototype.isEmpty$0 = function() { |
| 3210 return this.isEmpty(); |
| 3211 }; |
2566 // ********** Code for LinkTail$Node ************** | 3212 // ********** Code for LinkTail$Node ************** |
2567 function LinkTail$Node() { | 3213 function LinkTail$Node() { |
2568 // Initializers done | 3214 // Initializers done |
2569 } | 3215 } |
2570 $inherits(LinkTail$Node, LinkTail); | 3216 $inherits(LinkTail$Node, LinkTail); |
2571 LinkTail$Node.prototype.is$Link = function(){return this;}; | 3217 LinkTail$Node.prototype.is$Link = function(){return this;}; |
2572 LinkTail$Node.prototype.is$Link$Element = function(){return this;}; | 3218 LinkTail$Node.prototype.is$Link$Element = function(){return this;}; |
2573 LinkTail$Node.prototype.is$Link$Node = function(){return this;}; | 3219 LinkTail$Node.prototype.is$Link$Node = function(){return this;}; |
2574 LinkTail$Node.prototype.is$Link$T = function(){return this;}; | 3220 LinkTail$Node.prototype.is$Link$T = function(){return this;}; |
2575 LinkTail$Node.prototype.is$Link$Token = function(){return this;}; | 3221 LinkTail$Node.prototype.is$Link$Token = function(){return this;}; |
(...skipping 15 matching lines...) Expand all Loading... |
2591 } | 3237 } |
2592 LinkEntry.prototype.toList = function() { | 3238 LinkEntry.prototype.toList = function() { |
2593 var $0; | 3239 var $0; |
2594 var list = new ListFactory$T(); | 3240 var list = new ListFactory$T(); |
2595 for (var link = this; | 3241 for (var link = this; |
2596 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
T())) { | 3242 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
T())) { |
2597 list.addLast(link.get$head()); | 3243 list.addLast(link.get$head()); |
2598 } | 3244 } |
2599 return list; | 3245 return list; |
2600 } | 3246 } |
| 3247 LinkEntry.prototype.isEmpty$0 = function() { |
| 3248 return this.isEmpty(); |
| 3249 }; |
2601 // ********** Code for LinkEntry$T ************** | 3250 // ********** Code for LinkEntry$T ************** |
2602 function LinkEntry$T(head, realTail) { | 3251 function LinkEntry$T(head, realTail) { |
2603 this.head = head; | 3252 this.head = head; |
2604 this.realTail = realTail; | 3253 this.realTail = realTail; |
2605 // Initializers done | 3254 // Initializers done |
2606 } | 3255 } |
2607 $inherits(LinkEntry$T, LinkEntry); | 3256 $inherits(LinkEntry$T, LinkEntry); |
2608 // ********** Code for LinkBuilderImplementation ************** | 3257 // ********** Code for LinkBuilderImplementation ************** |
2609 function LinkBuilderImplementation() { | 3258 function LinkBuilderImplementation() { |
2610 this.head = null | 3259 this.head = null |
2611 this.lastLink = null | 3260 this.lastLink = null |
2612 // Initializers done | 3261 // Initializers done |
2613 } | 3262 } |
2614 LinkBuilderImplementation.prototype.get$head = function() { return this.head; }; | 3263 LinkBuilderImplementation.prototype.get$head = function() { return this.head; }; |
2615 LinkBuilderImplementation.prototype.set$head = function(value) { return this.hea
d = value; }; | 3264 LinkBuilderImplementation.prototype.set$head = function(value) { return this.hea
d = value; }; |
2616 LinkBuilderImplementation.prototype.toLink = function() { | 3265 LinkBuilderImplementation.prototype.toLink = function() { |
2617 if (this.head == null) return const$16/*const EmptyLink()*/; | 3266 if (this.head == null) return const$18/*const EmptyLink()*/; |
2618 this.lastLink.realTail = const$16/*const EmptyLink()*/; | 3267 this.lastLink.realTail = const$18/*const EmptyLink()*/; |
2619 var link = this.head; | 3268 var link = this.head; |
2620 this.lastLink = null; | 3269 this.lastLink = null; |
2621 this.head = null; | 3270 this.head = null; |
2622 return link; | 3271 return link; |
2623 } | 3272 } |
2624 LinkBuilderImplementation.prototype.addLast = function(t) { | 3273 LinkBuilderImplementation.prototype.addLast = function(t) { |
2625 var entry = new LinkEntry$T(t, null); | 3274 var entry = new LinkEntry$T(t, null); |
2626 if (this.head == null) { | 3275 if (this.head == null) { |
2627 this.head = entry; | 3276 this.head = entry; |
2628 } | 3277 } |
2629 else { | 3278 else { |
2630 this.lastLink.realTail = entry; | 3279 this.lastLink.realTail = entry; |
2631 } | 3280 } |
2632 this.lastLink = entry; | 3281 this.lastLink = entry; |
2633 } | 3282 } |
2634 // ********** Code for LinkBuilderImplementation$Type ************** | 3283 // ********** Code for LinkBuilderImplementation$Type ************** |
2635 function LinkBuilderImplementation$Type() { | 3284 function LinkBuilderImplementation$Type() { |
2636 this.head = null | 3285 this.head = null |
2637 this.lastLink = null | 3286 this.lastLink = null |
2638 // Initializers done | 3287 // Initializers done |
2639 } | 3288 } |
2640 $inherits(LinkBuilderImplementation$Type, LinkBuilderImplementation); | 3289 $inherits(LinkBuilderImplementation$Type, LinkBuilderImplementation); |
2641 // ********** Code for top level ************** | 3290 // ********** Code for top level ************** |
2642 // ********** Library util ************** | 3291 // ********** Library util ************** |
2643 // ********** Code for top level ************** | 3292 // ********** Code for top level ************** |
2644 // ********** Library scanner_implementation ************** | 3293 // ********** Library scanner_implementation ************** |
2645 // ********** Code for ArrayBasedScanner ************** | 3294 // ********** Code for ArrayBasedScanner ************** |
2646 function ArrayBasedScanner() { | 3295 function ArrayBasedScanner() { |
2647 this.groupingStack = const$16/*const EmptyLink()*/ | 3296 this.groupingStack = const$18/*const EmptyLink()*/ |
2648 this.extraCharOffset = 0; | 3297 this.extraCharOffset = 0; |
2649 this.tokenStart = -1; | 3298 this.tokenStart = -1; |
2650 this.byteOffset = -1; | 3299 this.byteOffset = -1; |
2651 this.tokens = new Token(0/*null.EOF_TOKEN*/, -1); | 3300 this.tokens = new Token(0/*null.EOF_TOKEN*/, -1); |
2652 // Initializers done | 3301 // Initializers done |
2653 this.tail = this.tokens; | 3302 this.tail = this.tokens; |
2654 } | 3303 } |
2655 $inherits(ArrayBasedScanner, AbstractScanner$S); | 3304 $inherits(ArrayBasedScanner, AbstractScanner$S); |
2656 ArrayBasedScanner.prototype.get$charOffset = function() { | 3305 ArrayBasedScanner.prototype.get$charOffset = function() { |
2657 return this.byteOffset + this.extraCharOffset; | 3306 return this.byteOffset + this.extraCharOffset; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2754 this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Tok
en()); | 3403 this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Tok
en()); |
2755 } | 3404 } |
2756 if ($notnull_bool(this.groupingStack.isEmpty())) return; | 3405 if ($notnull_bool(this.groupingStack.isEmpty())) return; |
2757 if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)
)) { | 3406 if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)
)) { |
2758 this.groupingStack.get$head().endGroup = oldTail.next; | 3407 this.groupingStack.get$head().endGroup = oldTail.next; |
2759 this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Tok
en()); | 3408 this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Tok
en()); |
2760 } | 3409 } |
2761 } | 3410 } |
2762 // ********** Code for ArrayBasedScanner$SourceString ************** | 3411 // ********** Code for ArrayBasedScanner$SourceString ************** |
2763 function ArrayBasedScanner$SourceString() { | 3412 function ArrayBasedScanner$SourceString() { |
2764 this.groupingStack = const$16/*const EmptyLink()*/ | 3413 this.groupingStack = const$18/*const EmptyLink()*/ |
2765 this.extraCharOffset = 0; | 3414 this.extraCharOffset = 0; |
2766 this.tokenStart = -1; | 3415 this.tokenStart = -1; |
2767 this.byteOffset = -1; | 3416 this.byteOffset = -1; |
2768 this.tokens = new Token(0/*null.EOF_TOKEN*/, -1); | 3417 this.tokens = new Token(0/*null.EOF_TOKEN*/, -1); |
2769 // Initializers done | 3418 // Initializers done |
2770 this.tail = this.tokens; | 3419 this.tail = this.tokens; |
2771 } | 3420 } |
2772 $inherits(ArrayBasedScanner$SourceString, ArrayBasedScanner); | 3421 $inherits(ArrayBasedScanner$SourceString, ArrayBasedScanner); |
2773 ArrayBasedScanner$SourceString.prototype.advance = function() { | 3422 ArrayBasedScanner$SourceString.prototype.advance = function() { |
2774 var next = this.nextByte(); | 3423 var next = this.nextByte(); |
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4398 this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(
start, -1)); | 5047 this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(
start, -1)); |
4399 } | 5048 } |
4400 return next; | 5049 return next; |
4401 } | 5050 } |
4402 else { | 5051 else { |
4403 var nonAsciiStart = this.get$byteOffset(); | 5052 var nonAsciiStart = this.get$byteOffset(); |
4404 do { | 5053 do { |
4405 next = this.nextByte(); | 5054 next = this.nextByte(); |
4406 } | 5055 } |
4407 while (next > 127) | 5056 while (next > 127) |
4408 var string = $assert_String(this.utf8String(nonAsciiStart, -1).toString())
; | 5057 var string = this.utf8String(nonAsciiStart, -1).toString$0(); |
4409 isAscii = false; | 5058 isAscii = false; |
4410 this.addToCharOffset(string.length); | 5059 this.addToCharOffset(string.length); |
4411 return next; | 5060 return next; |
4412 } | 5061 } |
4413 next = this.advance(); | 5062 next = this.advance(); |
4414 } | 5063 } |
4415 } | 5064 } |
4416 AbstractScanner.prototype.tokenizeRawString = function(next) { | 5065 AbstractScanner.prototype.tokenizeRawString = function(next) { |
4417 var start = this.get$byteOffset(); | 5066 var start = this.get$byteOffset(); |
4418 next = this.advance(); | 5067 next = this.advance(); |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5211 this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(
start, -1)); | 5860 this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(
start, -1)); |
5212 } | 5861 } |
5213 return next; | 5862 return next; |
5214 } | 5863 } |
5215 else { | 5864 else { |
5216 var nonAsciiStart = this.get$byteOffset(); | 5865 var nonAsciiStart = this.get$byteOffset(); |
5217 do { | 5866 do { |
5218 next = this.nextByte(); | 5867 next = this.nextByte(); |
5219 } | 5868 } |
5220 while (next > 127) | 5869 while (next > 127) |
5221 var string = $assert_String(this.utf8String(nonAsciiStart, -1).toString())
; | 5870 var string = this.utf8String(nonAsciiStart, -1).toString$0(); |
5222 isAscii = false; | 5871 isAscii = false; |
5223 this.addToCharOffset(string.length); | 5872 this.addToCharOffset(string.length); |
5224 return next; | 5873 return next; |
5225 } | 5874 } |
5226 next = this.advance(); | 5875 next = this.advance(); |
5227 } | 5876 } |
5228 } | 5877 } |
5229 AbstractScanner$S.prototype.tokenizeRawString = function(next) { | 5878 AbstractScanner$S.prototype.tokenizeRawString = function(next) { |
5230 var start = this.get$byteOffset(); | 5879 var start = this.get$byteOffset(); |
5231 next = this.advance(); | 5880 next = this.advance(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5305 next = this.advance(); | 5954 next = this.advance(); |
5306 } | 5955 } |
5307 return next; | 5956 return next; |
5308 } | 5957 } |
5309 // ********** Code for MalformedInputException ************** | 5958 // ********** Code for MalformedInputException ************** |
5310 function MalformedInputException(message) { | 5959 function MalformedInputException(message) { |
5311 this.message = message; | 5960 this.message = message; |
5312 // Initializers done | 5961 // Initializers done |
5313 } | 5962 } |
5314 MalformedInputException.prototype.toString = function() { | 5963 MalformedInputException.prototype.toString = function() { |
5315 return this.message.toString(); | 5964 return this.message.toString$0(); |
5316 } | 5965 } |
| 5966 MalformedInputException.prototype.toString$0 = function() { |
| 5967 return this.toString(); |
| 5968 }; |
5317 // ********** Code for ScannerTask ************** | 5969 // ********** Code for ScannerTask ************** |
5318 function ScannerTask(compiler) { | 5970 function ScannerTask(compiler) { |
5319 CompilerTask.call(this, compiler); | 5971 CompilerTask.call(this, compiler); |
5320 // Initializers done | 5972 // Initializers done |
5321 } | 5973 } |
5322 $inherits(ScannerTask, CompilerTask); | 5974 $inherits(ScannerTask, CompilerTask); |
5323 ScannerTask.prototype.get$name = function() { | 5975 ScannerTask.prototype.get$name = function() { |
5324 return 'Scanner'; | 5976 return 'Scanner'; |
5325 } | 5977 } |
5326 ScannerTask.prototype.scan = function(script) { | 5978 ScannerTask.prototype.scan = function(script) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5378 this.handleNoTypeVariables = (function (t) { | 6030 this.handleNoTypeVariables = (function (t) { |
5379 return $this.listener.handleNoTypeVariables$1(t); | 6031 return $this.listener.handleNoTypeVariables$1(t); |
5380 }) | 6032 }) |
5381 ; | 6033 ; |
5382 } | 6034 } |
5383 PartialParser.prototype.next = function(token) { | 6035 PartialParser.prototype.next = function(token) { |
5384 return this.checkEof(token.next); | 6036 return this.checkEof(token.next); |
5385 } | 6037 } |
5386 PartialParser.prototype.checkEof = function(token) { | 6038 PartialParser.prototype.checkEof = function(token) { |
5387 if (token.kind === 0/*null.EOF_TOKEN*/) { | 6039 if (token.kind === 0/*null.EOF_TOKEN*/) { |
5388 this.listener.unexpectedEof(); | 6040 this.listener.unexpectedEof$0(); |
5389 $throw('Unexpected EOF'); | 6041 $throw('Unexpected EOF'); |
5390 } | 6042 } |
5391 return token; | 6043 return token; |
5392 } | 6044 } |
5393 PartialParser.prototype.parseUnit = function(token) { | 6045 PartialParser.prototype.parseUnit = function(token) { |
5394 while (token.kind !== 0/*null.EOF_TOKEN*/) { | 6046 while (token.kind !== 0/*null.EOF_TOKEN*/) { |
5395 var value = token.get$stringValue(); | 6047 var value = token.get$stringValue(); |
5396 switch (true) { | 6048 switch (true) { |
5397 case value === 'interface': | 6049 case value === 'interface': |
5398 | 6050 |
(...skipping 17 matching lines...) Expand all Loading... |
5416 | 6068 |
5417 default: | 6069 default: |
5418 | 6070 |
5419 token = this.parseTopLevelMember(token); | 6071 token = this.parseTopLevelMember(token); |
5420 break; | 6072 break; |
5421 | 6073 |
5422 } | 6074 } |
5423 } | 6075 } |
5424 } | 6076 } |
5425 PartialParser.prototype.parseInterface = function(token) { | 6077 PartialParser.prototype.parseInterface = function(token) { |
5426 this.listener.beginInterface(token); | 6078 this.listener.beginInterface$1(token); |
5427 token = this.parseIdentifier(this.next(token)); | 6079 token = this.parseIdentifier(this.next(token)); |
5428 token = this.parseTypeVariablesOpt(token); | 6080 token = this.parseTypeVariablesOpt(token); |
5429 token = this.parseSupertypesClauseOpt(token); | 6081 token = this.parseSupertypesClauseOpt(token); |
5430 token = this.parseFactoryClauseOpt(token); | 6082 token = this.parseFactoryClauseOpt(token); |
5431 return this.parseInterfaceBody(token); | 6083 return this.parseInterfaceBody(token); |
5432 } | 6084 } |
5433 PartialParser.prototype.parseInterfaceBody = function(token) { | 6085 PartialParser.prototype.parseInterfaceBody = function(token) { |
5434 token = this.skipBlock(token); | 6086 token = this.skipBlock(token); |
5435 this.listener.endInterface(token); | 6087 this.listener.endInterface$1(token); |
5436 return token.next; | 6088 return token.next; |
5437 } | 6089 } |
5438 PartialParser.prototype.parseNamedFunctionAlias = function(token) { | 6090 PartialParser.prototype.parseNamedFunctionAlias = function(token) { |
5439 this.listener.beginFunctionTypeAlias(token); | 6091 this.listener.beginFunctionTypeAlias$1(token); |
5440 token = this.parseReturnTypeOpt(this.next(token)); | 6092 token = this.parseReturnTypeOpt(this.next(token)); |
5441 token = this.parseIdentifier(token); | 6093 token = this.parseIdentifier(token); |
5442 token = this.parseTypeVariablesOpt(token); | 6094 token = this.parseTypeVariablesOpt(token); |
5443 token = this.parseFormalParameters(token); | 6095 token = this.parseFormalParameters(token); |
5444 this.listener.endFunctionTypeAlias(token); | 6096 this.listener.endFunctionTypeAlias$1(token); |
5445 return this.expect(';', token); | 6097 return this.expect(';', token); |
5446 } | 6098 } |
5447 PartialParser.prototype.parseReturnTypeOpt = function(token) { | 6099 PartialParser.prototype.parseReturnTypeOpt = function(token) { |
5448 if (token.get$stringValue() === 'void') { | 6100 if (token.get$stringValue() === 'void') { |
5449 this.listener.handleVoidKeyword(token); | 6101 this.listener.handleVoidKeyword$1(token); |
5450 return this.next(token); | 6102 return this.next(token); |
5451 } | 6103 } |
5452 else { | 6104 else { |
5453 return this.parseTypeOpt(token); | 6105 return this.parseTypeOpt(token); |
5454 } | 6106 } |
5455 } | 6107 } |
5456 PartialParser.prototype.parseFormalParameters = function(token) { | 6108 PartialParser.prototype.parseFormalParameters = function(token) { |
5457 var begin = token; | 6109 var begin = token; |
5458 this.listener.beginFormalParameters(begin); | 6110 this.listener.beginFormalParameters$1(begin); |
5459 this.expect('(', token); | 6111 this.expect('(', token); |
5460 var parameterCount = 0; | 6112 var parameterCount = 0; |
5461 if ($notnull_bool(this.optional(')', token.next))) { | 6113 if ($notnull_bool(this.optional(')', token.next))) { |
5462 this.listener.endFormalParameters(parameterCount, begin, token.next); | 6114 this.listener.endFormalParameters$3(parameterCount, begin, token.next); |
5463 return token.next.next; | 6115 return token.next.next; |
5464 } | 6116 } |
5465 do { | 6117 do { |
5466 this.listener.beginFormalParameter(token); | 6118 this.listener.beginFormalParameter$1(token); |
5467 token = this.parseTypeOpt(this.next(token)); | 6119 token = this.parseTypeOpt(this.next(token)); |
5468 token = this.parseIdentifier(token); | 6120 token = this.parseIdentifier(token); |
5469 this.listener.endFormalParameter(token); | 6121 this.listener.endFormalParameter$1(token); |
5470 ++parameterCount; | 6122 ++parameterCount; |
5471 } | 6123 } |
5472 while ($notnull_bool(this.optional(',', token))) | 6124 while ($notnull_bool(this.optional(',', token))) |
5473 this.listener.endFormalParameters(parameterCount, begin, token); | 6125 this.listener.endFormalParameters$3(parameterCount, begin, token); |
5474 return this.expect(')', token); | 6126 return this.expect(')', token); |
5475 } | 6127 } |
5476 PartialParser.prototype.parseTypeOpt = function(token) { | 6128 PartialParser.prototype.parseTypeOpt = function(token) { |
5477 var nextValue = token.next.get$stringValue(); | 6129 var nextValue = token.next.get$stringValue(); |
5478 switch (true) { | 6130 switch (true) { |
5479 case nextValue === '<': | 6131 case nextValue === '<': |
5480 case nextValue === '.': | 6132 case nextValue === '.': |
5481 case this.isIdentifier(token.next): | 6133 case this.isIdentifier(token.next): |
5482 | 6134 |
5483 return this.parseType(token); | 6135 return this.parseType(token); |
5484 | 6136 |
5485 default: | 6137 default: |
5486 | 6138 |
5487 this.listener.handleNoType(token); | 6139 this.listener.handleNoType$1(token); |
5488 return token; | 6140 return token; |
5489 | 6141 |
5490 } | 6142 } |
5491 } | 6143 } |
5492 PartialParser.prototype.isIdentifier = function(token) { | 6144 PartialParser.prototype.isIdentifier = function(token) { |
5493 var kind = token.kind; | 6145 var kind = token.kind; |
5494 switch (true) { | 6146 switch (true) { |
5495 case kind === 97/*null.IDENTIFIER_TOKEN*/: | 6147 case kind === 97/*null.IDENTIFIER_TOKEN*/: |
5496 | 6148 |
5497 return true; | 6149 return true; |
(...skipping 18 matching lines...) Expand all Loading... |
5516 return token; | 6168 return token; |
5517 } | 6169 } |
5518 PartialParser.prototype.parseFactoryClauseOpt = function(token) { | 6170 PartialParser.prototype.parseFactoryClauseOpt = function(token) { |
5519 if ($notnull_bool(this.optional('factory', token))) { | 6171 if ($notnull_bool(this.optional('factory', token))) { |
5520 return this.parseType(this.next(token)); | 6172 return this.parseType(this.next(token)); |
5521 } | 6173 } |
5522 return token; | 6174 return token; |
5523 } | 6175 } |
5524 PartialParser.prototype.skipBlock = function(token) { | 6176 PartialParser.prototype.skipBlock = function(token) { |
5525 if (!$notnull_bool(this.optional('{', token))) { | 6177 if (!$notnull_bool(this.optional('{', token))) { |
5526 return this.listener.expectedBlock(token); | 6178 return this.listener.expectedBlock$1(token); |
5527 } | 6179 } |
5528 var beginGroupToken = (token && token.is$BeginGroupToken()); | 6180 var beginGroupToken = (token && token.is$BeginGroupToken()); |
5529 $assert(beginGroupToken.endGroup == null || beginGroupToken.endGroup.kind ===
125/*null.$RBRACE*/, "beginGroupToken.endGroup === null ||\n beginGrou
pToken.endGroup.kind === $RBRACE", "parser.dart", 171, 12); | 6181 $assert(beginGroupToken.endGroup == null || beginGroupToken.endGroup.kind ===
125/*null.$RBRACE*/, "beginGroupToken.endGroup === null ||\n beginGrou
pToken.endGroup.kind === $RBRACE", "parser.dart", 171, 12); |
5530 return beginGroupToken.endGroup; | 6182 return beginGroupToken.endGroup; |
5531 } | 6183 } |
5532 PartialParser.prototype.skipArguments = function(token) { | 6184 PartialParser.prototype.skipArguments = function(token) { |
5533 return token.endGroup; | 6185 return token.endGroup; |
5534 } | 6186 } |
5535 PartialParser.prototype.parseClass = function(token) { | 6187 PartialParser.prototype.parseClass = function(token) { |
5536 var begin = token; | 6188 var begin = token; |
5537 this.listener.beginClass(token); | 6189 this.listener.beginClass$1(token); |
5538 token = this.parseIdentifier(this.next(token)); | 6190 token = this.parseIdentifier(this.next(token)); |
5539 token = this.parseTypeVariablesOpt(token); | 6191 token = this.parseTypeVariablesOpt(token); |
5540 var extendsKeyword; | 6192 var extendsKeyword; |
5541 if ($notnull_bool(this.optional('extends', token))) { | 6193 if ($notnull_bool(this.optional('extends', token))) { |
5542 extendsKeyword = token; | 6194 extendsKeyword = token; |
5543 token = this.parseType(this.next(token)); | 6195 token = this.parseType(this.next(token)); |
5544 } | 6196 } |
5545 else { | 6197 else { |
5546 extendsKeyword = null; | 6198 extendsKeyword = null; |
5547 this.listener.handleNoType(token); | 6199 this.listener.handleNoType$1(token); |
5548 } | 6200 } |
5549 var implementsKeyword; | 6201 var implementsKeyword; |
5550 var interfacesCount = 0; | 6202 var interfacesCount = 0; |
5551 if ($notnull_bool(this.optional('implements', token))) { | 6203 if ($notnull_bool(this.optional('implements', token))) { |
5552 do { | 6204 do { |
5553 token = this.parseType(this.next(token)); | 6205 token = this.parseType(this.next(token)); |
5554 ++interfacesCount; | 6206 ++interfacesCount; |
5555 } | 6207 } |
5556 while ($notnull_bool(this.optional(',', token))) | 6208 while ($notnull_bool(this.optional(',', token))) |
5557 } | 6209 } |
5558 token = this.parseNativeClassClauseOpt(token); | 6210 token = this.parseNativeClassClauseOpt(token); |
5559 token = this.parseClassBody(token); | 6211 token = this.parseClassBody(token); |
5560 this.listener.endClass(interfacesCount, begin, extendsKeyword, implementsKeywo
rd, token); | 6212 this.listener.endClass$5(interfacesCount, begin, extendsKeyword, implementsKey
word, token); |
5561 return token.next; | 6213 return token.next; |
5562 } | 6214 } |
5563 PartialParser.prototype.parseNativeClassClauseOpt = function(token) { | 6215 PartialParser.prototype.parseNativeClassClauseOpt = function(token) { |
5564 if ($notnull_bool(this.optional('native', token))) { | 6216 if ($notnull_bool(this.optional('native', token))) { |
5565 return this.parseString(this.next(token)); | 6217 return this.parseString(this.next(token)); |
5566 } | 6218 } |
5567 return token; | 6219 return token; |
5568 } | 6220 } |
5569 PartialParser.prototype.parseString = function(token) { | 6221 PartialParser.prototype.parseString = function(token) { |
| 6222 var $0; |
5570 if (token.kind === 39/*null.STRING_TOKEN*/) { | 6223 if (token.kind === 39/*null.STRING_TOKEN*/) { |
5571 return this.next(token); | 6224 return this.next(token); |
5572 } | 6225 } |
5573 else { | 6226 else { |
5574 return this.listener.expected('string', token); | 6227 return (($0 = this.listener.expected$2('string', token)) && $0.is$Token()); |
5575 } | 6228 } |
5576 } | 6229 } |
5577 PartialParser.prototype.parseIdentifier = function(token) { | 6230 PartialParser.prototype.parseIdentifier = function(token) { |
5578 if ($notnull_bool(this.isIdentifier(token))) { | 6231 if ($notnull_bool(this.isIdentifier(token))) { |
5579 this.listener.handleIdentifier(token); | 6232 this.listener.handleIdentifier$1(token); |
5580 } | 6233 } |
5581 else { | 6234 else { |
5582 this.listener.expectedIdentifier(token); | 6235 this.listener.expectedIdentifier$1(token); |
5583 } | 6236 } |
5584 return this.next(token); | 6237 return this.next(token); |
5585 } | 6238 } |
5586 PartialParser.prototype.expect = function(string, token) { | 6239 PartialParser.prototype.expect = function(string, token) { |
5587 if (string !== token.get$stringValue()) { | 6240 if (string !== token.get$stringValue()) { |
5588 if (string === '>') { | 6241 if (string === '>') { |
5589 if (token.get$stringValue() === '>>') { | 6242 if (token.get$stringValue() === '>>') { |
5590 var gt = new StringToken(62/*null.GT_TOKEN*/, '>', token.charOffset + 1)
; | 6243 var gt = new StringToken(62/*null.GT_TOKEN*/, '>', token.charOffset + 1)
; |
5591 gt.next = token.next; | 6244 gt.next = token.next; |
5592 return gt; | 6245 return gt; |
5593 } | 6246 } |
5594 else if (token.get$stringValue() === '>>>') { | 6247 else if (token.get$stringValue() === '>>>') { |
5595 var gtgt = new StringToken(1024/*null.UNKNOWN_TOKEN*/, '>>', token.charO
ffset + 1); | 6248 var gtgt = new StringToken(1024/*null.UNKNOWN_TOKEN*/, '>>', token.charO
ffset + 1); |
5596 gtgt.next = token.next; | 6249 gtgt.next = token.next; |
5597 return gtgt; | 6250 return gtgt; |
5598 } | 6251 } |
5599 } | 6252 } |
5600 return this.listener.expected(string, token); | 6253 return this.listener.expected$2(string, token); |
5601 } | 6254 } |
5602 return token.next; | 6255 return token.next; |
5603 } | 6256 } |
5604 PartialParser.prototype.parseTypeVariable = function(token) { | 6257 PartialParser.prototype.parseTypeVariable = function(token) { |
5605 this.listener.beginTypeVariable(token); | 6258 this.listener.beginTypeVariable$1(token); |
5606 token = this.parseIdentifier(token); | 6259 token = this.parseIdentifier(token); |
5607 if ($notnull_bool(this.optional('extends', token))) { | 6260 if ($notnull_bool(this.optional('extends', token))) { |
5608 token = this.parseType(this.next(token)); | 6261 token = this.parseType(this.next(token)); |
5609 } | 6262 } |
5610 else { | 6263 else { |
5611 this.listener.handleNoType(token); | 6264 this.listener.handleNoType$1(token); |
5612 } | 6265 } |
5613 this.listener.endTypeVariable(token); | 6266 this.listener.endTypeVariable$1(token); |
5614 return token; | 6267 return token; |
5615 } | 6268 } |
5616 PartialParser.prototype.optional = function(value, token) { | 6269 PartialParser.prototype.optional = function(value, token) { |
5617 return value === token.get$stringValue(); | 6270 return value === token.get$stringValue(); |
5618 } | 6271 } |
5619 PartialParser.prototype.parseType = function(token) { | 6272 PartialParser.prototype.parseType = function(token) { |
5620 if ($notnull_bool(this.isIdentifier(token))) { | 6273 if ($notnull_bool(this.isIdentifier(token))) { |
5621 token = this.parseIdentifier(token); | 6274 token = this.parseIdentifier(token); |
5622 while ($notnull_bool(this.optional('.', token))) { | 6275 while ($notnull_bool(this.optional('.', token))) { |
5623 token = this.parseIdentifier(this.next(token)); | 6276 token = this.parseIdentifier(this.next(token)); |
5624 } | 6277 } |
5625 } | 6278 } |
5626 else if ($notnull_bool(this.optional('var', token))) { | 6279 else if ($notnull_bool(this.optional('var', token))) { |
5627 this.listener.handleVarKeyword(token); | 6280 this.listener.handleVarKeyword$1(token); |
5628 this.listener.endType(token); | 6281 this.listener.endType$1(token); |
5629 return this.next(token); | 6282 return this.next(token); |
5630 } | 6283 } |
5631 else { | 6284 else { |
5632 token = this.listener.expectedType(token); | 6285 token = this.listener.expectedType$1(token); |
5633 } | 6286 } |
5634 token = this.parseTypeArgumentsOpt(token); | 6287 token = this.parseTypeArgumentsOpt(token); |
5635 this.listener.endType(token); | 6288 this.listener.endType$1(token); |
5636 return token; | 6289 return token; |
5637 } | 6290 } |
5638 PartialParser.prototype.parseTypeArgumentsOpt = function(token) { | 6291 PartialParser.prototype.parseTypeArgumentsOpt = function(token) { |
5639 return this.parseStuff(token, this.beginTypeArguments, this.parseTypeFunction,
this.endTypeArguments, this.handleNoTypeArguments); | 6292 return this.parseStuff(token, this.beginTypeArguments, this.parseTypeFunction,
this.endTypeArguments, this.handleNoTypeArguments); |
5640 } | 6293 } |
5641 PartialParser.prototype.parseTypeVariablesOpt = function(token) { | 6294 PartialParser.prototype.parseTypeVariablesOpt = function(token) { |
5642 if ($notnull_bool(this.optional('<', token))) { | 6295 if ($notnull_bool(this.optional('<', token))) { |
5643 var beginGroupToken = (token && token.is$BeginGroupToken()); | 6296 var beginGroupToken = (token && token.is$BeginGroupToken()); |
5644 token = this.next(beginGroupToken.endGroup); | 6297 token = this.next(beginGroupToken.endGroup); |
5645 } | 6298 } |
(...skipping 15 matching lines...) Expand all Loading... |
5661 return this.expect('>', token); | 6314 return this.expect('>', token); |
5662 } | 6315 } |
5663 handleNoStuff.call$1(token); | 6316 handleNoStuff.call$1(token); |
5664 return token; | 6317 return token; |
5665 } | 6318 } |
5666 PartialParser.prototype.parseClassBody = function(token) { | 6319 PartialParser.prototype.parseClassBody = function(token) { |
5667 return this.skipBlock(token); | 6320 return this.skipBlock(token); |
5668 } | 6321 } |
5669 PartialParser.prototype.parseTopLevelMember = function(token) { | 6322 PartialParser.prototype.parseTopLevelMember = function(token) { |
5670 var start = token; | 6323 var start = token; |
5671 this.listener.beginTopLevelMember(token); | 6324 this.listener.beginTopLevelMember$1(token); |
5672 var previous = token; | 6325 var previous = token; |
5673 LOOP: | 6326 LOOP: |
5674 while (token != null) { | 6327 while (token != null) { |
5675 var kind = token.kind; | 6328 var kind = token.kind; |
5676 switch (true) { | 6329 switch (true) { |
5677 case kind === 123/*null.LBRACE_TOKEN*/: | 6330 case kind === 123/*null.LBRACE_TOKEN*/: |
5678 case kind === 59/*null.SEMICOLON_TOKEN*/: | 6331 case kind === 59/*null.SEMICOLON_TOKEN*/: |
5679 case kind === 40/*null.LPAREN_TOKEN*/: | 6332 case kind === 40/*null.LPAREN_TOKEN*/: |
5680 case kind === 61/*null.EQ_TOKEN*/: | 6333 case kind === 61/*null.EQ_TOKEN*/: |
5681 | 6334 |
(...skipping 12 matching lines...) Expand all Loading... |
5694 while (true) { | 6347 while (true) { |
5695 if ($notnull_bool(this.optional('(', token))) { | 6348 if ($notnull_bool(this.optional('(', token))) { |
5696 isField = false; | 6349 isField = false; |
5697 break; | 6350 break; |
5698 } | 6351 } |
5699 else if ($notnull_bool(this.optional('=', token) || this.optional(';', token
))) { | 6352 else if ($notnull_bool(this.optional('=', token) || this.optional(';', token
))) { |
5700 isField = true; | 6353 isField = true; |
5701 break; | 6354 break; |
5702 } | 6355 } |
5703 else { | 6356 else { |
5704 token = this.listener.unexpected(token); | 6357 token = this.listener.unexpected$1(token); |
5705 } | 6358 } |
5706 } | 6359 } |
5707 if (!$notnull_bool(isField)) { | 6360 if (!$notnull_bool(isField)) { |
5708 token = this.next(this.skipArguments((token && token.is$BeginGroupToken())))
; | 6361 token = this.next(this.skipArguments((token && token.is$BeginGroupToken())))
; |
5709 } | 6362 } |
5710 while (token != null && token.kind !== 123/*null.LBRACE_TOKEN*/ && token.kind
!== 59/*null.SEMICOLON_TOKEN*/) { | 6363 while (token != null && token.kind !== 123/*null.LBRACE_TOKEN*/ && token.kind
!== 59/*null.SEMICOLON_TOKEN*/) { |
5711 token = this.next(token); | 6364 token = this.next(token); |
5712 } | 6365 } |
5713 if (!$notnull_bool(this.optional(';', token))) { | 6366 if (!$notnull_bool(this.optional(';', token))) { |
5714 token = this.skipBlock(token); | 6367 token = this.skipBlock(token); |
5715 } | 6368 } |
5716 if ($notnull_bool(isField)) { | 6369 if ($notnull_bool(isField)) { |
5717 this.listener.endTopLevelField(start, token); | 6370 this.listener.endTopLevelField$2(start, token); |
5718 } | 6371 } |
5719 else { | 6372 else { |
5720 this.listener.endTopLevelMethod(start, token); | 6373 this.listener.endTopLevelMethod$2(start, token); |
5721 } | 6374 } |
5722 return token.next; | 6375 return token.next; |
5723 } | 6376 } |
5724 PartialParser.prototype.parseLibraryTags = function(token) { | 6377 PartialParser.prototype.parseLibraryTags = function(token) { |
5725 this.listener.beginLibraryTag(token); | 6378 this.listener.beginLibraryTag$1(token); |
5726 token = this.parseIdentifier(this.next(token)); | 6379 token = this.parseIdentifier(this.next(token)); |
5727 token = this.expect('(', token); | 6380 token = this.expect('(', token); |
5728 while (token != null && token.kind !== 40/*null.LPAREN_TOKEN*/ && token.kind !
== 41/*null.RPAREN_TOKEN*/) { | 6381 while (token != null && token.kind !== 40/*null.LPAREN_TOKEN*/ && token.kind !
== 41/*null.RPAREN_TOKEN*/) { |
5729 token = this.next(token); | 6382 token = this.next(token); |
5730 } | 6383 } |
5731 token = this.expect(')', token); | 6384 token = this.expect(')', token); |
5732 return this.expect(';', token); | 6385 return this.expect(';', token); |
5733 } | 6386 } |
5734 PartialParser.prototype.beginTypeArguments$1 = function($0) { | 6387 PartialParser.prototype.beginTypeArguments$1 = function($0) { |
5735 return this.beginTypeArguments.call$1($0); | 6388 return this.beginTypeArguments.call$1($0); |
5736 } | 6389 }; |
5737 ; | |
5738 PartialParser.prototype.beginTypeVariables$1 = function($0) { | 6390 PartialParser.prototype.beginTypeVariables$1 = function($0) { |
5739 return this.beginTypeVariables.call$1($0); | 6391 return this.beginTypeVariables.call$1($0); |
5740 } | 6392 }; |
5741 ; | |
5742 PartialParser.prototype.endTypeArguments$3 = function($0, $1, $2) { | 6393 PartialParser.prototype.endTypeArguments$3 = function($0, $1, $2) { |
5743 return this.endTypeArguments.call$3($0, $1, $2); | 6394 return this.endTypeArguments.call$3($0, $1, $2); |
5744 } | 6395 }; |
5745 ; | |
5746 PartialParser.prototype.endTypeVariables$3 = function($0, $1, $2) { | 6396 PartialParser.prototype.endTypeVariables$3 = function($0, $1, $2) { |
5747 return this.endTypeVariables.call$3($0, $1, $2); | 6397 return this.endTypeVariables.call$3($0, $1, $2); |
5748 } | 6398 }; |
5749 ; | |
5750 PartialParser.prototype.handleNoTypeArguments$1 = function($0) { | 6399 PartialParser.prototype.handleNoTypeArguments$1 = function($0) { |
5751 return this.handleNoTypeArguments.call$1($0); | 6400 return this.handleNoTypeArguments.call$1($0); |
5752 } | 6401 }; |
5753 ; | |
5754 PartialParser.prototype.handleNoTypeVariables$1 = function($0) { | 6402 PartialParser.prototype.handleNoTypeVariables$1 = function($0) { |
5755 return this.handleNoTypeVariables.call$1($0); | 6403 return this.handleNoTypeVariables.call$1($0); |
5756 } | 6404 }; |
5757 ; | 6405 PartialParser.prototype.parseClass$1 = function($0) { |
| 6406 return this.parseClass(($0 && $0.is$Token())); |
| 6407 }; |
5758 // ********** Code for Parser ************** | 6408 // ********** Code for Parser ************** |
5759 function Parser(listener) { | 6409 function Parser(listener) { |
5760 PartialParser.call(this, listener); | 6410 PartialParser.call(this, listener); |
5761 // Initializers done | 6411 // Initializers done |
5762 } | 6412 } |
5763 $inherits(Parser, PartialParser); | 6413 $inherits(Parser, PartialParser); |
5764 Parser.prototype.parseFunction = function(token) { | 6414 Parser.prototype.parseFunction = function(token) { |
5765 this.listener.beginFunction(token); | 6415 this.listener.beginFunction$1(token); |
5766 token = this.parseReturnTypeOpt(token); | 6416 token = this.parseReturnTypeOpt(token); |
5767 this.listener.beginFunctionName(token); | 6417 this.listener.beginFunctionName$1(token); |
5768 token = this.parseIdentifier(token); | 6418 token = this.parseIdentifier(token); |
5769 this.listener.endFunctionName(token); | 6419 this.listener.endFunctionName$1(token); |
5770 token = this.parseFormalParameters(token); | 6420 token = this.parseFormalParameters(token); |
5771 return this.parseFunctionBody(token); | 6421 return this.parseFunctionBody(token); |
5772 } | 6422 } |
5773 Parser.prototype.parseFunctionBody = function(token) { | 6423 Parser.prototype.parseFunctionBody = function(token) { |
5774 if ($notnull_bool(this.optional(';', token))) { | 6424 if ($notnull_bool(this.optional(';', token))) { |
5775 this.listener.endFunctionBody(0, null, token); | 6425 this.listener.endFunctionBody$3(0, null, token); |
5776 return token.next; | 6426 return token.next; |
5777 } | 6427 } |
5778 var begin = token; | 6428 var begin = token; |
5779 var statementCount = 0; | 6429 var statementCount = 0; |
5780 this.listener.beginFunctionBody(begin); | 6430 this.listener.beginFunctionBody$1(begin); |
5781 token = this.checkEof(this.expect('{', token)); | 6431 token = this.checkEof(this.expect('{', token)); |
5782 while (!$notnull_bool(this.optional('}', token))) { | 6432 while (!$notnull_bool(this.optional('}', token))) { |
5783 token = this.parseStatement(token); | 6433 token = this.parseStatement(token); |
5784 ++statementCount; | 6434 ++statementCount; |
5785 } | 6435 } |
5786 this.listener.endFunctionBody(statementCount, begin, token); | 6436 this.listener.endFunctionBody$3(statementCount, begin, token); |
5787 return this.expect('}', token); | 6437 return this.expect('}', token); |
5788 } | 6438 } |
5789 Parser.prototype.parseStatement = function(token) { | 6439 Parser.prototype.parseStatement = function(token) { |
5790 this.checkEof(token); | 6440 this.checkEof(token); |
5791 var value = token.get$stringValue(); | 6441 var value = token.get$stringValue(); |
5792 switch (true) { | 6442 switch (true) { |
5793 case token.kind === 97/*null.IDENTIFIER_TOKEN*/: | 6443 case token.kind === 97/*null.IDENTIFIER_TOKEN*/: |
5794 | 6444 |
5795 return this.parseExpressionStatementOrDeclaration(token); | 6445 return this.parseExpressionStatementOrDeclaration(token); |
5796 | 6446 |
(...skipping 25 matching lines...) Expand all Loading... |
5822 | 6472 |
5823 return this.parseExpressionStatement(token); | 6473 return this.parseExpressionStatement(token); |
5824 | 6474 |
5825 } | 6475 } |
5826 } | 6476 } |
5827 Parser.prototype.expectSemicolon = function(token) { | 6477 Parser.prototype.expectSemicolon = function(token) { |
5828 return this.expect(';', token); | 6478 return this.expect(';', token); |
5829 } | 6479 } |
5830 Parser.prototype.parseReturnStatement = function(token) { | 6480 Parser.prototype.parseReturnStatement = function(token) { |
5831 var begin = token; | 6481 var begin = token; |
5832 this.listener.beginReturnStatement(begin); | 6482 this.listener.beginReturnStatement$1(begin); |
5833 $assert('return' === token.get$stringValue(), "'return' === token.stringValue"
, "parser.dart", 452, 12); | 6483 $assert('return' === token.get$stringValue(), "'return' === token.stringValue"
, "parser.dart", 452, 12); |
5834 token = this.next(token); | 6484 token = this.next(token); |
5835 if ($notnull_bool(this.optional(';', token))) { | 6485 if ($notnull_bool(this.optional(';', token))) { |
5836 this.listener.endReturnStatement(false, begin, token); | 6486 this.listener.endReturnStatement$3(false, begin, token); |
5837 } | 6487 } |
5838 else { | 6488 else { |
5839 token = this.parseExpression(token); | 6489 token = this.parseExpression(token); |
5840 this.listener.endReturnStatement(true, begin, token); | 6490 this.listener.endReturnStatement$3(true, begin, token); |
5841 } | 6491 } |
5842 return this.expectSemicolon(token); | 6492 return this.expectSemicolon(token); |
5843 } | 6493 } |
5844 Parser.prototype.parseExpressionStatementOrDeclaration = function(token) { | 6494 Parser.prototype.parseExpressionStatementOrDeclaration = function(token) { |
5845 $assert(token.kind === 97/*null.IDENTIFIER_TOKEN*/, "token.kind === IDENTIFIER
_TOKEN", "parser.dart", 464, 12); | 6495 $assert(token.kind === 97/*null.IDENTIFIER_TOKEN*/, "token.kind === IDENTIFIER
_TOKEN", "parser.dart", 464, 12); |
5846 var peek1 = this.next(token); | 6496 var peek1 = this.next(token); |
5847 if (peek1.kind === 97/*null.IDENTIFIER_TOKEN*/) { | 6497 if (peek1.kind === 97/*null.IDENTIFIER_TOKEN*/) { |
5848 return this.parseLocalDeclaration(token, peek1); | 6498 return this.parseLocalDeclaration(token, peek1); |
5849 } | 6499 } |
5850 else if (peek1.kind === 60/*null.LT_TOKEN*/) { | 6500 else if (peek1.kind === 60/*null.LT_TOKEN*/) { |
(...skipping 21 matching lines...) Expand all Loading... |
5872 Parser.prototype.parseLocalDeclaration = function(token, peek1) { | 6522 Parser.prototype.parseLocalDeclaration = function(token, peek1) { |
5873 var peek2 = this.next(peek1); | 6523 var peek2 = this.next(peek1); |
5874 if (peek2.get$stringValue() === '(') { | 6524 if (peek2.get$stringValue() === '(') { |
5875 return this.parseFunction(token); | 6525 return this.parseFunction(token); |
5876 } | 6526 } |
5877 else { | 6527 else { |
5878 return this.parseVariablesDeclaration(token); | 6528 return this.parseVariablesDeclaration(token); |
5879 } | 6529 } |
5880 } | 6530 } |
5881 Parser.prototype.parseExpressionStatement = function(token) { | 6531 Parser.prototype.parseExpressionStatement = function(token) { |
5882 this.listener.beginExpressionStatement(token); | 6532 this.listener.beginExpressionStatement$1(token); |
5883 token = this.parseExpression(token); | 6533 token = this.parseExpression(token); |
5884 this.listener.endExpressionStatement(token); | 6534 this.listener.endExpressionStatement$1(token); |
5885 return this.expectSemicolon(token); | 6535 return this.expectSemicolon(token); |
5886 } | 6536 } |
5887 Parser.prototype.parseExpression = function(token) { | 6537 Parser.prototype.parseExpression = function(token) { |
5888 token = this.parseConditionalExpression(token); | 6538 token = this.parseConditionalExpression(token); |
5889 if ($notnull_bool(this.isAssignmentOperator(token))) { | 6539 if ($notnull_bool(this.isAssignmentOperator(token))) { |
5890 var operator = token; | 6540 var operator = token; |
5891 token = this.parseExpression(this.next(token)); | 6541 token = this.parseExpression(this.next(token)); |
5892 this.listener.handleAssignmentExpression(operator); | 6542 this.listener.handleAssignmentExpression$1(operator); |
5893 } | 6543 } |
5894 return token; | 6544 return token; |
5895 } | 6545 } |
5896 Parser.prototype.isAssignmentOperator = function(token) { | 6546 Parser.prototype.isAssignmentOperator = function(token) { |
5897 return 2 === this.getPrecedence(token); | 6547 return 2 === this.getPrecedence(token); |
5898 } | 6548 } |
5899 Parser.prototype.parseConditionalExpression = function(token) { | 6549 Parser.prototype.parseConditionalExpression = function(token) { |
5900 token = this.parseBinaryExpression(token, 4); | 6550 token = this.parseBinaryExpression(token, 4); |
5901 if ($notnull_bool(this.optional('?', token))) { | 6551 if ($notnull_bool(this.optional('?', token))) { |
5902 var question = token; | 6552 var question = token; |
5903 token = this.parseExpression(this.next(token)); | 6553 token = this.parseExpression(this.next(token)); |
5904 var colon = token; | 6554 var colon = token; |
5905 token = this.expect(':', token); | 6555 token = this.expect(':', token); |
5906 token = this.parseExpression(token); | 6556 token = this.parseExpression(token); |
5907 this.listener.handleConditionalExpression(question, colon); | 6557 this.listener.handleConditionalExpression$2(question, colon); |
5908 } | 6558 } |
5909 return token; | 6559 return token; |
5910 } | 6560 } |
5911 Parser.prototype.parseBinaryExpression = function(token, precedence) { | 6561 Parser.prototype.parseBinaryExpression = function(token, precedence) { |
5912 $assert(precedence >= 4, "precedence >= 4", "parser.dart", 544, 12); | 6562 $assert(precedence >= 4, "precedence >= 4", "parser.dart", 544, 12); |
5913 token = this.parsePrimary(token); | 6563 token = this.parsePrimary(token); |
5914 var tokenLevel = this.getPrecedence(token); | 6564 var tokenLevel = this.getPrecedence(token); |
5915 for (var level = $assert_num(tokenLevel); | 6565 for (var level = $assert_num(tokenLevel); |
5916 level >= precedence; --level) { | 6566 level >= precedence; --level) { |
5917 while (tokenLevel === level) { | 6567 while (tokenLevel === level) { |
5918 var operator = token; | 6568 var operator = token; |
5919 token = this.parseBinaryExpression(this.next(token), level + 1); | 6569 token = this.parseBinaryExpression(this.next(token), level + 1); |
5920 this.listener.handleBinaryExpression(operator); | 6570 this.listener.handleBinaryExpression$1(operator); |
5921 tokenLevel = this.getPrecedence(token); | 6571 tokenLevel = this.getPrecedence(token); |
5922 } | 6572 } |
5923 } | 6573 } |
5924 return token; | 6574 return token; |
5925 } | 6575 } |
5926 Parser.prototype.getPrecedence = function(token) { | 6576 Parser.prototype.getPrecedence = function(token) { |
5927 if (token == null) return 0; | 6577 if (token == null) return 0; |
5928 var value = token.get$stringValue(); | 6578 var value = token.get$stringValue(); |
5929 if (value == null) return 0; | 6579 if (value == null) return 0; |
5930 switch (true) { | 6580 switch (true) { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6118 { | 6768 { |
6119 var value = token.get$stringValue(); | 6769 var value = token.get$stringValue(); |
6120 switch (true) { | 6770 switch (true) { |
6121 case value === 'true': | 6771 case value === 'true': |
6122 case value === 'false': | 6772 case value === 'false': |
6123 | 6773 |
6124 return this.parseLiteralBool(token); | 6774 return this.parseLiteralBool(token); |
6125 | 6775 |
6126 default: | 6776 default: |
6127 | 6777 |
6128 this.listener.unexpected(token); | 6778 this.listener.unexpected$1(token); |
6129 $throw('not yet implemented'); | 6779 $throw('not yet implemented'); |
6130 | 6780 |
6131 } | 6781 } |
6132 } | 6782 } |
6133 $throw(new FallThroughError()); | 6783 $throw(new FallThroughError()); |
6134 | 6784 |
6135 default: | 6785 default: |
6136 | 6786 |
6137 this.listener.unexpected(token); | 6787 this.listener.unexpected$1(token); |
6138 $throw('not yet implemented'); | 6788 $throw('not yet implemented'); |
6139 | 6789 |
6140 } | 6790 } |
6141 } | 6791 } |
6142 Parser.prototype.parseLiteralInt = function(token) { | 6792 Parser.prototype.parseLiteralInt = function(token) { |
6143 this.listener.handleLiteralInt(token); | 6793 this.listener.handleLiteralInt$1(token); |
6144 return token.next; | 6794 return token.next; |
6145 } | 6795 } |
6146 Parser.prototype.parseLiteralDouble = function(token) { | 6796 Parser.prototype.parseLiteralDouble = function(token) { |
6147 this.listener.handleLiteralDouble(token); | 6797 this.listener.handleLiteralDouble$1(token); |
6148 return token.next; | 6798 return token.next; |
6149 } | 6799 } |
6150 Parser.prototype.parseLiteralString = function(token) { | 6800 Parser.prototype.parseLiteralString = function(token) { |
6151 this.listener.handleLiteralString(token); | 6801 this.listener.handleLiteralString$1(token); |
6152 return token.next; | 6802 return token.next; |
6153 } | 6803 } |
6154 Parser.prototype.parseLiteralBool = function(token) { | 6804 Parser.prototype.parseLiteralBool = function(token) { |
6155 this.listener.handleLiteralBool(token); | 6805 this.listener.handleLiteralBool$1(token); |
6156 return token.next; | 6806 return token.next; |
6157 } | 6807 } |
6158 Parser.prototype.parseSend = function(token) { | 6808 Parser.prototype.parseSend = function(token) { |
6159 this.listener.beginSend(token); | 6809 this.listener.beginSend$1(token); |
6160 token = this.parseIdentifier(token); | 6810 token = this.parseIdentifier(token); |
6161 token = this.parseArgumentsOpt(token); | 6811 token = this.parseArgumentsOpt(token); |
6162 this.listener.endSend(token); | 6812 this.listener.endSend$1(token); |
6163 return token; | 6813 return token; |
6164 } | 6814 } |
6165 Parser.prototype.parseArgumentsOpt = function(token) { | 6815 Parser.prototype.parseArgumentsOpt = function(token) { |
6166 if (!$notnull_bool(this.optional('(', token))) { | 6816 if (!$notnull_bool(this.optional('(', token))) { |
6167 this.listener.handleNoArguments(token); | 6817 this.listener.handleNoArguments$1(token); |
6168 return token; | 6818 return token; |
6169 } | 6819 } |
6170 else { | 6820 else { |
6171 return this.parseArguments(token); | 6821 return this.parseArguments(token); |
6172 } | 6822 } |
6173 } | 6823 } |
6174 Parser.prototype.parseArguments = function(token) { | 6824 Parser.prototype.parseArguments = function(token) { |
6175 var begin = token; | 6825 var begin = token; |
6176 this.listener.beginArguments(begin); | 6826 this.listener.beginArguments$1(begin); |
6177 $assert('(' === token.get$stringValue(), "'(' === token.stringValue", "parser.
dart", 677, 12); | 6827 $assert('(' === token.get$stringValue(), "'(' === token.stringValue", "parser.
dart", 677, 12); |
6178 var argumentCount = 0; | 6828 var argumentCount = 0; |
6179 if ($notnull_bool(this.optional(')', token.next))) { | 6829 if ($notnull_bool(this.optional(')', token.next))) { |
6180 this.listener.endArguments(argumentCount, begin, token.next); | 6830 this.listener.endArguments$3(argumentCount, begin, token.next); |
6181 return token.next.next; | 6831 return token.next.next; |
6182 } | 6832 } |
6183 do { | 6833 do { |
6184 token = this.parseExpression(this.next(token)); | 6834 token = this.parseExpression(this.next(token)); |
6185 ++argumentCount; | 6835 ++argumentCount; |
6186 } | 6836 } |
6187 while ($notnull_bool(this.optional(',', token))) | 6837 while ($notnull_bool(this.optional(',', token))) |
6188 this.listener.endArguments(argumentCount, begin, token); | 6838 this.listener.endArguments$3(argumentCount, begin, token); |
6189 return this.expect(')', token); | 6839 return this.expect(')', token); |
6190 } | 6840 } |
6191 Parser.prototype.parseVariablesDeclaration = function(token) { | 6841 Parser.prototype.parseVariablesDeclaration = function(token) { |
6192 var count = 1; | 6842 var count = 1; |
6193 this.listener.beginVariablesDeclaration(token); | 6843 this.listener.beginVariablesDeclaration$1(token); |
6194 token = this.parseFinalVarOrType(token); | 6844 token = this.parseFinalVarOrType(token); |
6195 token = this.parseOptionallyInitializedIdentifier(token); | 6845 token = this.parseOptionallyInitializedIdentifier(token); |
6196 while ($notnull_bool(this.optional(',', token))) { | 6846 while ($notnull_bool(this.optional(',', token))) { |
6197 token = this.parseOptionallyInitializedIdentifier(this.next(token)); | 6847 token = this.parseOptionallyInitializedIdentifier(this.next(token)); |
6198 ++count; | 6848 ++count; |
6199 } | 6849 } |
6200 this.listener.endVariablesDeclaration(count, token); | 6850 this.listener.endVariablesDeclaration$2(count, token); |
6201 return this.expectSemicolon(token); | 6851 return this.expectSemicolon(token); |
6202 } | 6852 } |
6203 Parser.prototype.parseOptionallyInitializedIdentifier = function(token) { | 6853 Parser.prototype.parseOptionallyInitializedIdentifier = function(token) { |
6204 this.listener.beginInitializedIdentifier(token); | 6854 this.listener.beginInitializedIdentifier$1(token); |
6205 token = this.parseIdentifier(token); | 6855 token = this.parseIdentifier(token); |
6206 if ($notnull_bool(this.optional('=', token))) { | 6856 if ($notnull_bool(this.optional('=', token))) { |
6207 var assignment = token; | 6857 var assignment = token; |
6208 this.listener.beginInitializer(token); | 6858 this.listener.beginInitializer$1(token); |
6209 token = this.parseExpression(this.next(token)); | 6859 token = this.parseExpression(this.next(token)); |
6210 this.listener.endInitializer(assignment); | 6860 this.listener.endInitializer$1(assignment); |
6211 } | 6861 } |
6212 this.listener.endInitializedIdentifier(); | 6862 this.listener.endInitializedIdentifier$0(); |
6213 return token; | 6863 return token; |
6214 } | 6864 } |
6215 Parser.prototype.parseFinalVarOrType = function(token) { | 6865 Parser.prototype.parseFinalVarOrType = function(token) { |
6216 var value = token.get$stringValue(); | 6866 var value = token.get$stringValue(); |
6217 switch (true) { | 6867 switch (true) { |
6218 case 'final' === value: | 6868 case 'final' === value: |
6219 | 6869 |
6220 this.listener.handleFinalKeyword(token); | 6870 this.listener.handleFinalKeyword$1(token); |
6221 return this.next(token); | 6871 return this.next(token); |
6222 | 6872 |
6223 default: | 6873 default: |
6224 | 6874 |
6225 return this.parseType(token); | 6875 return this.parseType(token); |
6226 | 6876 |
6227 } | 6877 } |
6228 } | 6878 } |
6229 Parser.prototype.parseIfStatement = function(token) { | 6879 Parser.prototype.parseIfStatement = function(token) { |
6230 var ifToken = token; | 6880 var ifToken = token; |
6231 this.listener.beginIfStatement(ifToken); | 6881 this.listener.beginIfStatement$1(ifToken); |
6232 token = this.expect('if', token); | 6882 token = this.expect('if', token); |
6233 this.expect('(', token); | 6883 this.expect('(', token); |
6234 token = this.parseArguments(token); | 6884 token = this.parseArguments(token); |
6235 token = this.parseStatement(token); | 6885 token = this.parseStatement(token); |
6236 var elseToken = null; | 6886 var elseToken = null; |
6237 if ($notnull_bool(this.optional('else', token))) { | 6887 if ($notnull_bool(this.optional('else', token))) { |
6238 elseToken = token; | 6888 elseToken = token; |
6239 token = this.parseStatement(token.next); | 6889 token = this.parseStatement(token.next); |
6240 } | 6890 } |
6241 this.listener.endIfStatement(ifToken, elseToken); | 6891 this.listener.endIfStatement$2(ifToken, elseToken); |
6242 return token; | 6892 return token; |
6243 } | 6893 } |
6244 Parser.prototype.parseForStatement = function(token) { | 6894 Parser.prototype.parseForStatement = function(token) { |
6245 var forToken = token; | 6895 var forToken = token; |
6246 this.listener.beginForStatement(forToken); | 6896 this.listener.beginForStatement$1(forToken); |
6247 token = this.expect('for', token); | 6897 token = this.expect('for', token); |
6248 token = this.expect('(', token); | 6898 token = this.expect('(', token); |
6249 token = this.parseVariablesDeclaration(token); | 6899 token = this.parseVariablesDeclaration(token); |
6250 token = this.parseExpressionStatement(token); | 6900 token = this.parseExpressionStatement(token); |
6251 token = this.parseExpression(token); | 6901 token = this.parseExpression(token); |
6252 token = this.expect(')', token); | 6902 token = this.expect(')', token); |
6253 token = this.parseStatement(token); | 6903 token = this.parseStatement(token); |
6254 this.listener.endForStatement(forToken, token); | 6904 this.listener.endForStatement$2(forToken, token); |
6255 return token; | 6905 return token; |
6256 } | 6906 } |
6257 Parser.prototype.parseBlock = function(token) { | 6907 Parser.prototype.parseBlock = function(token) { |
6258 var begin = token; | 6908 var begin = token; |
6259 this.listener.beginBlock(begin); | 6909 this.listener.beginBlock$1(begin); |
6260 var statementCount = 0; | 6910 var statementCount = 0; |
6261 token = this.expect('{', token); | 6911 token = this.expect('{', token); |
6262 while (!$notnull_bool(this.optional('}', token))) { | 6912 while (!$notnull_bool(this.optional('}', token))) { |
6263 token = this.parseStatement(token); | 6913 token = this.parseStatement(token); |
6264 ++statementCount; | 6914 ++statementCount; |
6265 } | 6915 } |
6266 this.listener.endBlock(statementCount, begin, token); | 6916 this.listener.endBlock$3(statementCount, begin, token); |
6267 return this.expect('}', token); | 6917 return this.expect('}', token); |
6268 } | 6918 } |
6269 Parser.prototype.parseThrowStatement = function(token) { | 6919 Parser.prototype.parseThrowStatement = function(token) { |
6270 var throwToken = token; | 6920 var throwToken = token; |
6271 this.listener.beginThrowStatement(throwToken); | 6921 this.listener.beginThrowStatement$1(throwToken); |
6272 token = this.expect('throw', token); | 6922 token = this.expect('throw', token); |
6273 if ($notnull_bool(this.optional(';', token))) { | 6923 if ($notnull_bool(this.optional(';', token))) { |
6274 this.listener.endRethrowStatement(throwToken, token); | 6924 this.listener.endRethrowStatement$2(throwToken, token); |
6275 return token.next; | 6925 return token.next; |
6276 } | 6926 } |
6277 else { | 6927 else { |
6278 token = this.parseExpression(token); | 6928 token = this.parseExpression(token); |
6279 this.listener.endThrowStatement(throwToken, token); | 6929 this.listener.endThrowStatement$2(throwToken, token); |
6280 return this.expectSemicolon(token); | 6930 return this.expectSemicolon(token); |
6281 } | 6931 } |
6282 } | 6932 } |
| 6933 Parser.prototype.parseFunction$1 = function($0) { |
| 6934 return this.parseFunction(($0 && $0.is$Token())); |
| 6935 }; |
6283 // ********** Code for ParserTask ************** | 6936 // ********** Code for ParserTask ************** |
6284 function ParserTask(compiler) { | 6937 function ParserTask(compiler) { |
6285 CompilerTask.call(this, compiler); | 6938 CompilerTask.call(this, compiler); |
6286 // Initializers done | 6939 // Initializers done |
6287 } | 6940 } |
6288 $inherits(ParserTask, CompilerTask); | 6941 $inherits(ParserTask, CompilerTask); |
6289 ParserTask.prototype.get$name = function() { | 6942 ParserTask.prototype.get$name = function() { |
6290 return 'Parser'; | 6943 return 'Parser'; |
6291 } | 6944 } |
6292 ParserTask.prototype.parse = function(element) { | 6945 ParserTask.prototype.parse = function(element) { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6499 } | 7152 } |
6500 Listener.prototype.expectedType = function(token) { | 7153 Listener.prototype.expectedType = function(token) { |
6501 $throw(new ParserError(("Expected a type, but got '" + token + "' @ ") + ("" +
token.charOffset + ""))); | 7154 $throw(new ParserError(("Expected a type, but got '" + token + "' @ ") + ("" +
token.charOffset + ""))); |
6502 } | 7155 } |
6503 Listener.prototype.expectedBlock = function(token) { | 7156 Listener.prototype.expectedBlock = function(token) { |
6504 $throw(new ParserError(("Expected a block, but got '" + token + "' @ ") + (""
+ token.charOffset + ""))); | 7157 $throw(new ParserError(("Expected a block, but got '" + token + "' @ ") + (""
+ token.charOffset + ""))); |
6505 } | 7158 } |
6506 Listener.prototype.unexpected = function(token) { | 7159 Listener.prototype.unexpected = function(token) { |
6507 $throw(new ParserError(("Unexpected token '" + token + "' @ " + token.charOffs
et + ""))); | 7160 $throw(new ParserError(("Unexpected token '" + token + "' @ " + token.charOffs
et + ""))); |
6508 } | 7161 } |
| 7162 Listener.prototype.beginArguments$1 = function($0) { |
| 7163 return this.beginArguments(($0 && $0.is$Token())); |
| 7164 }; |
| 7165 Listener.prototype.beginBlock$1 = function($0) { |
| 7166 return this.beginBlock(($0 && $0.is$Token())); |
| 7167 }; |
| 7168 Listener.prototype.beginClass$1 = function($0) { |
| 7169 return this.beginClass(($0 && $0.is$Token())); |
| 7170 }; |
| 7171 Listener.prototype.beginExpressionStatement$1 = function($0) { |
| 7172 return this.beginExpressionStatement(($0 && $0.is$Token())); |
| 7173 }; |
| 7174 Listener.prototype.beginForStatement$1 = function($0) { |
| 7175 return this.beginForStatement(($0 && $0.is$Token())); |
| 7176 }; |
| 7177 Listener.prototype.beginFormalParameter$1 = function($0) { |
| 7178 return this.beginFormalParameter(($0 && $0.is$Token())); |
| 7179 }; |
| 7180 Listener.prototype.beginFormalParameters$1 = function($0) { |
| 7181 return this.beginFormalParameters(($0 && $0.is$Token())); |
| 7182 }; |
| 7183 Listener.prototype.beginFunction$1 = function($0) { |
| 7184 return this.beginFunction(($0 && $0.is$Token())); |
| 7185 }; |
| 7186 Listener.prototype.beginFunctionBody$1 = function($0) { |
| 7187 return this.beginFunctionBody(($0 && $0.is$Token())); |
| 7188 }; |
| 7189 Listener.prototype.beginFunctionName$1 = function($0) { |
| 7190 return this.beginFunctionName(($0 && $0.is$Token())); |
| 7191 }; |
| 7192 Listener.prototype.beginFunctionTypeAlias$1 = function($0) { |
| 7193 return this.beginFunctionTypeAlias(($0 && $0.is$Token())); |
| 7194 }; |
| 7195 Listener.prototype.beginIfStatement$1 = function($0) { |
| 7196 return this.beginIfStatement(($0 && $0.is$Token())); |
| 7197 }; |
| 7198 Listener.prototype.beginInitializedIdentifier$1 = function($0) { |
| 7199 return this.beginInitializedIdentifier(($0 && $0.is$Token())); |
| 7200 }; |
| 7201 Listener.prototype.beginInitializer$1 = function($0) { |
| 7202 return this.beginInitializer(($0 && $0.is$Token())); |
| 7203 }; |
| 7204 Listener.prototype.beginInterface$1 = function($0) { |
| 7205 return this.beginInterface(($0 && $0.is$Token())); |
| 7206 }; |
| 7207 Listener.prototype.beginLibraryTag$1 = function($0) { |
| 7208 return this.beginLibraryTag(($0 && $0.is$Token())); |
| 7209 }; |
| 7210 Listener.prototype.beginReturnStatement$1 = function($0) { |
| 7211 return this.beginReturnStatement(($0 && $0.is$Token())); |
| 7212 }; |
| 7213 Listener.prototype.beginSend$1 = function($0) { |
| 7214 return this.beginSend(($0 && $0.is$Token())); |
| 7215 }; |
| 7216 Listener.prototype.beginThrowStatement$1 = function($0) { |
| 7217 return this.beginThrowStatement(($0 && $0.is$Token())); |
| 7218 }; |
| 7219 Listener.prototype.beginTopLevelMember$1 = function($0) { |
| 7220 return this.beginTopLevelMember(($0 && $0.is$Token())); |
| 7221 }; |
6509 Listener.prototype.beginTypeArguments$1 = function($0) { | 7222 Listener.prototype.beginTypeArguments$1 = function($0) { |
6510 return this.beginTypeArguments(($0 && $0.is$Token())); | 7223 return this.beginTypeArguments(($0 && $0.is$Token())); |
6511 } | 7224 }; |
6512 ; | 7225 Listener.prototype.beginTypeVariable$1 = function($0) { |
| 7226 return this.beginTypeVariable(($0 && $0.is$Token())); |
| 7227 }; |
6513 Listener.prototype.beginTypeVariables$1 = function($0) { | 7228 Listener.prototype.beginTypeVariables$1 = function($0) { |
6514 return this.beginTypeVariables(($0 && $0.is$Token())); | 7229 return this.beginTypeVariables(($0 && $0.is$Token())); |
6515 } | 7230 }; |
6516 ; | 7231 Listener.prototype.beginVariablesDeclaration$1 = function($0) { |
| 7232 return this.beginVariablesDeclaration(($0 && $0.is$Token())); |
| 7233 }; |
| 7234 Listener.prototype.endArguments$3 = function($0, $1, $2) { |
| 7235 return this.endArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$
Token())); |
| 7236 }; |
| 7237 Listener.prototype.endBlock$3 = function($0, $1, $2) { |
| 7238 return this.endBlock($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Toke
n())); |
| 7239 }; |
| 7240 Listener.prototype.endClass$5 = function($0, $1, $2, $3, $4) { |
| 7241 return this.endClass($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Toke
n()), ($3 && $3.is$Token()), ($4 && $4.is$Token())); |
| 7242 }; |
| 7243 Listener.prototype.endExpressionStatement$1 = function($0) { |
| 7244 return this.endExpressionStatement(($0 && $0.is$Token())); |
| 7245 }; |
| 7246 Listener.prototype.endForStatement$2 = function($0, $1) { |
| 7247 return this.endForStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7248 }; |
| 7249 Listener.prototype.endFormalParameter$1 = function($0) { |
| 7250 return this.endFormalParameter(($0 && $0.is$Token())); |
| 7251 }; |
| 7252 Listener.prototype.endFormalParameters$3 = function($0, $1, $2) { |
| 7253 return this.endFormalParameters($assert_num($0), ($1 && $1.is$Token()), ($2 &&
$2.is$Token())); |
| 7254 }; |
| 7255 Listener.prototype.endFunctionBody$3 = function($0, $1, $2) { |
| 7256 return this.endFunctionBody($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.
is$Token())); |
| 7257 }; |
| 7258 Listener.prototype.endFunctionName$1 = function($0) { |
| 7259 return this.endFunctionName(($0 && $0.is$Token())); |
| 7260 }; |
| 7261 Listener.prototype.endFunctionTypeAlias$1 = function($0) { |
| 7262 return this.endFunctionTypeAlias(($0 && $0.is$Token())); |
| 7263 }; |
| 7264 Listener.prototype.endIfStatement$2 = function($0, $1) { |
| 7265 return this.endIfStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7266 }; |
| 7267 Listener.prototype.endInitializedIdentifier$0 = function() { |
| 7268 return this.endInitializedIdentifier(); |
| 7269 }; |
| 7270 Listener.prototype.endInitializer$1 = function($0) { |
| 7271 return this.endInitializer(($0 && $0.is$Token())); |
| 7272 }; |
| 7273 Listener.prototype.endInterface$1 = function($0) { |
| 7274 return this.endInterface(($0 && $0.is$Token())); |
| 7275 }; |
| 7276 Listener.prototype.endRethrowStatement$2 = function($0, $1) { |
| 7277 return this.endRethrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7278 }; |
| 7279 Listener.prototype.endReturnStatement$3 = function($0, $1, $2) { |
| 7280 return this.endReturnStatement($assert_bool($0), ($1 && $1.is$Token()), ($2 &&
$2.is$Token())); |
| 7281 }; |
| 7282 Listener.prototype.endSend$1 = function($0) { |
| 7283 return this.endSend(($0 && $0.is$Token())); |
| 7284 }; |
| 7285 Listener.prototype.endThrowStatement$2 = function($0, $1) { |
| 7286 return this.endThrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7287 }; |
| 7288 Listener.prototype.endTopLevelField$2 = function($0, $1) { |
| 7289 return this.endTopLevelField(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7290 }; |
| 7291 Listener.prototype.endTopLevelMethod$2 = function($0, $1) { |
| 7292 return this.endTopLevelMethod(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7293 }; |
| 7294 Listener.prototype.endType$1 = function($0) { |
| 7295 return this.endType(($0 && $0.is$Token())); |
| 7296 }; |
6517 Listener.prototype.endTypeArguments$3 = function($0, $1, $2) { | 7297 Listener.prototype.endTypeArguments$3 = function($0, $1, $2) { |
6518 return this.endTypeArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2
.is$Token())); | 7298 return this.endTypeArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2
.is$Token())); |
6519 } | 7299 }; |
6520 ; | 7300 Listener.prototype.endTypeVariable$1 = function($0) { |
| 7301 return this.endTypeVariable(($0 && $0.is$Token())); |
| 7302 }; |
6521 Listener.prototype.endTypeVariables$3 = function($0, $1, $2) { | 7303 Listener.prototype.endTypeVariables$3 = function($0, $1, $2) { |
6522 return this.endTypeVariables($assert_num($0), ($1 && $1.is$Token()), ($2 && $2
.is$Token())); | 7304 return this.endTypeVariables($assert_num($0), ($1 && $1.is$Token()), ($2 && $2
.is$Token())); |
6523 } | 7305 }; |
6524 ; | 7306 Listener.prototype.endVariablesDeclaration$2 = function($0, $1) { |
| 7307 return this.endVariablesDeclaration($assert_num($0), ($1 && $1.is$Token())); |
| 7308 }; |
| 7309 Listener.prototype.expected$2 = function($0, $1) { |
| 7310 return this.expected($assert_String($0), ($1 && $1.is$Token())); |
| 7311 }; |
| 7312 Listener.prototype.expectedBlock$1 = function($0) { |
| 7313 return this.expectedBlock(($0 && $0.is$Token())); |
| 7314 }; |
| 7315 Listener.prototype.expectedIdentifier$1 = function($0) { |
| 7316 return this.expectedIdentifier(($0 && $0.is$Token())); |
| 7317 }; |
| 7318 Listener.prototype.expectedType$1 = function($0) { |
| 7319 return this.expectedType(($0 && $0.is$Token())); |
| 7320 }; |
| 7321 Listener.prototype.handleAssignmentExpression$1 = function($0) { |
| 7322 return this.handleAssignmentExpression(($0 && $0.is$Token())); |
| 7323 }; |
| 7324 Listener.prototype.handleBinaryExpression$1 = function($0) { |
| 7325 return this.handleBinaryExpression(($0 && $0.is$Token())); |
| 7326 }; |
| 7327 Listener.prototype.handleConditionalExpression$2 = function($0, $1) { |
| 7328 return this.handleConditionalExpression(($0 && $0.is$Token()), ($1 && $1.is$To
ken())); |
| 7329 }; |
| 7330 Listener.prototype.handleIdentifier$1 = function($0) { |
| 7331 return this.handleIdentifier(($0 && $0.is$Token())); |
| 7332 }; |
| 7333 Listener.prototype.handleLiteralBool$1 = function($0) { |
| 7334 return this.handleLiteralBool(($0 && $0.is$Token())); |
| 7335 }; |
| 7336 Listener.prototype.handleLiteralDouble$1 = function($0) { |
| 7337 return this.handleLiteralDouble(($0 && $0.is$Token())); |
| 7338 }; |
| 7339 Listener.prototype.handleLiteralInt$1 = function($0) { |
| 7340 return this.handleLiteralInt(($0 && $0.is$Token())); |
| 7341 }; |
| 7342 Listener.prototype.handleLiteralString$1 = function($0) { |
| 7343 return this.handleLiteralString(($0 && $0.is$Token())); |
| 7344 }; |
| 7345 Listener.prototype.handleNoArguments$1 = function($0) { |
| 7346 return this.handleNoArguments(($0 && $0.is$Token())); |
| 7347 }; |
| 7348 Listener.prototype.handleNoType$1 = function($0) { |
| 7349 return this.handleNoType(($0 && $0.is$Token())); |
| 7350 }; |
6525 Listener.prototype.handleNoTypeArguments$1 = function($0) { | 7351 Listener.prototype.handleNoTypeArguments$1 = function($0) { |
6526 return this.handleNoTypeArguments(($0 && $0.is$Token())); | 7352 return this.handleNoTypeArguments(($0 && $0.is$Token())); |
6527 } | 7353 }; |
6528 ; | |
6529 Listener.prototype.handleNoTypeVariables$1 = function($0) { | 7354 Listener.prototype.handleNoTypeVariables$1 = function($0) { |
6530 return this.handleNoTypeVariables(($0 && $0.is$Token())); | 7355 return this.handleNoTypeVariables(($0 && $0.is$Token())); |
6531 } | 7356 }; |
6532 ; | 7357 Listener.prototype.handleVarKeyword$1 = function($0) { |
| 7358 return this.handleVarKeyword(($0 && $0.is$Token())); |
| 7359 }; |
| 7360 Listener.prototype.handleVoidKeyword$1 = function($0) { |
| 7361 return this.handleVoidKeyword(($0 && $0.is$Token())); |
| 7362 }; |
| 7363 Listener.prototype.unexpected$1 = function($0) { |
| 7364 return this.unexpected(($0 && $0.is$Token())); |
| 7365 }; |
| 7366 Listener.prototype.unexpectedEof$0 = function() { |
| 7367 return this.unexpectedEof(); |
| 7368 }; |
6533 // ********** Code for ParserError ************** | 7369 // ********** Code for ParserError ************** |
6534 function ParserError(reason) { | 7370 function ParserError(reason) { |
6535 this.reason = reason; | 7371 this.reason = reason; |
6536 // Initializers done | 7372 // Initializers done |
6537 } | 7373 } |
6538 ParserError.prototype.toString = function() { | 7374 ParserError.prototype.toString = function() { |
6539 return this.reason; | 7375 return this.reason; |
6540 } | 7376 } |
| 7377 ParserError.prototype.toString$0 = function() { |
| 7378 return this.toString(); |
| 7379 }; |
6541 // ********** Code for ElementListener ************** | 7380 // ********** Code for ElementListener ************** |
6542 function ElementListener(canceler) { | 7381 function ElementListener(canceler) { |
6543 this.previousIdentifier = null | 7382 this.previousIdentifier = null |
6544 this.nodes = const$16/*const EmptyLink()*/ | 7383 this.nodes = const$18/*const EmptyLink()*/ |
6545 this.topLevelElements = const$16/*const EmptyLink()*/ | 7384 this.topLevelElements = const$18/*const EmptyLink()*/ |
6546 this.canceler = canceler; | 7385 this.canceler = canceler; |
6547 // Initializers done | 7386 // Initializers done |
6548 } | 7387 } |
6549 $inherits(ElementListener, Listener); | 7388 $inherits(ElementListener, Listener); |
6550 ElementListener.prototype.beginLibraryTag = function(token) { | 7389 ElementListener.prototype.beginLibraryTag = function(token) { |
6551 this.canceler.cancel("Cannot handle library tags"); | 7390 this.canceler.cancel("Cannot handle library tags"); |
6552 } | 7391 } |
6553 ElementListener.prototype.endClass = function(interfacesCount, beginToken, exten
dsKeyword, implementsKeyword, endToken) { | 7392 ElementListener.prototype.endClass = function(interfacesCount, beginToken, exten
dsKeyword, implementsKeyword, endToken) { |
6554 var $0; | 7393 var $0; |
6555 for (; interfacesCount > 0; --interfacesCount) { | 7394 for (; interfacesCount > 0; --interfacesCount) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6620 var $0; | 7459 var $0; |
6621 $assert(!$notnull_bool(this.nodes.isEmpty()), "!nodes.isEmpty()", "listener.da
rt", 337, 12); | 7460 $assert(!$notnull_bool(this.nodes.isEmpty()), "!nodes.isEmpty()", "listener.da
rt", 337, 12); |
6622 var node = (($0 = this.nodes.get$head()) && $0.is$Node()); | 7461 var node = (($0 = this.nodes.get$head()) && $0.is$Node()); |
6623 this.nodes = (($0 = this.nodes.get$tail()) && $0.is$Link$Node()); | 7462 this.nodes = (($0 = this.nodes.get$tail()) && $0.is$Link$Node()); |
6624 this.log(("pop " + this.nodes + "")); | 7463 this.log(("pop " + this.nodes + "")); |
6625 return node; | 7464 return node; |
6626 } | 7465 } |
6627 ElementListener.prototype.log = function(message) { | 7466 ElementListener.prototype.log = function(message) { |
6628 | 7467 |
6629 } | 7468 } |
| 7469 ElementListener.prototype.beginLibraryTag$1 = function($0) { |
| 7470 return this.beginLibraryTag(($0 && $0.is$Token())); |
| 7471 }; |
| 7472 ElementListener.prototype.endClass$5 = function($0, $1, $2, $3, $4) { |
| 7473 return this.endClass($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Toke
n()), ($3 && $3.is$Token()), ($4 && $4.is$Token())); |
| 7474 }; |
| 7475 ElementListener.prototype.endFunctionTypeAlias$1 = function($0) { |
| 7476 return this.endFunctionTypeAlias(($0 && $0.is$Token())); |
| 7477 }; |
| 7478 ElementListener.prototype.endInterface$1 = function($0) { |
| 7479 return this.endInterface(($0 && $0.is$Token())); |
| 7480 }; |
| 7481 ElementListener.prototype.endTopLevelField$2 = function($0, $1) { |
| 7482 return this.endTopLevelField(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7483 }; |
| 7484 ElementListener.prototype.endTopLevelMethod$2 = function($0, $1) { |
| 7485 return this.endTopLevelMethod(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7486 }; |
6630 ElementListener.prototype.endTypeArguments$3 = function($0, $1, $2) { | 7487 ElementListener.prototype.endTypeArguments$3 = function($0, $1, $2) { |
6631 return this.endTypeArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2
.is$Token())); | 7488 return this.endTypeArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2
.is$Token())); |
6632 } | 7489 }; |
6633 ; | 7490 ElementListener.prototype.endTypeVariable$1 = function($0) { |
| 7491 return this.endTypeVariable(($0 && $0.is$Token())); |
| 7492 }; |
| 7493 ElementListener.prototype.expected$2 = function($0, $1) { |
| 7494 return this.expected($assert_String($0), ($1 && $1.is$Token())); |
| 7495 }; |
| 7496 ElementListener.prototype.expectedBlock$1 = function($0) { |
| 7497 return this.expectedBlock(($0 && $0.is$Token())); |
| 7498 }; |
| 7499 ElementListener.prototype.expectedIdentifier$1 = function($0) { |
| 7500 return this.expectedIdentifier(($0 && $0.is$Token())); |
| 7501 }; |
| 7502 ElementListener.prototype.expectedType$1 = function($0) { |
| 7503 return this.expectedType(($0 && $0.is$Token())); |
| 7504 }; |
| 7505 ElementListener.prototype.handleIdentifier$1 = function($0) { |
| 7506 return this.handleIdentifier(($0 && $0.is$Token())); |
| 7507 }; |
| 7508 ElementListener.prototype.handleNoType$1 = function($0) { |
| 7509 return this.handleNoType(($0 && $0.is$Token())); |
| 7510 }; |
| 7511 ElementListener.prototype.unexpected$1 = function($0) { |
| 7512 return this.unexpected(($0 && $0.is$Token())); |
| 7513 }; |
| 7514 ElementListener.prototype.unexpectedEof$0 = function() { |
| 7515 return this.unexpectedEof(); |
| 7516 }; |
6634 // ********** Code for NodeListener ************** | 7517 // ********** Code for NodeListener ************** |
6635 function NodeListener(canceler, logger) { | 7518 function NodeListener(canceler, logger) { |
6636 this.logger = logger; | 7519 this.logger = logger; |
6637 ElementListener.call(this, canceler); | 7520 ElementListener.call(this, canceler); |
6638 // Initializers done | 7521 // Initializers done |
6639 this.onError = this.get$handleOnError(); | 7522 this.onError = this.get$handleOnError(); |
6640 } | 7523 } |
6641 $inherits(NodeListener, ElementListener); | 7524 $inherits(NodeListener, ElementListener); |
6642 NodeListener.prototype.endClass = function(interfacesCount, beginToken, extendsK
eyword, implementsKeyword, endToken) { | 7525 NodeListener.prototype.endClass = function(interfacesCount, beginToken, extendsK
eyword, implementsKeyword, endToken) { |
6643 var $0; | 7526 var $0; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6767 NodeListener.prototype.endThrowStatement = function(throwToken, endToken) { | 7650 NodeListener.prototype.endThrowStatement = function(throwToken, endToken) { |
6768 var $0; | 7651 var $0; |
6769 var expression = (($0 = this.popNode()) && $0.is$Expression()); | 7652 var expression = (($0 = this.popNode()) && $0.is$Expression()); |
6770 this.pushNode(new Throw(expression, throwToken, endToken)); | 7653 this.pushNode(new Throw(expression, throwToken, endToken)); |
6771 } | 7654 } |
6772 NodeListener.prototype.endRethrowStatement = function(throwToken, endToken) { | 7655 NodeListener.prototype.endRethrowStatement = function(throwToken, endToken) { |
6773 this.pushNode(new Throw(null, throwToken, endToken)); | 7656 this.pushNode(new Throw(null, throwToken, endToken)); |
6774 } | 7657 } |
6775 NodeListener.prototype.makeNodeList = function(count, beginToken, endToken, deli
miter) { | 7658 NodeListener.prototype.makeNodeList = function(count, beginToken, endToken, deli
miter) { |
6776 var $0; | 7659 var $0; |
6777 var nodes = const$16/*const EmptyLink()*/; | 7660 var nodes = const$18/*const EmptyLink()*/; |
6778 for (; count > 0; --count) { | 7661 for (; count > 0; --count) { |
6779 nodes = (($0 = nodes.prepend(this.popNode())) && $0.is$Link$Node()); | 7662 nodes = (($0 = nodes.prepend(this.popNode())) && $0.is$Link$Node()); |
6780 } | 7663 } |
6781 var sourceDelimiter = (($0 = (delimiter == null) ? null : new StringWrapper(de
limiter)) && $0.is$SourceString()); | 7664 var sourceDelimiter = (($0 = (delimiter == null) ? null : new StringWrapper(de
limiter)) && $0.is$SourceString()); |
6782 return new NodeList(beginToken, nodes, endToken, sourceDelimiter); | 7665 return new NodeList(beginToken, nodes, endToken, sourceDelimiter); |
6783 } | 7666 } |
6784 NodeListener.prototype.log = function(message) { | 7667 NodeListener.prototype.log = function(message) { |
6785 this.logger.log(message); | 7668 this.logger.log(message); |
6786 } | 7669 } |
| 7670 NodeListener.prototype.endArguments$3 = function($0, $1, $2) { |
| 7671 return this.endArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$
Token())); |
| 7672 }; |
| 7673 NodeListener.prototype.endBlock$3 = function($0, $1, $2) { |
| 7674 return this.endBlock($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Toke
n())); |
| 7675 }; |
| 7676 NodeListener.prototype.endClass$5 = function($0, $1, $2, $3, $4) { |
| 7677 return this.endClass($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Toke
n()), ($3 && $3.is$Token()), ($4 && $4.is$Token())); |
| 7678 }; |
| 7679 NodeListener.prototype.endExpressionStatement$1 = function($0) { |
| 7680 return this.endExpressionStatement(($0 && $0.is$Token())); |
| 7681 }; |
| 7682 NodeListener.prototype.endForStatement$2 = function($0, $1) { |
| 7683 return this.endForStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7684 }; |
| 7685 NodeListener.prototype.endFormalParameter$1 = function($0) { |
| 7686 return this.endFormalParameter(($0 && $0.is$Token())); |
| 7687 }; |
| 7688 NodeListener.prototype.endFormalParameters$3 = function($0, $1, $2) { |
| 7689 return this.endFormalParameters($assert_num($0), ($1 && $1.is$Token()), ($2 &&
$2.is$Token())); |
| 7690 }; |
| 7691 NodeListener.prototype.endFunctionBody$3 = function($0, $1, $2) { |
| 7692 return this.endFunctionBody($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.
is$Token())); |
| 7693 }; |
| 7694 NodeListener.prototype.endIfStatement$2 = function($0, $1) { |
| 7695 return this.endIfStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7696 }; |
| 7697 NodeListener.prototype.endInitializer$1 = function($0) { |
| 7698 return this.endInitializer(($0 && $0.is$Token())); |
| 7699 }; |
| 7700 NodeListener.prototype.endRethrowStatement$2 = function($0, $1) { |
| 7701 return this.endRethrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7702 }; |
| 7703 NodeListener.prototype.endReturnStatement$3 = function($0, $1, $2) { |
| 7704 return this.endReturnStatement($assert_bool($0), ($1 && $1.is$Token()), ($2 &&
$2.is$Token())); |
| 7705 }; |
| 7706 NodeListener.prototype.endSend$1 = function($0) { |
| 7707 return this.endSend(($0 && $0.is$Token())); |
| 7708 }; |
| 7709 NodeListener.prototype.endThrowStatement$2 = function($0, $1) { |
| 7710 return this.endThrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
| 7711 }; |
| 7712 NodeListener.prototype.endType$1 = function($0) { |
| 7713 return this.endType(($0 && $0.is$Token())); |
| 7714 }; |
| 7715 NodeListener.prototype.endVariablesDeclaration$2 = function($0, $1) { |
| 7716 return this.endVariablesDeclaration($assert_num($0), ($1 && $1.is$Token())); |
| 7717 }; |
| 7718 NodeListener.prototype.handleAssignmentExpression$1 = function($0) { |
| 7719 return this.handleAssignmentExpression(($0 && $0.is$Token())); |
| 7720 }; |
| 7721 NodeListener.prototype.handleBinaryExpression$1 = function($0) { |
| 7722 return this.handleBinaryExpression(($0 && $0.is$Token())); |
| 7723 }; |
| 7724 NodeListener.prototype.handleConditionalExpression$2 = function($0, $1) { |
| 7725 return this.handleConditionalExpression(($0 && $0.is$Token()), ($1 && $1.is$To
ken())); |
| 7726 }; |
| 7727 NodeListener.prototype.handleFinalKeyword$1 = function($0) { |
| 7728 return this.handleFinalKeyword(($0 && $0.is$Token())); |
| 7729 }; |
| 7730 NodeListener.prototype.handleLiteralBool$1 = function($0) { |
| 7731 return this.handleLiteralBool(($0 && $0.is$Token())); |
| 7732 }; |
| 7733 NodeListener.prototype.handleLiteralDouble$1 = function($0) { |
| 7734 return this.handleLiteralDouble(($0 && $0.is$Token())); |
| 7735 }; |
| 7736 NodeListener.prototype.handleLiteralInt$1 = function($0) { |
| 7737 return this.handleLiteralInt(($0 && $0.is$Token())); |
| 7738 }; |
| 7739 NodeListener.prototype.handleLiteralString$1 = function($0) { |
| 7740 return this.handleLiteralString(($0 && $0.is$Token())); |
| 7741 }; |
| 7742 NodeListener.prototype.handleNoArguments$1 = function($0) { |
| 7743 return this.handleNoArguments(($0 && $0.is$Token())); |
| 7744 }; |
| 7745 NodeListener.prototype.handleVarKeyword$1 = function($0) { |
| 7746 return this.handleVarKeyword(($0 && $0.is$Token())); |
| 7747 }; |
| 7748 NodeListener.prototype.handleVoidKeyword$1 = function($0) { |
| 7749 return this.handleVoidKeyword(($0 && $0.is$Token())); |
| 7750 }; |
6787 // ********** Code for PartialFunctionElement ************** | 7751 // ********** Code for PartialFunctionElement ************** |
6788 function PartialFunctionElement(name, beginToken, endToken) { | 7752 function PartialFunctionElement(name, beginToken, endToken) { |
6789 this.beginToken = beginToken; | 7753 this.beginToken = beginToken; |
6790 this.endToken = endToken; | 7754 this.endToken = endToken; |
6791 FunctionElement.call(this, name); | 7755 FunctionElement.call(this, name); |
6792 // Initializers done | 7756 // Initializers done |
6793 } | 7757 } |
6794 $inherits(PartialFunctionElement, FunctionElement); | 7758 $inherits(PartialFunctionElement, FunctionElement); |
6795 PartialFunctionElement.prototype.parseNode = function(canceler, logger) { | 7759 PartialFunctionElement.prototype.parseNode = function(canceler, logger) { |
6796 var $this = this; // closure support | 7760 var $this = this; // closure support |
6797 var $0; | 7761 var $0; |
6798 if (this.node != null) return this.node; | 7762 if (this.node != null) return this.node; |
6799 this.node = (($0 = parse(canceler, logger, (function (p) { | 7763 this.node = (($0 = parse(canceler, logger, (function (p) { |
6800 return p.parseFunction($this.beginToken); | 7764 return p.parseFunction$1($this.beginToken); |
6801 }) | 7765 }) |
6802 )) && $0.is$FunctionExpression()); | 7766 )) && $0.is$FunctionExpression()); |
6803 return this.node; | 7767 return this.node; |
6804 } | 7768 } |
6805 // ********** Code for PartialClassElement ************** | 7769 // ********** Code for PartialClassElement ************** |
6806 function PartialClassElement(name, beginToken, endToken) { | 7770 function PartialClassElement(name, beginToken, endToken) { |
6807 this.beginToken = beginToken; | 7771 this.beginToken = beginToken; |
6808 this.endToken = endToken; | 7772 this.endToken = endToken; |
6809 ClassElement.call(this, name); | 7773 ClassElement.call(this, name); |
6810 // Initializers done | 7774 // Initializers done |
6811 } | 7775 } |
6812 $inherits(PartialClassElement, ClassElement); | 7776 $inherits(PartialClassElement, ClassElement); |
6813 PartialClassElement.prototype.parseNode = function(canceler, logger) { | 7777 PartialClassElement.prototype.parseNode = function(canceler, logger) { |
6814 var $this = this; // closure support | 7778 var $this = this; // closure support |
6815 var $0; | 7779 var $0; |
6816 if (this.node != null) return this.node; | 7780 if (this.node != null) return this.node; |
6817 this.node = (($0 = parse(canceler, logger, (function (p) { | 7781 this.node = (($0 = parse(canceler, logger, (function (p) { |
6818 return p.parseClass($this.beginToken); | 7782 return p.parseClass$1($this.beginToken); |
6819 }) | 7783 }) |
6820 )) && $0.is$ClassNode()); | 7784 )) && $0.is$ClassNode()); |
6821 return this.node; | 7785 return this.node; |
6822 } | 7786 } |
6823 // ********** Code for StringScanner ************** | 7787 // ********** Code for StringScanner ************** |
6824 function StringScanner(string) { | 7788 function StringScanner(string) { |
6825 this.string = string; | 7789 this.string = string; |
6826 ArrayBasedScanner$SourceString.call(this); | 7790 ArrayBasedScanner$SourceString.call(this); |
6827 // Initializers done | 7791 // Initializers done |
6828 } | 7792 } |
(...skipping 22 matching lines...) Expand all Loading... |
6851 this.internalString = internalString; | 7815 this.internalString = internalString; |
6852 this.begin = begin; | 7816 this.begin = begin; |
6853 this.end = end; | 7817 this.end = end; |
6854 // Initializers done | 7818 // Initializers done |
6855 } | 7819 } |
6856 SubstringWrapper.prototype.is$SourceString = function(){return this;}; | 7820 SubstringWrapper.prototype.is$SourceString = function(){return this;}; |
6857 SubstringWrapper.prototype.hashCode = function() { | 7821 SubstringWrapper.prototype.hashCode = function() { |
6858 return this.toString().hashCode(); | 7822 return this.toString().hashCode(); |
6859 } | 7823 } |
6860 SubstringWrapper.prototype.$eq = function(other) { | 7824 SubstringWrapper.prototype.$eq = function(other) { |
6861 return !!(other && other.is$SourceString) && this.toString() == other.toString
(); | 7825 return !!(other && other.is$SourceString) && this.toString() == other.toString
$0(); |
6862 } | 7826 } |
6863 SubstringWrapper.prototype.printOn = function(sb) { | 7827 SubstringWrapper.prototype.printOn = function(sb) { |
6864 sb.add(this); | 7828 sb.add(this); |
6865 } | 7829 } |
6866 SubstringWrapper.prototype.toString = function() { | 7830 SubstringWrapper.prototype.toString = function() { |
6867 return this.internalString.substring(this.begin, this.end); | 7831 return this.internalString.substring(this.begin, this.end); |
6868 } | 7832 } |
6869 SubstringWrapper.prototype.get$stringValue = function() { | 7833 SubstringWrapper.prototype.get$stringValue = function() { |
6870 return null; | 7834 return null; |
6871 } | 7835 } |
| 7836 SubstringWrapper.prototype.hashCode$0 = function() { |
| 7837 return this.hashCode(); |
| 7838 }; |
| 7839 SubstringWrapper.prototype.printOn$1 = function($0) { |
| 7840 return this.printOn(($0 && $0.is$StringBuffer())); |
| 7841 }; |
| 7842 SubstringWrapper.prototype.toString$0 = function() { |
| 7843 return this.toString(); |
| 7844 }; |
6872 // ********** Code for Token ************** | 7845 // ********** Code for Token ************** |
6873 function Token(kind, charOffset) { | 7846 function Token(kind, charOffset) { |
6874 this.kind = kind; | 7847 this.kind = kind; |
6875 this.charOffset = charOffset; | 7848 this.charOffset = charOffset; |
6876 // Initializers done | 7849 // Initializers done |
6877 } | 7850 } |
6878 Token.prototype.is$Token = function(){return this;}; | 7851 Token.prototype.is$Token = function(){return this;}; |
6879 Token.prototype.get$charOffset = function() { return this.charOffset; }; | 7852 Token.prototype.get$charOffset = function() { return this.charOffset; }; |
6880 Token.prototype.get$value = function() { | 7853 Token.prototype.get$value = function() { |
6881 return const$236/*const SourceString('EOF')*/; | 7854 return const$238/*const SourceString('EOF')*/; |
6882 } | 7855 } |
6883 Token.prototype.get$stringValue = function() { | 7856 Token.prototype.get$stringValue = function() { |
6884 return 'EOF'; | 7857 return 'EOF'; |
6885 } | 7858 } |
6886 Token.prototype.toString = function() { | 7859 Token.prototype.toString = function() { |
6887 return Strings.String$fromCharCodes$factory([this.kind]); | 7860 return Strings.String$fromCharCodes$factory([this.kind]); |
6888 } | 7861 } |
| 7862 Token.prototype.next$0 = function() { |
| 7863 return this.next(); |
| 7864 }; |
| 7865 Token.prototype.toString$0 = function() { |
| 7866 return this.toString(); |
| 7867 }; |
6889 // ********** Code for KeywordToken ************** | 7868 // ********** Code for KeywordToken ************** |
6890 function KeywordToken(value, charOffset) { | 7869 function KeywordToken(value, charOffset) { |
6891 this.value = value; | 7870 this.value = value; |
6892 Token.call(this, 107/*null.KEYWORD_TOKEN*/, charOffset); | 7871 Token.call(this, 107/*null.KEYWORD_TOKEN*/, charOffset); |
6893 // Initializers done | 7872 // Initializers done |
6894 } | 7873 } |
6895 $inherits(KeywordToken, Token); | 7874 $inherits(KeywordToken, Token); |
6896 KeywordToken.prototype.get$value = function() { return this.value; }; | 7875 KeywordToken.prototype.get$value = function() { return this.value; }; |
6897 KeywordToken.prototype.get$stringValue = function() { | 7876 KeywordToken.prototype.get$stringValue = function() { |
6898 return this.value.syntax; | 7877 return this.value.syntax; |
6899 } | 7878 } |
6900 KeywordToken.prototype.toString = function() { | 7879 KeywordToken.prototype.toString = function() { |
6901 return this.value.syntax; | 7880 return this.value.syntax; |
6902 } | 7881 } |
| 7882 KeywordToken.prototype.toString$0 = function() { |
| 7883 return this.toString(); |
| 7884 }; |
6903 // ********** Code for StringToken ************** | 7885 // ********** Code for StringToken ************** |
6904 function StringToken(kind, value, charOffset) { | 7886 function StringToken(kind, value, charOffset) { |
6905 StringToken.fromSource$ctor.call(this, kind, new StringWrapper(value), charOff
set); | 7887 StringToken.fromSource$ctor.call(this, kind, new StringWrapper(value), charOff
set); |
6906 // Initializers done | 7888 // Initializers done |
6907 } | 7889 } |
6908 StringToken.fromSource$ctor = function(kind, value, charOffset) { | 7890 StringToken.fromSource$ctor = function(kind, value, charOffset) { |
6909 this.value = value; | 7891 this.value = value; |
6910 Token.call(this, kind, charOffset); | 7892 Token.call(this, kind, charOffset); |
6911 // Initializers done | 7893 // Initializers done |
6912 } | 7894 } |
6913 StringToken.fromSource$ctor.prototype = StringToken.prototype; | 7895 StringToken.fromSource$ctor.prototype = StringToken.prototype; |
6914 $inherits(StringToken, Token); | 7896 $inherits(StringToken, Token); |
6915 StringToken.prototype.get$value = function() { return this.value; }; | 7897 StringToken.prototype.get$value = function() { return this.value; }; |
6916 StringToken.prototype.get$stringValue = function() { | 7898 StringToken.prototype.get$stringValue = function() { |
6917 return this.value.get$stringValue(); | 7899 return this.value.get$stringValue(); |
6918 } | 7900 } |
6919 StringToken.prototype.toString = function() { | 7901 StringToken.prototype.toString = function() { |
6920 return this.value.toString(); | 7902 return this.value.toString(); |
6921 } | 7903 } |
| 7904 StringToken.prototype.toString$0 = function() { |
| 7905 return this.toString(); |
| 7906 }; |
6922 // ********** Code for StringWrapper ************** | 7907 // ********** Code for StringWrapper ************** |
6923 function StringWrapper(internalString) { | 7908 function StringWrapper(internalString) { |
6924 this.internalString = internalString; | 7909 this.internalString = internalString; |
6925 // Initializers done | 7910 // Initializers done |
6926 } | 7911 } |
6927 StringWrapper.prototype.is$SourceString = function(){return this;}; | 7912 StringWrapper.prototype.is$SourceString = function(){return this;}; |
6928 StringWrapper.prototype.hashCode = function() { | 7913 StringWrapper.prototype.hashCode = function() { |
6929 return this.toString().hashCode(); | 7914 return this.toString().hashCode(); |
6930 } | 7915 } |
6931 StringWrapper.prototype.$eq = function(other) { | 7916 StringWrapper.prototype.$eq = function(other) { |
6932 return !!(other && other.is$SourceString) && this.toString() == other.toString
(); | 7917 return !!(other && other.is$SourceString) && this.toString() == other.toString
$0(); |
6933 } | 7918 } |
6934 StringWrapper.prototype.printOn = function(sb) { | 7919 StringWrapper.prototype.printOn = function(sb) { |
6935 sb.add(this.internalString); | 7920 sb.add(this.internalString); |
6936 } | 7921 } |
6937 StringWrapper.prototype.toString = function() { | 7922 StringWrapper.prototype.toString = function() { |
6938 return this.internalString; | 7923 return this.internalString; |
6939 } | 7924 } |
6940 StringWrapper.prototype.get$stringValue = function() { | 7925 StringWrapper.prototype.get$stringValue = function() { |
6941 return this.internalString; | 7926 return this.internalString; |
6942 } | 7927 } |
| 7928 StringWrapper.prototype.hashCode$0 = function() { |
| 7929 return this.hashCode(); |
| 7930 }; |
| 7931 StringWrapper.prototype.printOn$1 = function($0) { |
| 7932 return this.printOn(($0 && $0.is$StringBuffer())); |
| 7933 }; |
| 7934 StringWrapper.prototype.toString$0 = function() { |
| 7935 return this.toString(); |
| 7936 }; |
6943 // ********** Code for BeginGroupToken ************** | 7937 // ********** Code for BeginGroupToken ************** |
6944 function BeginGroupToken(kind, value, charOffset) { | 7938 function BeginGroupToken(kind, value, charOffset) { |
6945 StringToken.call(this, kind, value, charOffset); | 7939 StringToken.call(this, kind, value, charOffset); |
6946 // Initializers done | 7940 // Initializers done |
6947 } | 7941 } |
6948 $inherits(BeginGroupToken, StringToken); | 7942 $inherits(BeginGroupToken, StringToken); |
6949 BeginGroupToken.prototype.is$BeginGroupToken = function(){return this;}; | 7943 BeginGroupToken.prototype.is$BeginGroupToken = function(){return this;}; |
6950 // ********** Code for Keyword ************** | 7944 // ********** Code for Keyword ************** |
6951 function Keyword(syntax, isPseudo) { | 7945 function Keyword(syntax, isPseudo) { |
6952 this.syntax = syntax; | 7946 this.syntax = syntax; |
6953 this.isPseudo = isPseudo; | 7947 this.isPseudo = isPseudo; |
6954 // Initializers done | 7948 // Initializers done |
6955 } | 7949 } |
6956 Keyword.prototype.is$SourceString = function(){return this;}; | 7950 Keyword.prototype.is$SourceString = function(){return this;}; |
6957 Keyword.get$keywords = function() { | 7951 Keyword.get$keywords = function() { |
6958 if (Keyword._keywords == null) { | 7952 if (Keyword._keywords == null) { |
6959 Keyword._keywords = Keyword.computeKeywordMap(); | 7953 Keyword._keywords = Keyword.computeKeywordMap(); |
6960 } | 7954 } |
6961 return Keyword._keywords; | 7955 return Keyword._keywords; |
6962 } | 7956 } |
6963 Keyword.computeKeywordMap = function() { | 7957 Keyword.computeKeywordMap = function() { |
6964 var result = new LinkedHashMapImplementation$String$Keyword(); | 7958 var result = new LinkedHashMapImplementation$String$Keyword(); |
6965 for (var $i0 = const$234/*Keyword.values*/.iterator(); $i0.hasNext(); ) { | 7959 for (var $i0 = const$236/*Keyword.values*/.iterator(); $i0.hasNext(); ) { |
6966 var keyword = $i0.next(); | 7960 var keyword = $i0.next(); |
6967 result.$setindex(keyword.syntax, keyword); | 7961 result.$setindex(keyword.syntax, keyword); |
6968 } | 7962 } |
6969 return result; | 7963 return result; |
6970 } | 7964 } |
6971 Keyword.prototype.hashCode = function() { | 7965 Keyword.prototype.hashCode = function() { |
6972 return this.syntax.hashCode(); | 7966 return this.syntax.hashCode(); |
6973 } | 7967 } |
6974 Keyword.prototype.$eq = function(other) { | 7968 Keyword.prototype.$eq = function(other) { |
6975 return !!(other && other.is$SourceString) && this.toString() == other.toString
(); | 7969 return !!(other && other.is$SourceString) && this.toString() == other.toString
$0(); |
6976 } | 7970 } |
6977 Keyword.prototype.printOn = function(sb) { | 7971 Keyword.prototype.printOn = function(sb) { |
6978 sb.add(this.syntax); | 7972 sb.add(this.syntax); |
6979 } | 7973 } |
6980 Keyword.prototype.toString = function() { | 7974 Keyword.prototype.toString = function() { |
6981 return this.syntax; | 7975 return this.syntax; |
6982 } | 7976 } |
6983 Keyword.prototype.get$stringValue = function() { | 7977 Keyword.prototype.get$stringValue = function() { |
6984 return this.syntax; | 7978 return this.syntax; |
6985 } | 7979 } |
| 7980 Keyword.prototype.hashCode$0 = function() { |
| 7981 return this.hashCode(); |
| 7982 }; |
| 7983 Keyword.prototype.printOn$1 = function($0) { |
| 7984 return this.printOn(($0 && $0.is$StringBuffer())); |
| 7985 }; |
| 7986 Keyword.prototype.toString$0 = function() { |
| 7987 return this.toString(); |
| 7988 }; |
6986 // ********** Code for KeywordState ************** | 7989 // ********** Code for KeywordState ************** |
6987 function KeywordState() {} | 7990 function KeywordState() {} |
6988 KeywordState.prototype.is$KeywordState = function(){return this;}; | 7991 KeywordState.prototype.is$KeywordState = function(){return this;}; |
6989 KeywordState.get$KEYWORD_STATE = function() { | 7992 KeywordState.get$KEYWORD_STATE = function() { |
6990 if (KeywordState._KEYWORD_STATE == null) { | 7993 if (KeywordState._KEYWORD_STATE == null) { |
6991 var strings = new ListFactory$String(const$234/*Keyword.values*/.get$length(
)); | 7994 var strings = new ListFactory$String(const$236/*Keyword.values*/.get$length(
)); |
6992 for (var i = 0; | 7995 for (var i = 0; |
6993 i < const$234/*Keyword.values*/.get$length(); i++) { | 7996 i < const$236/*Keyword.values*/.get$length(); i++) { |
6994 strings.$setindex(i, const$234/*Keyword.values*/[i].syntax); | 7997 strings.$setindex(i, const$236/*Keyword.values*/[i].syntax); |
6995 } | 7998 } |
6996 strings.sort((function (a, b) { | 7999 strings.sort((function (a, b) { |
6997 return a.compareTo(b); | 8000 return a.compareTo$1(b); |
6998 }) | 8001 }) |
6999 ); | 8002 ); |
7000 KeywordState._KEYWORD_STATE = KeywordState.computeKeywordStateTable(0, strin
gs, 0, strings.length); | 8003 KeywordState._KEYWORD_STATE = KeywordState.computeKeywordStateTable(0, strin
gs, 0, strings.length); |
7001 } | 8004 } |
7002 return KeywordState._KEYWORD_STATE; | 8005 return KeywordState._KEYWORD_STATE; |
7003 } | 8006 } |
7004 KeywordState.computeKeywordStateTable = function(start, strings, offset, length)
{ | 8007 KeywordState.computeKeywordStateTable = function(start, strings, offset, length)
{ |
7005 var result = new ListFactory$KeywordState(26); | 8008 var result = new ListFactory$KeywordState(26); |
7006 $assert(length != 0, "length != 0", "keyword.dart", 161, 12); | 8009 $assert(length != 0, "length != 0", "keyword.dart", 161, 12); |
7007 var chunk = 0; | 8010 var chunk = 0; |
7008 var chunkStart = -1; | 8011 var chunkStart = -1; |
7009 for (var i = offset; | 8012 for (var i = offset; |
7010 i < offset + length; i++) { | 8013 i < offset + length; i++) { |
7011 if (strings.$index(i).length > start) { | 8014 if (strings.$index(i).length > start) { |
7012 var c = strings.$index(i).charCodeAt(start); | 8015 var c = strings.$index(i).charCodeAt$1(start); |
7013 if (chunk != c) { | 8016 if (chunk != c) { |
7014 if (chunkStart != -1) { | 8017 if (chunkStart != -1) { |
7015 result.$setindex(chunk - 97/*null.$a*/, KeywordState.computeKeywordSta
teTable(start + 1, strings, chunkStart, i - chunkStart)); | 8018 result.$setindex(chunk - 97/*null.$a*/, KeywordState.computeKeywordSta
teTable(start + 1, strings, chunkStart, i - chunkStart)); |
7016 } | 8019 } |
7017 chunkStart = i; | 8020 chunkStart = i; |
7018 chunk = c; | 8021 chunk = c; |
7019 } | 8022 } |
7020 } | 8023 } |
7021 } | 8024 } |
7022 if (chunkStart != -1) { | 8025 if (chunkStart != -1) { |
(...skipping 27 matching lines...) Expand all Loading... |
7050 var foo = this.table; | 8053 var foo = this.table; |
7051 for (var i = 0; | 8054 for (var i = 0; |
7052 i < foo.length; i++) { | 8055 i < foo.length; i++) { |
7053 if ($notnull_bool($ne(foo.$index(i), null))) { | 8056 if ($notnull_bool($ne(foo.$index(i), null))) { |
7054 sb.add(("" + (i + 97/*null.$a*/) + ": " + foo.$index(i) + "; ")); | 8057 sb.add(("" + (i + 97/*null.$a*/) + ": " + foo.$index(i) + "; ")); |
7055 } | 8058 } |
7056 } | 8059 } |
7057 sb.add("]"); | 8060 sb.add("]"); |
7058 return sb.toString(); | 8061 return sb.toString(); |
7059 } | 8062 } |
| 8063 ArrayKeywordState.prototype.toString$0 = function() { |
| 8064 return this.toString(); |
| 8065 }; |
7060 // ********** Code for LeafKeywordState ************** | 8066 // ********** Code for LeafKeywordState ************** |
7061 function LeafKeywordState(syntax) { | 8067 function LeafKeywordState(syntax) { |
7062 this.keyword = Keyword.get$keywords().$index(syntax); | 8068 this.keyword = Keyword.get$keywords().$index(syntax); |
7063 // Initializers done | 8069 // Initializers done |
7064 } | 8070 } |
7065 $inherits(LeafKeywordState, KeywordState); | 8071 $inherits(LeafKeywordState, KeywordState); |
7066 LeafKeywordState.prototype.get$keyword = function() { return this.keyword; }; | 8072 LeafKeywordState.prototype.get$keyword = function() { return this.keyword; }; |
7067 LeafKeywordState.prototype.set$keyword = function(value) { return this.keyword =
value; }; | 8073 LeafKeywordState.prototype.set$keyword = function(value) { return this.keyword =
value; }; |
7068 LeafKeywordState.prototype.isLeaf = function() { | 8074 LeafKeywordState.prototype.isLeaf = function() { |
7069 return true; | 8075 return true; |
7070 } | 8076 } |
7071 LeafKeywordState.prototype.next = function(c) { | 8077 LeafKeywordState.prototype.next = function(c) { |
7072 return null; | 8078 return null; |
7073 } | 8079 } |
7074 LeafKeywordState.prototype.toString = function() { | 8080 LeafKeywordState.prototype.toString = function() { |
7075 return this.keyword.syntax; | 8081 return this.keyword.syntax; |
7076 } | 8082 } |
| 8083 LeafKeywordState.prototype.toString$0 = function() { |
| 8084 return this.toString(); |
| 8085 }; |
7077 // ********** Code for top level ************** | 8086 // ********** Code for top level ************** |
7078 function parse(canceler, logger, doParse) { | 8087 function parse(canceler, logger, doParse) { |
7079 var listener = new NodeListener(canceler, logger); | 8088 var listener = new NodeListener(canceler, logger); |
7080 doParse(new Parser(listener)); | 8089 doParse(new Parser(listener)); |
7081 var node = listener.popNode(); | 8090 var node = listener.popNode(); |
7082 logger.log(("parsed: " + node + "")); | 8091 logger.log(("parsed: " + node + "")); |
7083 return node; | 8092 return node; |
7084 } | 8093 } |
7085 // ********** Library tree ************** | 8094 // ********** Library tree ************** |
7086 // ********** Code for Node ************** | 8095 // ********** Code for Node ************** |
(...skipping 10 matching lines...) Expand all Loading... |
7097 } | 8106 } |
7098 Node.prototype.unparse = function() { | 8107 Node.prototype.unparse = function() { |
7099 var unparser = new Unparser(false); | 8108 var unparser = new Unparser(false); |
7100 try { | 8109 try { |
7101 return unparser.unparse(this); | 8110 return unparser.unparse(this); |
7102 } catch (e) { | 8111 } catch (e) { |
7103 e = $toDartException(e); | 8112 e = $toDartException(e); |
7104 return ('<<unparse error: ' + this.getObjectDescription() + ': ' + unparser.
sb + '>>'); | 8113 return ('<<unparse error: ' + this.getObjectDescription() + ': ' + unparser.
sb + '>>'); |
7105 } | 8114 } |
7106 } | 8115 } |
| 8116 Node.prototype.accept$1 = function($0) { |
| 8117 return this.accept(($0 && $0.is$Visitor())); |
| 8118 }; |
| 8119 Node.prototype.getBeginToken$0 = function() { |
| 8120 return this.getBeginToken(); |
| 8121 }; |
| 8122 Node.prototype.getEndToken$0 = function() { |
| 8123 return this.getEndToken(); |
| 8124 }; |
| 8125 Node.prototype.hashCode$0 = function() { |
| 8126 return this.hashCode(); |
| 8127 }; |
| 8128 Node.prototype.toString$0 = function() { |
| 8129 return this.toString(); |
| 8130 }; |
7107 // ********** Code for ClassNode ************** | 8131 // ********** Code for ClassNode ************** |
7108 function ClassNode(name, superclass, interfaces, beginToken, extendsKeyword, end
Token) { | 8132 function ClassNode(name, superclass, interfaces, beginToken, extendsKeyword, end
Token) { |
7109 this.name = name; | 8133 this.name = name; |
7110 this.superclass = superclass; | 8134 this.superclass = superclass; |
7111 this.interfaces = interfaces; | 8135 this.interfaces = interfaces; |
7112 this.beginToken = beginToken; | 8136 this.beginToken = beginToken; |
7113 this.extendsKeyword = extendsKeyword; | 8137 this.extendsKeyword = extendsKeyword; |
7114 this.endToken = endToken; | 8138 this.endToken = endToken; |
7115 // Initializers done | 8139 // Initializers done |
7116 } | 8140 } |
7117 $inherits(ClassNode, Node); | 8141 $inherits(ClassNode, Node); |
7118 ClassNode.prototype.is$ClassNode = function(){return this;}; | 8142 ClassNode.prototype.is$ClassNode = function(){return this;}; |
7119 ClassNode.prototype.get$name = function() { return this.name; }; | 8143 ClassNode.prototype.get$name = function() { return this.name; }; |
7120 ClassNode.prototype.get$interfaces = function() { return this.interfaces; }; | 8144 ClassNode.prototype.get$interfaces = function() { return this.interfaces; }; |
7121 ClassNode.prototype.accept = function(visitor) { | 8145 ClassNode.prototype.accept = function(visitor) { |
7122 return visitor.visitClassNode(this); | 8146 return visitor.visitClassNode(this); |
7123 } | 8147 } |
7124 ClassNode.prototype.get$isInterface = function() { | 8148 ClassNode.prototype.get$isInterface = function() { |
7125 return this.beginToken.get$stringValue() === 'interface'; | 8149 return this.beginToken.get$stringValue() === 'interface'; |
7126 } | 8150 } |
7127 ClassNode.prototype.get$isClass = function() { | 8151 ClassNode.prototype.get$isClass = function() { |
7128 return !$notnull_bool(this.get$isInterface()); | 8152 return !$notnull_bool(this.get$isInterface()); |
7129 } | 8153 } |
7130 ClassNode.prototype.getBeginToken = function() { | 8154 ClassNode.prototype.getBeginToken = function() { |
7131 return this.beginToken; | 8155 return this.beginToken; |
7132 } | 8156 } |
7133 ClassNode.prototype.getEndToken = function() { | 8157 ClassNode.prototype.getEndToken = function() { |
7134 return this.endToken; | 8158 return this.endToken; |
7135 } | 8159 } |
| 8160 ClassNode.prototype.accept$1 = function($0) { |
| 8161 return this.accept(($0 && $0.is$Visitor())); |
| 8162 }; |
| 8163 ClassNode.prototype.getBeginToken$0 = function() { |
| 8164 return this.getBeginToken(); |
| 8165 }; |
| 8166 ClassNode.prototype.getEndToken$0 = function() { |
| 8167 return this.getEndToken(); |
| 8168 }; |
7136 // ********** Code for Expression ************** | 8169 // ********** Code for Expression ************** |
7137 function Expression() {} | 8170 function Expression() {} |
7138 $inherits(Expression, Node); | 8171 $inherits(Expression, Node); |
7139 Expression.prototype.is$Expression = function(){return this;}; | 8172 Expression.prototype.is$Expression = function(){return this;}; |
7140 // ********** Code for Statement ************** | 8173 // ********** Code for Statement ************** |
7141 function Statement() {} | 8174 function Statement() {} |
7142 $inherits(Statement, Node); | 8175 $inherits(Statement, Node); |
7143 Statement.prototype.is$Statement = function(){return this;}; | 8176 Statement.prototype.is$Statement = function(){return this;}; |
7144 // ********** Code for Send ************** | 8177 // ********** Code for Send ************** |
7145 function Send(receiver, selector, argumentsNode) { | 8178 function Send(receiver, selector, argumentsNode) { |
7146 this.receiver = receiver; | 8179 this.receiver = receiver; |
7147 this.selector = selector; | 8180 this.selector = selector; |
7148 this.argumentsNode = argumentsNode; | 8181 this.argumentsNode = argumentsNode; |
7149 // Initializers done | 8182 // Initializers done |
7150 } | 8183 } |
7151 $inherits(Send, Expression); | 8184 $inherits(Send, Expression); |
7152 Send.prototype.is$Send = function(){return this;}; | 8185 Send.prototype.is$Send = function(){return this;}; |
7153 Send.prototype.get$arguments = function() { | 8186 Send.prototype.get$arguments = function() { |
7154 return this.argumentsNode.nodes; | 8187 return this.argumentsNode.nodes; |
7155 } | 8188 } |
7156 Send.prototype.accept = function(visitor) { | 8189 Send.prototype.accept = function(visitor) { |
7157 return visitor.visitSend(this); | 8190 return visitor.visitSend(this); |
7158 } | 8191 } |
| 8192 Send.prototype.get$isOperator = function() { |
| 8193 return (this.selector instanceof Operator); |
| 8194 } |
7159 Send.prototype.get$isPropertyAccess = function() { | 8195 Send.prototype.get$isPropertyAccess = function() { |
7160 return this.argumentsNode == null; | 8196 return this.argumentsNode == null; |
7161 } | 8197 } |
7162 Send.prototype.get$isFunctionObjectInvocation = function() { | 8198 Send.prototype.get$isFunctionObjectInvocation = function() { |
7163 return this.selector == null; | 8199 return this.selector == null; |
7164 } | 8200 } |
7165 Send.prototype.getBeginToken = function() { | 8201 Send.prototype.getBeginToken = function() { |
7166 return firstBeginToken(this.receiver, this.selector); | 8202 return firstBeginToken(this.receiver, this.selector); |
7167 } | 8203 } |
7168 Send.prototype.getEndToken = function() { | 8204 Send.prototype.getEndToken = function() { |
7169 var $0; | 8205 var $0; |
7170 var token; | 8206 var token; |
7171 if (this.argumentsNode != null) token = this.argumentsNode.getEndToken(); | 8207 if (this.argumentsNode != null) token = this.argumentsNode.getEndToken(); |
7172 if (token != null) return token; | 8208 if (token != null) return token; |
7173 if (this.selector != null) { | 8209 if (this.selector != null) { |
7174 return (($0 = this.selector.getEndToken()) && $0.is$Token()); | 8210 return (($0 = this.selector.getEndToken()) && $0.is$Token()); |
7175 } | 8211 } |
7176 return (($0 = this.receiver.getBeginToken()) && $0.is$Token()); | 8212 return (($0 = this.receiver.getBeginToken()) && $0.is$Token()); |
7177 } | 8213 } |
| 8214 Send.prototype.accept$1 = function($0) { |
| 8215 return this.accept(($0 && $0.is$Visitor())); |
| 8216 }; |
| 8217 Send.prototype.getBeginToken$0 = function() { |
| 8218 return this.getBeginToken(); |
| 8219 }; |
| 8220 Send.prototype.getEndToken$0 = function() { |
| 8221 return this.getEndToken(); |
| 8222 }; |
7178 // ********** Code for SendSet ************** | 8223 // ********** Code for SendSet ************** |
7179 function SendSet(receiver, selector, assignmentOperator, argumentsNode) { | 8224 function SendSet(receiver, selector, assignmentOperator, argumentsNode) { |
7180 this.assignmentOperator = assignmentOperator; | 8225 this.assignmentOperator = assignmentOperator; |
7181 Send.call(this, receiver, selector, argumentsNode); | 8226 Send.call(this, receiver, selector, argumentsNode); |
7182 // Initializers done | 8227 // Initializers done |
7183 } | 8228 } |
7184 $inherits(SendSet, Send); | 8229 $inherits(SendSet, Send); |
7185 SendSet.prototype.is$SendSet = function(){return this;}; | 8230 SendSet.prototype.is$SendSet = function(){return this;}; |
7186 SendSet.prototype.accept = function(visitor) { | 8231 SendSet.prototype.accept = function(visitor) { |
7187 return visitor.visitSendSet(this); | 8232 return visitor.visitSendSet(this); |
7188 } | 8233 } |
| 8234 SendSet.prototype.accept$1 = function($0) { |
| 8235 return this.accept(($0 && $0.is$Visitor())); |
| 8236 }; |
7189 // ********** Code for NodeList ************** | 8237 // ********** Code for NodeList ************** |
7190 function NodeList(beginToken, nodes, endToken, delimiter) { | 8238 function NodeList(beginToken, nodes, endToken, delimiter) { |
7191 this.beginToken = beginToken; | 8239 this.beginToken = beginToken; |
7192 this.nodes = nodes; | 8240 this.nodes = nodes; |
7193 this.endToken = endToken; | 8241 this.endToken = endToken; |
7194 this.delimiter = delimiter; | 8242 this.delimiter = delimiter; |
7195 // Initializers done | 8243 // Initializers done |
7196 } | 8244 } |
7197 NodeList.singleton$ctor = function(node) { | 8245 NodeList.singleton$ctor = function(node) { |
7198 NodeList.call(this, null, LinkFactory.createLink(node)); | 8246 NodeList.call(this, null, LinkFactory.createLink(node)); |
7199 // Initializers done | 8247 // Initializers done |
7200 } | 8248 } |
7201 NodeList.singleton$ctor.prototype = NodeList.prototype; | 8249 NodeList.singleton$ctor.prototype = NodeList.prototype; |
7202 $inherits(NodeList, Node); | 8250 $inherits(NodeList, Node); |
7203 NodeList.prototype.is$NodeList = function(){return this;}; | 8251 NodeList.prototype.is$NodeList = function(){return this;}; |
7204 NodeList.prototype.accept = function(visitor) { | 8252 NodeList.prototype.accept = function(visitor) { |
7205 return visitor.visitNodeList(this); | 8253 return visitor.visitNodeList(this); |
7206 } | 8254 } |
7207 NodeList.prototype.getBeginToken = function() { | 8255 NodeList.prototype.getBeginToken = function() { |
7208 var $0; | 8256 var $0; |
7209 if (this.beginToken != null) return this.beginToken; | 8257 if (this.beginToken != null) return this.beginToken; |
7210 if (this.nodes != null) { | 8258 if (this.nodes != null) { |
7211 for (var link = this.nodes; | 8259 for (var link = this.nodes; |
7212 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Lin
k$Node())) { | 8260 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Lin
k$Node())) { |
7213 if (link.get$head().getBeginToken() != null) { | 8261 if (link.get$head().getBeginToken$0() != null) { |
7214 return (($0 = link.get$head().getBeginToken()) && $0.is$Token()); | 8262 return (($0 = link.get$head().getBeginToken$0()) && $0.is$Token()); |
7215 } | 8263 } |
7216 if (link.get$head().getEndToken() != null) { | 8264 if (link.get$head().getEndToken$0() != null) { |
7217 return (($0 = link.get$head().getEndToken()) && $0.is$Token()); | 8265 return (($0 = link.get$head().getEndToken$0()) && $0.is$Token()); |
7218 } | 8266 } |
7219 } | 8267 } |
7220 } | 8268 } |
7221 return this.endToken; | 8269 return this.endToken; |
7222 } | 8270 } |
7223 NodeList.prototype.getEndToken = function() { | 8271 NodeList.prototype.getEndToken = function() { |
7224 var $0; | 8272 var $0; |
7225 if (this.endToken != null) return this.endToken; | 8273 if (this.endToken != null) return this.endToken; |
7226 if (this.nodes != null) { | 8274 if (this.nodes != null) { |
7227 var link = this.nodes; | 8275 var link = this.nodes; |
7228 while (!$notnull_bool(link.get$tail().isEmpty())) link = (($0 = link.get$tai
l()) && $0.is$Link$Node()); | 8276 while (!$notnull_bool(link.get$tail().isEmpty$0())) link = (($0 = link.get$t
ail()) && $0.is$Link$Node()); |
7229 if (link.get$head().getEndToken() != null) return (($0 = link.get$head().get
EndToken()) && $0.is$Token()); | 8277 if (link.get$head().getEndToken$0() != null) return (($0 = link.get$head().g
etEndToken$0()) && $0.is$Token()); |
7230 if (link.get$head().getBeginToken() != null) return (($0 = link.get$head().g
etBeginToken()) && $0.is$Token()); | 8278 if (link.get$head().getBeginToken$0() != null) return (($0 = link.get$head()
.getBeginToken$0()) && $0.is$Token()); |
7231 } | 8279 } |
7232 return this.beginToken; | 8280 return this.beginToken; |
7233 } | 8281 } |
| 8282 NodeList.prototype.accept$1 = function($0) { |
| 8283 return this.accept(($0 && $0.is$Visitor())); |
| 8284 }; |
| 8285 NodeList.prototype.getBeginToken$0 = function() { |
| 8286 return this.getBeginToken(); |
| 8287 }; |
| 8288 NodeList.prototype.getEndToken$0 = function() { |
| 8289 return this.getEndToken(); |
| 8290 }; |
7234 // ********** Code for Block ************** | 8291 // ********** Code for Block ************** |
7235 function Block(statements) { | 8292 function Block(statements) { |
7236 this.statements = statements; | 8293 this.statements = statements; |
7237 // Initializers done | 8294 // Initializers done |
7238 } | 8295 } |
7239 $inherits(Block, Statement); | 8296 $inherits(Block, Statement); |
7240 Block.prototype.accept = function(visitor) { | 8297 Block.prototype.accept = function(visitor) { |
7241 return visitor.visitBlock(this); | 8298 return visitor.visitBlock(this); |
7242 } | 8299 } |
7243 Block.prototype.getBeginToken = function() { | 8300 Block.prototype.getBeginToken = function() { |
7244 return this.statements.getBeginToken(); | 8301 return this.statements.getBeginToken(); |
7245 } | 8302 } |
7246 Block.prototype.getEndToken = function() { | 8303 Block.prototype.getEndToken = function() { |
7247 return this.statements.getEndToken(); | 8304 return this.statements.getEndToken(); |
7248 } | 8305 } |
| 8306 Block.prototype.accept$1 = function($0) { |
| 8307 return this.accept(($0 && $0.is$Visitor())); |
| 8308 }; |
| 8309 Block.prototype.getBeginToken$0 = function() { |
| 8310 return this.getBeginToken(); |
| 8311 }; |
| 8312 Block.prototype.getEndToken$0 = function() { |
| 8313 return this.getEndToken(); |
| 8314 }; |
7249 // ********** Code for If ************** | 8315 // ********** Code for If ************** |
7250 function If(condition, thenPart, elsePart, ifToken, elseToken) { | 8316 function If(condition, thenPart, elsePart, ifToken, elseToken) { |
7251 this.condition = condition; | 8317 this.condition = condition; |
7252 this.thenPart = thenPart; | 8318 this.thenPart = thenPart; |
7253 this.elsePart = elsePart; | 8319 this.elsePart = elsePart; |
7254 this.ifToken = ifToken; | 8320 this.ifToken = ifToken; |
7255 this.elseToken = elseToken; | 8321 this.elseToken = elseToken; |
7256 // Initializers done | 8322 // Initializers done |
7257 } | 8323 } |
7258 $inherits(If, Statement); | 8324 $inherits(If, Statement); |
7259 If.prototype.get$hasElsePart = function() { | 8325 If.prototype.get$hasElsePart = function() { |
7260 return this.elsePart != null; | 8326 return this.elsePart != null; |
7261 } | 8327 } |
7262 If.prototype.accept = function(visitor) { | 8328 If.prototype.accept = function(visitor) { |
7263 return visitor.visitIf(this); | 8329 return visitor.visitIf(this); |
7264 } | 8330 } |
7265 If.prototype.getBeginToken = function() { | 8331 If.prototype.getBeginToken = function() { |
7266 return this.ifToken; | 8332 return this.ifToken; |
7267 } | 8333 } |
7268 If.prototype.getEndToken = function() { | 8334 If.prototype.getEndToken = function() { |
7269 if (this.elsePart == null) return this.thenPart.getEndToken(); | 8335 if (this.elsePart == null) return this.thenPart.getEndToken(); |
7270 return this.elsePart.getEndToken(); | 8336 return this.elsePart.getEndToken(); |
7271 } | 8337 } |
| 8338 If.prototype.accept$1 = function($0) { |
| 8339 return this.accept(($0 && $0.is$Visitor())); |
| 8340 }; |
| 8341 If.prototype.getBeginToken$0 = function() { |
| 8342 return this.getBeginToken(); |
| 8343 }; |
| 8344 If.prototype.getEndToken$0 = function() { |
| 8345 return this.getEndToken(); |
| 8346 }; |
7272 // ********** Code for For ************** | 8347 // ********** Code for For ************** |
7273 function For(initializer, condition, update, body, forToken) { | 8348 function For(initializer, condition, update, body, forToken) { |
7274 this.initializer = initializer; | 8349 this.initializer = initializer; |
7275 this.condition = condition; | 8350 this.condition = condition; |
7276 this.update = update; | 8351 this.update = update; |
7277 this.body = body; | 8352 this.body = body; |
7278 this.forToken = forToken; | 8353 this.forToken = forToken; |
7279 // Initializers done | 8354 // Initializers done |
7280 } | 8355 } |
7281 $inherits(For, Statement); | 8356 $inherits(For, Statement); |
7282 For.prototype.accept = function(visitor) { | 8357 For.prototype.accept = function(visitor) { |
7283 return visitor.visitFor(this); | 8358 return visitor.visitFor(this); |
7284 } | 8359 } |
7285 For.prototype.getBeginToken = function() { | 8360 For.prototype.getBeginToken = function() { |
7286 return this.forToken; | 8361 return this.forToken; |
7287 } | 8362 } |
7288 For.prototype.getEndToken = function() { | 8363 For.prototype.getEndToken = function() { |
7289 return this.body.getEndToken(); | 8364 return this.body.getEndToken(); |
7290 } | 8365 } |
| 8366 For.prototype.accept$1 = function($0) { |
| 8367 return this.accept(($0 && $0.is$Visitor())); |
| 8368 }; |
| 8369 For.prototype.getBeginToken$0 = function() { |
| 8370 return this.getBeginToken(); |
| 8371 }; |
| 8372 For.prototype.getEndToken$0 = function() { |
| 8373 return this.getEndToken(); |
| 8374 }; |
7291 // ********** Code for FunctionExpression ************** | 8375 // ********** Code for FunctionExpression ************** |
7292 function FunctionExpression(name, parameters, body, returnType) { | 8376 function FunctionExpression(name, parameters, body, returnType) { |
7293 this.name = name; | 8377 this.name = name; |
7294 this.parameters = parameters; | 8378 this.parameters = parameters; |
7295 this.body = body; | 8379 this.body = body; |
7296 this.returnType = returnType; | 8380 this.returnType = returnType; |
7297 // Initializers done | 8381 // Initializers done |
7298 } | 8382 } |
7299 $inherits(FunctionExpression, Expression); | 8383 $inherits(FunctionExpression, Expression); |
7300 FunctionExpression.prototype.is$FunctionExpression = function(){return this;}; | 8384 FunctionExpression.prototype.is$FunctionExpression = function(){return this;}; |
7301 FunctionExpression.prototype.get$name = function() { return this.name; }; | 8385 FunctionExpression.prototype.get$name = function() { return this.name; }; |
7302 FunctionExpression.prototype.get$parameters = function() { return this.parameter
s; }; | 8386 FunctionExpression.prototype.get$parameters = function() { return this.parameter
s; }; |
7303 FunctionExpression.prototype.get$returnType = function() { return this.returnTyp
e; }; | 8387 FunctionExpression.prototype.get$returnType = function() { return this.returnTyp
e; }; |
7304 FunctionExpression.prototype.accept = function(visitor) { | 8388 FunctionExpression.prototype.accept = function(visitor) { |
7305 return visitor.visitFunctionExpression(this); | 8389 return visitor.visitFunctionExpression(this); |
7306 } | 8390 } |
7307 FunctionExpression.prototype.getBeginToken = function() { | 8391 FunctionExpression.prototype.getBeginToken = function() { |
7308 return firstBeginToken(this.returnType, this.name); | 8392 return firstBeginToken(this.returnType, this.name); |
7309 } | 8393 } |
7310 FunctionExpression.prototype.getEndToken = function() { | 8394 FunctionExpression.prototype.getEndToken = function() { |
7311 return this.body.getEndToken(); | 8395 return this.body.getEndToken(); |
7312 } | 8396 } |
| 8397 FunctionExpression.prototype.accept$1 = function($0) { |
| 8398 return this.accept(($0 && $0.is$Visitor())); |
| 8399 }; |
| 8400 FunctionExpression.prototype.getBeginToken$0 = function() { |
| 8401 return this.getBeginToken(); |
| 8402 }; |
| 8403 FunctionExpression.prototype.getEndToken$0 = function() { |
| 8404 return this.getEndToken(); |
| 8405 }; |
7313 // ********** Code for Literal ************** | 8406 // ********** Code for Literal ************** |
7314 function Literal(token, handler) { | 8407 function Literal(token, handler) { |
7315 this.token = token; | 8408 this.token = token; |
7316 this.handler = handler; | 8409 this.handler = handler; |
7317 // Initializers done | 8410 // Initializers done |
7318 } | 8411 } |
7319 $inherits(Literal, Expression); | 8412 $inherits(Literal, Expression); |
7320 Literal.prototype.getBeginToken = function() { | 8413 Literal.prototype.getBeginToken = function() { |
7321 return this.token; | 8414 return this.token; |
7322 } | 8415 } |
7323 Literal.prototype.getEndToken = function() { | 8416 Literal.prototype.getEndToken = function() { |
7324 return this.token; | 8417 return this.token; |
7325 } | 8418 } |
| 8419 Literal.prototype.getBeginToken$0 = function() { |
| 8420 return this.getBeginToken(); |
| 8421 }; |
| 8422 Literal.prototype.getEndToken$0 = function() { |
| 8423 return this.getEndToken(); |
| 8424 }; |
7326 // ********** Code for Literal$SourceString ************** | 8425 // ********** Code for Literal$SourceString ************** |
7327 function Literal$SourceString(token, handler) { | 8426 function Literal$SourceString(token, handler) { |
7328 this.token = token; | 8427 this.token = token; |
7329 this.handler = handler; | 8428 this.handler = handler; |
7330 // Initializers done | 8429 // Initializers done |
7331 } | 8430 } |
7332 $inherits(Literal$SourceString, Literal); | 8431 $inherits(Literal$SourceString, Literal); |
7333 // ********** Code for Literal$bool ************** | 8432 // ********** Code for Literal$bool ************** |
7334 function Literal$bool(token, handler) { | 8433 function Literal$bool(token, handler) { |
7335 this.token = token; | 8434 this.token = token; |
(...skipping 16 matching lines...) Expand all Loading... |
7352 } | 8451 } |
7353 $inherits(Literal$int, Literal); | 8452 $inherits(Literal$int, Literal); |
7354 // ********** Code for LiteralInt ************** | 8453 // ********** Code for LiteralInt ************** |
7355 function LiteralInt(token, handler) { | 8454 function LiteralInt(token, handler) { |
7356 Literal$int.call(this, token, handler); | 8455 Literal$int.call(this, token, handler); |
7357 // Initializers done | 8456 // Initializers done |
7358 } | 8457 } |
7359 $inherits(LiteralInt, Literal$int); | 8458 $inherits(LiteralInt, Literal$int); |
7360 LiteralInt.prototype.get$value = function() { | 8459 LiteralInt.prototype.get$value = function() { |
7361 try { | 8460 try { |
7362 return Math.parseInt($assert_String(this.token.get$value().toString())); | 8461 return Math.parseInt(this.token.get$value().toString$0()); |
7363 } catch (ex) { | 8462 } catch (ex) { |
7364 ex = $toDartException(ex); | 8463 ex = $toDartException(ex); |
7365 if (!(ex instanceof BadNumberFormatException)) throw ex; | 8464 if (!(ex instanceof BadNumberFormatException)) throw ex; |
7366 (this.handler)(this.token, ex); | 8465 (this.handler)(this.token, ex); |
7367 } | 8466 } |
7368 } | 8467 } |
7369 LiteralInt.prototype.accept = function(visitor) { | 8468 LiteralInt.prototype.accept = function(visitor) { |
7370 return visitor.visitLiteralInt(this); | 8469 return visitor.visitLiteralInt(this); |
7371 } | 8470 } |
| 8471 LiteralInt.prototype.accept$1 = function($0) { |
| 8472 return this.accept(($0 && $0.is$Visitor())); |
| 8473 }; |
7372 // ********** Code for LiteralDouble ************** | 8474 // ********** Code for LiteralDouble ************** |
7373 function LiteralDouble(token, handler) { | 8475 function LiteralDouble(token, handler) { |
7374 Literal$double.call(this, token, handler); | 8476 Literal$double.call(this, token, handler); |
7375 // Initializers done | 8477 // Initializers done |
7376 } | 8478 } |
7377 $inherits(LiteralDouble, Literal$double); | 8479 $inherits(LiteralDouble, Literal$double); |
7378 LiteralDouble.prototype.get$value = function() { | 8480 LiteralDouble.prototype.get$value = function() { |
7379 try { | 8481 try { |
7380 return Math.parseDouble($assert_String(this.token.get$value().toString())); | 8482 return Math.parseDouble(this.token.get$value().toString$0()); |
7381 } catch (ex) { | 8483 } catch (ex) { |
7382 ex = $toDartException(ex); | 8484 ex = $toDartException(ex); |
7383 if (!(ex instanceof BadNumberFormatException)) throw ex; | 8485 if (!(ex instanceof BadNumberFormatException)) throw ex; |
7384 (this.handler)(this.token, ex); | 8486 (this.handler)(this.token, ex); |
7385 } | 8487 } |
7386 } | 8488 } |
7387 LiteralDouble.prototype.accept = function(visitor) { | 8489 LiteralDouble.prototype.accept = function(visitor) { |
7388 return visitor.visitLiteralDouble(this); | 8490 return visitor.visitLiteralDouble(this); |
7389 } | 8491 } |
| 8492 LiteralDouble.prototype.accept$1 = function($0) { |
| 8493 return this.accept(($0 && $0.is$Visitor())); |
| 8494 }; |
7390 // ********** Code for LiteralBool ************** | 8495 // ********** Code for LiteralBool ************** |
7391 function LiteralBool(token, handler) { | 8496 function LiteralBool(token, handler) { |
7392 Literal$bool.call(this, token, handler); | 8497 Literal$bool.call(this, token, handler); |
7393 // Initializers done | 8498 // Initializers done |
7394 } | 8499 } |
7395 $inherits(LiteralBool, Literal$bool); | 8500 $inherits(LiteralBool, Literal$bool); |
7396 LiteralBool.prototype.get$value = function() { | 8501 LiteralBool.prototype.get$value = function() { |
7397 switch (this.token.get$value()) { | 8502 switch (this.token.get$value()) { |
7398 case const$190/*Keyword.TRUE*/: | 8503 case const$192/*Keyword.TRUE*/: |
7399 | 8504 |
7400 return true; | 8505 return true; |
7401 | 8506 |
7402 case const$162/*Keyword.FALSE*/: | 8507 case const$164/*Keyword.FALSE*/: |
7403 | 8508 |
7404 return false; | 8509 return false; |
7405 | 8510 |
7406 default: | 8511 default: |
7407 | 8512 |
7408 (this.handler)(this.token, ("not a bool " + this.token.get$value() + "")); | 8513 (this.handler)(this.token, ("not a bool " + this.token.get$value() + "")); |
7409 | 8514 |
7410 } | 8515 } |
7411 } | 8516 } |
7412 LiteralBool.prototype.accept = function(visitor) { | 8517 LiteralBool.prototype.accept = function(visitor) { |
7413 return visitor.visitLiteralBool(this); | 8518 return visitor.visitLiteralBool(this); |
7414 } | 8519 } |
| 8520 LiteralBool.prototype.accept$1 = function($0) { |
| 8521 return this.accept(($0 && $0.is$Visitor())); |
| 8522 }; |
7415 // ********** Code for LiteralString ************** | 8523 // ********** Code for LiteralString ************** |
7416 function LiteralString(token) { | 8524 function LiteralString(token) { |
7417 Literal$SourceString.call(this, token, to$call$2(null)); | 8525 Literal$SourceString.call(this, token, to$call$2(null)); |
7418 // Initializers done | 8526 // Initializers done |
7419 } | 8527 } |
7420 $inherits(LiteralString, Literal$SourceString); | 8528 $inherits(LiteralString, Literal$SourceString); |
7421 LiteralString.prototype.is$LiteralString = function(){return this;}; | 8529 LiteralString.prototype.is$LiteralString = function(){return this;}; |
7422 LiteralString.prototype.get$value = function() { | 8530 LiteralString.prototype.get$value = function() { |
7423 var $0; | 8531 var $0; |
7424 return (($0 = this.token.get$value()) && $0.is$SourceString()); | 8532 return (($0 = this.token.get$value()) && $0.is$SourceString()); |
7425 } | 8533 } |
7426 LiteralString.prototype.accept = function(visitor) { | 8534 LiteralString.prototype.accept = function(visitor) { |
7427 return visitor.visitLiteralString(this); | 8535 return visitor.visitLiteralString(this); |
7428 } | 8536 } |
| 8537 LiteralString.prototype.accept$1 = function($0) { |
| 8538 return this.accept(($0 && $0.is$Visitor())); |
| 8539 }; |
7429 // ********** Code for Identifier ************** | 8540 // ********** Code for Identifier ************** |
7430 function Identifier(token) { | 8541 function Identifier(token) { |
7431 this.token = token; | 8542 this.token = token; |
7432 // Initializers done | 8543 // Initializers done |
7433 } | 8544 } |
7434 $inherits(Identifier, Expression); | 8545 $inherits(Identifier, Expression); |
7435 Identifier.prototype.is$Identifier = function(){return this;}; | 8546 Identifier.prototype.is$Identifier = function(){return this;}; |
7436 Identifier.prototype.get$source = function() { | 8547 Identifier.prototype.get$source = function() { |
7437 var $0; | 8548 var $0; |
7438 return (($0 = this.token.get$value()) && $0.is$SourceString()); | 8549 return (($0 = this.token.get$value()) && $0.is$SourceString()); |
7439 } | 8550 } |
7440 Identifier.prototype.accept = function(visitor) { | 8551 Identifier.prototype.accept = function(visitor) { |
7441 return visitor.visitIdentifier(this); | 8552 return visitor.visitIdentifier(this); |
7442 } | 8553 } |
7443 Identifier.prototype.getBeginToken = function() { | 8554 Identifier.prototype.getBeginToken = function() { |
7444 return this.token; | 8555 return this.token; |
7445 } | 8556 } |
7446 Identifier.prototype.getEndToken = function() { | 8557 Identifier.prototype.getEndToken = function() { |
7447 return this.token; | 8558 return this.token; |
7448 } | 8559 } |
| 8560 Identifier.prototype.accept$1 = function($0) { |
| 8561 return this.accept(($0 && $0.is$Visitor())); |
| 8562 }; |
| 8563 Identifier.prototype.getBeginToken$0 = function() { |
| 8564 return this.getBeginToken(); |
| 8565 }; |
| 8566 Identifier.prototype.getEndToken$0 = function() { |
| 8567 return this.getEndToken(); |
| 8568 }; |
7449 // ********** Code for Operator ************** | 8569 // ********** Code for Operator ************** |
7450 function Operator(token) { | 8570 function Operator(token) { |
7451 Identifier.call(this, token); | 8571 Identifier.call(this, token); |
7452 // Initializers done | 8572 // Initializers done |
7453 } | 8573 } |
7454 $inherits(Operator, Identifier); | 8574 $inherits(Operator, Identifier); |
7455 Operator.prototype.is$Operator = function(){return this;}; | 8575 Operator.prototype.is$Operator = function(){return this;}; |
7456 Operator.prototype.accept = function(visitor) { | 8576 Operator.prototype.accept = function(visitor) { |
7457 return visitor.visitOperator(this); | 8577 return visitor.visitOperator(this); |
7458 } | 8578 } |
| 8579 Operator.prototype.accept$1 = function($0) { |
| 8580 return this.accept(($0 && $0.is$Visitor())); |
| 8581 }; |
7459 // ********** Code for Return ************** | 8582 // ********** Code for Return ************** |
7460 function Return(beginToken, endToken, expression) { | 8583 function Return(beginToken, endToken, expression) { |
7461 this.beginToken = beginToken; | 8584 this.beginToken = beginToken; |
7462 this.endToken = endToken; | 8585 this.endToken = endToken; |
7463 this.expression = expression; | 8586 this.expression = expression; |
7464 // Initializers done | 8587 // Initializers done |
7465 } | 8588 } |
7466 $inherits(Return, Statement); | 8589 $inherits(Return, Statement); |
7467 Return.prototype.get$hasExpression = function() { | 8590 Return.prototype.get$hasExpression = function() { |
7468 return this.expression != null; | 8591 return this.expression != null; |
7469 } | 8592 } |
7470 Return.prototype.accept = function(visitor) { | 8593 Return.prototype.accept = function(visitor) { |
7471 return visitor.visitReturn(this); | 8594 return visitor.visitReturn(this); |
7472 } | 8595 } |
7473 Return.prototype.getBeginToken = function() { | 8596 Return.prototype.getBeginToken = function() { |
7474 return this.beginToken; | 8597 return this.beginToken; |
7475 } | 8598 } |
7476 Return.prototype.getEndToken = function() { | 8599 Return.prototype.getEndToken = function() { |
7477 return this.endToken; | 8600 return this.endToken; |
7478 } | 8601 } |
| 8602 Return.prototype.accept$1 = function($0) { |
| 8603 return this.accept(($0 && $0.is$Visitor())); |
| 8604 }; |
| 8605 Return.prototype.getBeginToken$0 = function() { |
| 8606 return this.getBeginToken(); |
| 8607 }; |
| 8608 Return.prototype.getEndToken$0 = function() { |
| 8609 return this.getEndToken(); |
| 8610 }; |
7479 // ********** Code for ExpressionStatement ************** | 8611 // ********** Code for ExpressionStatement ************** |
7480 function ExpressionStatement(expression, endToken) { | 8612 function ExpressionStatement(expression, endToken) { |
7481 this.expression = expression; | 8613 this.expression = expression; |
7482 this.endToken = endToken; | 8614 this.endToken = endToken; |
7483 // Initializers done | 8615 // Initializers done |
7484 } | 8616 } |
7485 $inherits(ExpressionStatement, Statement); | 8617 $inherits(ExpressionStatement, Statement); |
7486 ExpressionStatement.prototype.is$ExpressionStatement = function(){return this;}; | 8618 ExpressionStatement.prototype.is$ExpressionStatement = function(){return this;}; |
7487 ExpressionStatement.prototype.accept = function(visitor) { | 8619 ExpressionStatement.prototype.accept = function(visitor) { |
7488 return visitor.visitExpressionStatement(this); | 8620 return visitor.visitExpressionStatement(this); |
7489 } | 8621 } |
7490 ExpressionStatement.prototype.getBeginToken = function() { | 8622 ExpressionStatement.prototype.getBeginToken = function() { |
7491 var $0; | 8623 var $0; |
7492 return (($0 = this.expression.getBeginToken()) && $0.is$Token()); | 8624 return (($0 = this.expression.getBeginToken()) && $0.is$Token()); |
7493 } | 8625 } |
7494 ExpressionStatement.prototype.getEndToken = function() { | 8626 ExpressionStatement.prototype.getEndToken = function() { |
7495 return this.endToken; | 8627 return this.endToken; |
7496 } | 8628 } |
| 8629 ExpressionStatement.prototype.accept$1 = function($0) { |
| 8630 return this.accept(($0 && $0.is$Visitor())); |
| 8631 }; |
| 8632 ExpressionStatement.prototype.getBeginToken$0 = function() { |
| 8633 return this.getBeginToken(); |
| 8634 }; |
| 8635 ExpressionStatement.prototype.getEndToken$0 = function() { |
| 8636 return this.getEndToken(); |
| 8637 }; |
7497 // ********** Code for Throw ************** | 8638 // ********** Code for Throw ************** |
7498 function Throw(expression, throwToken, endToken) { | 8639 function Throw(expression, throwToken, endToken) { |
7499 this.expression = expression; | 8640 this.expression = expression; |
7500 this.throwToken = throwToken; | 8641 this.throwToken = throwToken; |
7501 this.endToken = endToken; | 8642 this.endToken = endToken; |
7502 // Initializers done | 8643 // Initializers done |
7503 } | 8644 } |
7504 $inherits(Throw, Statement); | 8645 $inherits(Throw, Statement); |
7505 Throw.prototype.accept = function(visitor) { | 8646 Throw.prototype.accept = function(visitor) { |
7506 return visitor.visitThrow(this); | 8647 return visitor.visitThrow(this); |
7507 } | 8648 } |
7508 Throw.prototype.getBeginToken = function() { | 8649 Throw.prototype.getBeginToken = function() { |
7509 return this.throwToken; | 8650 return this.throwToken; |
7510 } | 8651 } |
7511 Throw.prototype.getEndToken = function() { | 8652 Throw.prototype.getEndToken = function() { |
7512 return this.endToken; | 8653 return this.endToken; |
7513 } | 8654 } |
| 8655 Throw.prototype.accept$1 = function($0) { |
| 8656 return this.accept(($0 && $0.is$Visitor())); |
| 8657 }; |
| 8658 Throw.prototype.getBeginToken$0 = function() { |
| 8659 return this.getBeginToken(); |
| 8660 }; |
| 8661 Throw.prototype.getEndToken$0 = function() { |
| 8662 return this.getEndToken(); |
| 8663 }; |
7514 // ********** Code for TypeAnnotation ************** | 8664 // ********** Code for TypeAnnotation ************** |
7515 function TypeAnnotation(typeName) { | 8665 function TypeAnnotation(typeName) { |
7516 this.typeName = typeName; | 8666 this.typeName = typeName; |
7517 // Initializers done | 8667 // Initializers done |
7518 } | 8668 } |
7519 $inherits(TypeAnnotation, Node); | 8669 $inherits(TypeAnnotation, Node); |
7520 TypeAnnotation.prototype.is$TypeAnnotation = function(){return this;}; | 8670 TypeAnnotation.prototype.is$TypeAnnotation = function(){return this;}; |
7521 TypeAnnotation.prototype.get$typeName = function() { return this.typeName; }; | 8671 TypeAnnotation.prototype.get$typeName = function() { return this.typeName; }; |
7522 TypeAnnotation.prototype.accept = function(visitor) { | 8672 TypeAnnotation.prototype.accept = function(visitor) { |
7523 return visitor.visitTypeAnnotation(this); | 8673 return visitor.visitTypeAnnotation(this); |
7524 } | 8674 } |
7525 TypeAnnotation.prototype.getBeginToken = function() { | 8675 TypeAnnotation.prototype.getBeginToken = function() { |
7526 var $0; | 8676 var $0; |
7527 return (($0 = this.typeName.getBeginToken()) && $0.is$Token()); | 8677 return (($0 = this.typeName.getBeginToken()) && $0.is$Token()); |
7528 } | 8678 } |
7529 TypeAnnotation.prototype.getEndToken = function() { | 8679 TypeAnnotation.prototype.getEndToken = function() { |
7530 var $0; | 8680 var $0; |
7531 return (($0 = this.typeName.getEndToken()) && $0.is$Token()); | 8681 return (($0 = this.typeName.getEndToken()) && $0.is$Token()); |
7532 } | 8682 } |
| 8683 TypeAnnotation.prototype.accept$1 = function($0) { |
| 8684 return this.accept(($0 && $0.is$Visitor())); |
| 8685 }; |
| 8686 TypeAnnotation.prototype.getBeginToken$0 = function() { |
| 8687 return this.getBeginToken(); |
| 8688 }; |
| 8689 TypeAnnotation.prototype.getEndToken$0 = function() { |
| 8690 return this.getEndToken(); |
| 8691 }; |
7533 // ********** Code for VariableDefinitions ************** | 8692 // ********** Code for VariableDefinitions ************** |
7534 function VariableDefinitions(type, modifiers, definitions, endToken) { | 8693 function VariableDefinitions(type, modifiers, definitions, endToken) { |
7535 this.type = type; | 8694 this.type = type; |
7536 this.modifiers = modifiers; | 8695 this.modifiers = modifiers; |
7537 this.definitions = definitions; | 8696 this.definitions = definitions; |
7538 this.endToken = endToken; | 8697 this.endToken = endToken; |
7539 // Initializers done | 8698 // Initializers done |
7540 } | 8699 } |
7541 $inherits(VariableDefinitions, Statement); | 8700 $inherits(VariableDefinitions, Statement); |
7542 VariableDefinitions.prototype.is$VariableDefinitions = function(){return this;}; | 8701 VariableDefinitions.prototype.is$VariableDefinitions = function(){return this;}; |
7543 VariableDefinitions.prototype.accept = function(visitor) { | 8702 VariableDefinitions.prototype.accept = function(visitor) { |
7544 return visitor.visitVariableDefinitions(this); | 8703 return visitor.visitVariableDefinitions(this); |
7545 } | 8704 } |
7546 VariableDefinitions.prototype.getBeginToken = function() { | 8705 VariableDefinitions.prototype.getBeginToken = function() { |
7547 return firstBeginToken(this.type, this.definitions); | 8706 return firstBeginToken(this.type, this.definitions); |
7548 } | 8707 } |
7549 VariableDefinitions.prototype.getEndToken = function() { | 8708 VariableDefinitions.prototype.getEndToken = function() { |
7550 return this.endToken; | 8709 return this.endToken; |
7551 } | 8710 } |
| 8711 VariableDefinitions.prototype.accept$1 = function($0) { |
| 8712 return this.accept(($0 && $0.is$Visitor())); |
| 8713 }; |
| 8714 VariableDefinitions.prototype.getBeginToken$0 = function() { |
| 8715 return this.getBeginToken(); |
| 8716 }; |
| 8717 VariableDefinitions.prototype.getEndToken$0 = function() { |
| 8718 return this.getEndToken(); |
| 8719 }; |
7552 // ********** Code for Unparser ************** | 8720 // ********** Code for Unparser ************** |
7553 function Unparser(printDebugInfo) { | 8721 function Unparser(printDebugInfo) { |
7554 this.printDebugInfo = printDebugInfo; | 8722 this.printDebugInfo = printDebugInfo; |
7555 // Initializers done | 8723 // Initializers done |
7556 } | 8724 } |
| 8725 Unparser.prototype.is$Visitor = function(){return this;}; |
7557 Unparser.prototype.unparse = function(node) { | 8726 Unparser.prototype.unparse = function(node) { |
7558 this.sb = new StringBufferImpl(""); | 8727 this.sb = new StringBufferImpl(""); |
7559 this.visit(node); | 8728 this.visit(node); |
7560 return this.sb.toString(); | 8729 return this.sb.toString(); |
7561 } | 8730 } |
7562 Unparser.prototype.add = function(string) { | 8731 Unparser.prototype.add = function(string) { |
7563 string.printOn(this.sb); | 8732 string.printOn(this.sb); |
7564 } | 8733 } |
7565 Unparser.prototype.visit = function(node) { | 8734 Unparser.prototype.visit = function(node) { |
7566 if (node != null) { | 8735 if (node != null) { |
7567 if ($notnull_bool(this.printDebugInfo)) this.sb.add(('[' + node.getObjectDes
cription() + ': ')); | 8736 if ($notnull_bool(this.printDebugInfo)) this.sb.add(('[' + node.getObjectDes
cription() + ': ')); |
7568 node.accept(this); | 8737 node.accept(this); |
7569 if ($notnull_bool(this.printDebugInfo)) this.sb.add(']'); | 8738 if ($notnull_bool(this.printDebugInfo)) this.sb.add(']'); |
7570 } | 8739 } |
7571 else if ($notnull_bool(this.printDebugInfo)) { | 8740 else if ($notnull_bool(this.printDebugInfo)) { |
7572 this.sb.add('[null]'); | 8741 this.sb.add('[null]'); |
7573 } | 8742 } |
7574 } | 8743 } |
7575 Unparser.prototype.visitBlock = function(node) { | 8744 Unparser.prototype.visitBlock = function(node) { |
7576 this.visit(node.statements); | 8745 this.visit(node.statements); |
7577 } | 8746 } |
7578 Unparser.prototype.visitExpressionStatement = function(node) { | 8747 Unparser.prototype.visitExpressionStatement = function(node) { |
7579 var $0; | 8748 var $0; |
7580 this.visit(node.expression); | 8749 this.visit(node.expression); |
7581 this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); | 8750 this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
7582 } | 8751 } |
7583 Unparser.prototype.visitFor = function(node) { | 8752 Unparser.prototype.visitFor = function(node) { |
7584 node.forToken.get$value().printOn(this.sb); | 8753 node.forToken.get$value().printOn$1(this.sb); |
7585 this.sb.add('('); | 8754 this.sb.add('('); |
7586 this.visit(node.initializer); | 8755 this.visit(node.initializer); |
7587 this.visit(node.condition); | 8756 this.visit(node.condition); |
7588 this.visit(node.update); | 8757 this.visit(node.update); |
7589 this.sb.add(')'); | 8758 this.sb.add(')'); |
7590 this.visit(node.body); | 8759 this.visit(node.body); |
7591 } | 8760 } |
7592 Unparser.prototype.visitFunctionExpression = function(node) { | 8761 Unparser.prototype.visitFunctionExpression = function(node) { |
7593 if (node.returnType != null) { | 8762 if (node.returnType != null) { |
7594 this.visit(node.returnType); | 8763 this.visit(node.returnType); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7660 var $0; | 8829 var $0; |
7661 if (node.receiver != null) { | 8830 if (node.receiver != null) { |
7662 this.visit(node.receiver); | 8831 this.visit(node.receiver); |
7663 this.sb.add('.'); | 8832 this.sb.add('.'); |
7664 } | 8833 } |
7665 this.visit(node.selector); | 8834 this.visit(node.selector); |
7666 this.add((($0 = node.assignmentOperator.get$value()) && $0.is$SourceString()))
; | 8835 this.add((($0 = node.assignmentOperator.get$value()) && $0.is$SourceString()))
; |
7667 this.visit(node.argumentsNode); | 8836 this.visit(node.argumentsNode); |
7668 } | 8837 } |
7669 Unparser.prototype.visitThrow = function(node) { | 8838 Unparser.prototype.visitThrow = function(node) { |
7670 node.throwToken.get$value().printOn(this.sb); | 8839 node.throwToken.get$value().printOn$1(this.sb); |
7671 if (node.expression != null) { | 8840 if (node.expression != null) { |
7672 this.visit(node.expression); | 8841 this.visit(node.expression); |
7673 } | 8842 } |
7674 node.endToken.get$value().printOn(this.sb); | 8843 node.endToken.get$value().printOn$1(this.sb); |
7675 } | 8844 } |
7676 Unparser.prototype.visitTypeAnnotation = function(node) { | 8845 Unparser.prototype.visitTypeAnnotation = function(node) { |
7677 this.visit(node.typeName); | 8846 this.visit(node.typeName); |
7678 } | 8847 } |
7679 Unparser.prototype.visitVariableDefinitions = function(node) { | 8848 Unparser.prototype.visitVariableDefinitions = function(node) { |
7680 var $0; | 8849 var $0; |
7681 if (node.type != null) { | 8850 if (node.type != null) { |
7682 this.visit(node.type); | 8851 this.visit(node.type); |
7683 } | 8852 } |
7684 else { | 8853 else { |
7685 this.sb.add('var'); | 8854 this.sb.add('var'); |
7686 } | 8855 } |
7687 this.sb.add(' '); | 8856 this.sb.add(' '); |
7688 this.visit(node.definitions); | 8857 this.visit(node.definitions); |
7689 if (node.endToken != null) this.add((($0 = node.endToken.get$value()) && $0.is
$SourceString())); | 8858 if (node.endToken != null) this.add((($0 = node.endToken.get$value()) && $0.is
$SourceString())); |
7690 } | 8859 } |
| 8860 Unparser.prototype.add$1 = function($0) { |
| 8861 return this.add(($0 && $0.is$SourceString())); |
| 8862 }; |
| 8863 Unparser.prototype.visit$1 = function($0) { |
| 8864 return this.visit(($0 && $0.is$Node())); |
| 8865 }; |
7691 // ********** Code for top level ************** | 8866 // ********** Code for top level ************** |
7692 function firstBeginToken(first, second) { | 8867 function firstBeginToken(first, second) { |
7693 var $0; | 8868 var $0; |
7694 return (($0 = (first != null) ? first.getBeginToken() : second.getBeginToken()
) && $0.is$Token()); | 8869 return (($0 = (first != null) ? first.getBeginToken() : second.getBeginToken()
) && $0.is$Token()); |
7695 } | 8870 } |
7696 // ********** Library elements ************** | 8871 // ********** Library elements ************** |
7697 // ********** Code for ElementKind ************** | 8872 // ********** Code for ElementKind ************** |
7698 function ElementKind(id) { | 8873 function ElementKind(id) { |
7699 this.id = id; | 8874 this.id = id; |
7700 // Initializers done | 8875 // Initializers done |
7701 } | 8876 } |
7702 // ********** Code for Element ************** | 8877 // ********** Code for Element ************** |
7703 function Element(name, kind, enclosingElement) { | 8878 function Element(name, kind, enclosingElement) { |
7704 this.name = name; | 8879 this.name = name; |
7705 this.kind = kind; | 8880 this.kind = kind; |
7706 this.enclosingElement = enclosingElement; | 8881 this.enclosingElement = enclosingElement; |
7707 // Initializers done | 8882 // Initializers done |
7708 } | 8883 } |
7709 Element.prototype.is$Element = function(){return this;}; | 8884 Element.prototype.is$Element = function(){return this;}; |
7710 Element.prototype.get$name = function() { return this.name; }; | 8885 Element.prototype.get$name = function() { return this.name; }; |
7711 Element.prototype.hashCode = function() { | 8886 Element.prototype.hashCode = function() { |
7712 return this.name.hashCode(); | 8887 return this.name.hashCode(); |
7713 } | 8888 } |
| 8889 Element.prototype.computeType$2 = function($0, $1) { |
| 8890 return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types())); |
| 8891 }; |
| 8892 Element.prototype.hashCode$0 = function() { |
| 8893 return this.hashCode(); |
| 8894 }; |
7714 // ********** Code for VariableElement ************** | 8895 // ********** Code for VariableElement ************** |
7715 function VariableElement(node, typeAnnotation, name, enclosingElement) { | 8896 function VariableElement(node, typeAnnotation, name, enclosingElement) { |
7716 this.node = node; | 8897 this.node = node; |
7717 this.typeAnnotation = typeAnnotation; | 8898 this.typeAnnotation = typeAnnotation; |
7718 Element.call(this, name, const$255, enclosingElement); | 8899 Element.call(this, name, const$257, enclosingElement); |
7719 // Initializers done | 8900 // Initializers done |
7720 } | 8901 } |
7721 $inherits(VariableElement, Element); | 8902 $inherits(VariableElement, Element); |
7722 VariableElement.prototype.parseNode = function(canceler, logger) { | 8903 VariableElement.prototype.parseNode = function(canceler, logger) { |
7723 return this.node; | 8904 return this.node; |
7724 } | 8905 } |
7725 VariableElement.prototype.computeType = function(compiler, types) { | 8906 VariableElement.prototype.computeType = function(compiler, types) { |
7726 return getType(this.typeAnnotation, types); | 8907 return getType(this.typeAnnotation, types); |
7727 } | 8908 } |
| 8909 VariableElement.prototype.computeType$2 = function($0, $1) { |
| 8910 return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types())); |
| 8911 }; |
7728 // ********** Code for ForeignElement ************** | 8912 // ********** Code for ForeignElement ************** |
7729 function ForeignElement(name) { | 8913 function ForeignElement(name) { |
7730 Element.call(this, name, const$244, null); | 8914 Element.call(this, name, const$246, null); |
7731 // Initializers done | 8915 // Initializers done |
7732 } | 8916 } |
7733 $inherits(ForeignElement, Element); | 8917 $inherits(ForeignElement, Element); |
7734 ForeignElement.prototype.computeType = function(compiler, types) { | 8918 ForeignElement.prototype.computeType = function(compiler, types) { |
7735 return types.dynamicType; | 8919 return types.dynamicType; |
7736 } | 8920 } |
| 8921 ForeignElement.prototype.computeType$2 = function($0, $1) { |
| 8922 return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types())); |
| 8923 }; |
7737 // ********** Code for FunctionElement ************** | 8924 // ********** Code for FunctionElement ************** |
7738 function FunctionElement(name) { | 8925 function FunctionElement(name) { |
7739 Element.call(this, name, const$241, null); | 8926 Element.call(this, name, const$243, null); |
7740 // Initializers done | 8927 // Initializers done |
7741 } | 8928 } |
7742 $inherits(FunctionElement, Element); | 8929 $inherits(FunctionElement, Element); |
7743 FunctionElement.prototype.computeType = function(compiler, types) { | 8930 FunctionElement.prototype.computeType = function(compiler, types) { |
7744 var $0; | 8931 var $0; |
7745 if (this.type != null) return (($0 = this.type) && $0.is$FunctionType()); | 8932 if (this.type != null) return (($0 = this.type) && $0.is$FunctionType()); |
7746 var node = (($0 = this.parseNode(compiler, compiler)) && $0.is$FunctionExpress
ion()); | 8933 var node = (($0 = this.parseNode(compiler, compiler)) && $0.is$FunctionExpress
ion()); |
7747 var returnType = getType(node.returnType, types); | 8934 var returnType = getType(node.returnType, types); |
7748 if (returnType == null) compiler.cancel(('unknown type ' + returnType + '')); | 8935 if (returnType == null) compiler.cancel(('unknown type ' + returnType + '')); |
7749 var parameterTypes = new LinkBuilderImplementation$Type(); | 8936 var parameterTypes = new LinkBuilderImplementation$Type(); |
7750 for (var link = node.parameters.nodes; | 8937 for (var link = node.parameters.nodes; |
7751 !$notnull_bool(link.isEmpty()); link = link.get$tail()) { | 8938 !$notnull_bool(link.isEmpty$0()); link = link.get$tail()) { |
7752 var parameter = (($0 = link.get$head()) && $0.is$VariableDefinitions()); | 8939 var parameter = (($0 = link.get$head()) && $0.is$VariableDefinitions()); |
7753 parameterTypes.addLast(getType(parameter.type, types)); | 8940 parameterTypes.addLast(getType(parameter.type, types)); |
7754 } | 8941 } |
7755 this.type = new FunctionType(returnType, (($0 = parameterTypes.toLink()) && $0
.is$Link$Type())); | 8942 this.type = new FunctionType(returnType, (($0 = parameterTypes.toLink()) && $0
.is$Link$Type())); |
7756 return (($0 = this.type) && $0.is$FunctionType()); | 8943 return (($0 = this.type) && $0.is$FunctionType()); |
7757 } | 8944 } |
| 8945 FunctionElement.prototype.computeType$2 = FunctionElement.prototype.computeType; |
7758 // ********** Code for ClassElement ************** | 8946 // ********** Code for ClassElement ************** |
7759 function ClassElement(name) { | 8947 function ClassElement(name) { |
7760 Element.call(this, name, const$239, null); | 8948 Element.call(this, name, const$241, null); |
7761 // Initializers done | 8949 // Initializers done |
7762 } | 8950 } |
7763 $inherits(ClassElement, Element); | 8951 $inherits(ClassElement, Element); |
7764 ClassElement.prototype.computeType = function(compiler, types) { | 8952 ClassElement.prototype.computeType = function(compiler, types) { |
7765 compiler.unimplemented('ClassElement.computeType'); | 8953 compiler.unimplemented$1('ClassElement.computeType'); |
7766 } | 8954 } |
| 8955 ClassElement.prototype.computeType$2 = ClassElement.prototype.computeType; |
7767 // ********** Code for top level ************** | 8956 // ********** Code for top level ************** |
7768 function getType(annotation, types) { | 8957 function getType(annotation, types) { |
7769 var $0; | 8958 var $0; |
7770 if (annotation == null || annotation.typeName == null) { | 8959 if (annotation == null || annotation.typeName == null) { |
7771 return (($0 = types.dynamicType) && $0.is$Type()); | 8960 return (($0 = types.dynamicType) && $0.is$Type()); |
7772 } | 8961 } |
7773 return (($0 = types.lookup(annotation.typeName.get$source())) && $0.is$Type())
; | 8962 return (($0 = types.lookup$1(annotation.typeName.get$source())) && $0.is$Type(
)); |
7774 } | 8963 } |
7775 // ********** Library ssa ************** | 8964 // ********** Library ssa ************** |
7776 // ********** Code for SsaBuilderTask ************** | 8965 // ********** Code for SsaBuilderTask ************** |
7777 function SsaBuilderTask(compiler) { | 8966 function SsaBuilderTask(compiler) { |
7778 CompilerTask.call(this, compiler); | 8967 CompilerTask.call(this, compiler); |
7779 // Initializers done | 8968 // Initializers done |
7780 } | 8969 } |
7781 $inherits(SsaBuilderTask, CompilerTask); | 8970 $inherits(SsaBuilderTask, CompilerTask); |
7782 SsaBuilderTask.prototype.get$name = function() { | 8971 SsaBuilderTask.prototype.get$name = function() { |
7783 return 'SSA builder'; | 8972 return 'SSA builder'; |
(...skipping 19 matching lines...) Expand all Loading... |
7803 var builder = new SsaBuilder(this.compiler, elements); | 8992 var builder = new SsaBuilder(this.compiler, elements); |
7804 var graph = builder.build(parameters, body); | 8993 var graph = builder.build(parameters, body); |
7805 return graph; | 8994 return graph; |
7806 } | 8995 } |
7807 // ********** Code for SsaBuilder ************** | 8996 // ********** Code for SsaBuilder ************** |
7808 function SsaBuilder(compiler, elements) { | 8997 function SsaBuilder(compiler, elements) { |
7809 this.compiler = compiler; | 8998 this.compiler = compiler; |
7810 this.elements = elements; | 8999 this.elements = elements; |
7811 // Initializers done | 9000 // Initializers done |
7812 } | 9001 } |
| 9002 SsaBuilder.prototype.is$Visitor = function(){return this;}; |
7813 SsaBuilder.prototype.build = function(parameters, body) { | 9003 SsaBuilder.prototype.build = function(parameters, body) { |
7814 this.stack = new ListFactory$HInstruction(); | 9004 this.stack = new ListFactory$HInstruction(); |
7815 this.definitions = new HashMapImplementation$Element$HInstruction(); | 9005 this.definitions = new HashMapImplementation$Element$HInstruction(); |
7816 this.graph = new HGraph(); | 9006 this.graph = new HGraph(); |
7817 var block = this.graph.addNewBlock(); | 9007 var block = this.graph.addNewBlock(); |
7818 this.open(this.graph.entry); | 9008 this.open(this.graph.entry); |
7819 this.visitParameters(parameters); | 9009 this.visitParameters(parameters); |
7820 this.close(new HGoto()).addSuccessor(block); | 9010 this.close(new HGoto()).addSuccessor(block); |
7821 this.open(block); | 9011 this.open(block); |
7822 body.accept(this); | 9012 body.accept(this); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7855 SsaBuilder.prototype.visit = function(node) { | 9045 SsaBuilder.prototype.visit = function(node) { |
7856 if (node != null) node.accept(this); | 9046 if (node != null) node.accept(this); |
7857 } | 9047 } |
7858 SsaBuilder.prototype.visitParameters = function(parameters) { | 9048 SsaBuilder.prototype.visitParameters = function(parameters) { |
7859 var $0; | 9049 var $0; |
7860 var parameterIndex = 0; | 9050 var parameterIndex = 0; |
7861 for (var link = parameters.nodes; | 9051 for (var link = parameters.nodes; |
7862 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
Node())) { | 9052 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
Node())) { |
7863 var container = (($0 = link.get$head()) && $0.is$VariableDefinitions()); | 9053 var container = (($0 = link.get$head()) && $0.is$VariableDefinitions()); |
7864 var identifierLink = container.definitions.nodes; | 9054 var identifierLink = container.definitions.nodes; |
7865 $assert($notnull_bool(!$notnull_bool(identifierLink.isEmpty()) && identifier
Link.get$tail().isEmpty()), "!identifierLink.isEmpty() && identifierLink.tail.is
Empty()", "builder.dart", 115, 14); | 9055 $assert($notnull_bool(!$notnull_bool(identifierLink.isEmpty()) && identifier
Link.get$tail().isEmpty$0()), "!identifierLink.isEmpty() && identifierLink.tail.
isEmpty()", "builder.dart", 115, 14); |
7866 if (!(identifierLink.get$head() instanceof Identifier)) { | 9056 if (!(identifierLink.get$head() instanceof Identifier)) { |
7867 this.compiler.unimplemented("SsaBuilder.visitParameters non-identifier"); | 9057 this.compiler.unimplemented("SsaBuilder.visitParameters non-identifier"); |
7868 } | 9058 } |
7869 var parameterId = (($0 = identifierLink.get$head()) && $0.is$Identifier()); | 9059 var parameterId = (($0 = identifierLink.get$head()) && $0.is$Identifier()); |
7870 var element = (($0 = this.elements.$index(parameterId)) && $0.is$Element()); | 9060 var element = (($0 = this.elements.$index(parameterId)) && $0.is$Element()); |
7871 var parameterInstruction = new HParameter(parameterIndex++); | 9061 var parameterInstruction = new HParameter(parameterIndex++); |
7872 this.definitions.$setindex(element, parameterInstruction); | 9062 this.definitions.$setindex(element, parameterInstruction); |
7873 this.add(parameterInstruction); | 9063 this.add(parameterInstruction); |
7874 } | 9064 } |
7875 } | 9065 } |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8071 } | 9261 } |
8072 else if ($notnull_bool(node.get$isPropertyAccess())) { | 9262 else if ($notnull_bool(node.get$isPropertyAccess())) { |
8073 if (node.receiver != null) { | 9263 if (node.receiver != null) { |
8074 this.compiler.unimplemented("SsaBuilder.visitSend with receiver"); | 9264 this.compiler.unimplemented("SsaBuilder.visitSend with receiver"); |
8075 } | 9265 } |
8076 var element = (($0 = this.elements.$index(node)) && $0.is$Element()); | 9266 var element = (($0 = this.elements.$index(node)) && $0.is$Element()); |
8077 this.stack.add(this.definitions.$index(element)); | 9267 this.stack.add(this.definitions.$index(element)); |
8078 } | 9268 } |
8079 else { | 9269 else { |
8080 var link = node.get$arguments(); | 9270 var link = node.get$arguments(); |
8081 if (this.elements.$index(node).kind === const$244/*ElementKind.FOREIGN*/) { | 9271 if (this.elements.$index(node).kind === const$246/*ElementKind.FOREIGN*/) { |
8082 link = (($0 = link.get$tail()) && $0.is$Link$Node()); | 9272 link = (($0 = link.get$tail()) && $0.is$Link$Node()); |
8083 } | 9273 } |
8084 var arguments = []; | 9274 var arguments = []; |
8085 for (; !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.
is$Link$Node())) { | 9275 for (; !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.
is$Link$Node())) { |
8086 this.visit((($0 = link.get$head()) && $0.is$Node())); | 9276 this.visit((($0 = link.get$head()) && $0.is$Node())); |
8087 arguments.add(this.pop()); | 9277 arguments.add$1(this.pop()); |
8088 } | 9278 } |
8089 if (this.elements.$index(node).kind === const$244/*ElementKind.FOREIGN*/) { | 9279 if (this.elements.$index(node).kind === const$246/*ElementKind.FOREIGN*/) { |
8090 var literal = (($0 = node.get$arguments().get$head()) && $0.is$LiteralStri
ng()); | 9280 var literal = (($0 = node.get$arguments().get$head()) && $0.is$LiteralStri
ng()); |
8091 this.compiler.ensure((literal instanceof LiteralString)); | 9281 this.compiler.ensure((literal instanceof LiteralString)); |
8092 this.push(new HInvokeForeign(this.unquote(literal), arguments)); | 9282 this.push(new HInvokeForeign(this.unquote(literal), arguments)); |
8093 } | 9283 } |
8094 else { | 9284 else { |
8095 var selector = (($0 = node.selector) && $0.is$Identifier()); | 9285 var selector = (($0 = node.selector) && $0.is$Identifier()); |
8096 this.push(new HInvoke(selector.get$source(), arguments)); | 9286 this.push(new HInvoke(selector.get$source(), arguments)); |
8097 } | 9287 } |
8098 } | 9288 } |
8099 } | 9289 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8139 } | 9329 } |
8140 SsaBuilder.prototype.visitTypeAnnotation = function(node) { | 9330 SsaBuilder.prototype.visitTypeAnnotation = function(node) { |
8141 | 9331 |
8142 } | 9332 } |
8143 SsaBuilder.prototype.updateDefinition = function(node) { | 9333 SsaBuilder.prototype.updateDefinition = function(node) { |
8144 var $0; | 9334 var $0; |
8145 if (node.receiver != null) { | 9335 if (node.receiver != null) { |
8146 this.compiler.unimplemented("SsaBuilder: property access"); | 9336 this.compiler.unimplemented("SsaBuilder: property access"); |
8147 } | 9337 } |
8148 var link = node.get$arguments(); | 9338 var link = node.get$arguments(); |
8149 $assert($notnull_bool(!$notnull_bool(link.isEmpty()) && link.get$tail().isEmpt
y()), "!link.isEmpty() && link.tail.isEmpty()", "builder.dart", 456, 12); | 9339 $assert($notnull_bool(!$notnull_bool(link.isEmpty()) && link.get$tail().isEmpt
y$0()), "!link.isEmpty() && link.tail.isEmpty()", "builder.dart", 456, 12); |
8150 this.visit((($0 = link.get$head()) && $0.is$Node())); | 9340 this.visit((($0 = link.get$head()) && $0.is$Node())); |
8151 var value = this.pop(); | 9341 var value = this.pop(); |
8152 this.definitions.$setindex(this.elements.$index(node), value); | 9342 this.definitions.$setindex(this.elements.$index(node), value); |
8153 return value; | 9343 return value; |
8154 } | 9344 } |
8155 SsaBuilder.prototype.visitVariableDefinitions = function(node) { | 9345 SsaBuilder.prototype.visitVariableDefinitions = function(node) { |
8156 var $0; | 9346 var $0; |
8157 for (var link = node.definitions.nodes; | 9347 for (var link = node.definitions.nodes; |
8158 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
Node())) { | 9348 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
Node())) { |
8159 var definition = (($0 = link.get$head()) && $0.is$Node()); | 9349 var definition = (($0 = link.get$head()) && $0.is$Node()); |
8160 if ((definition instanceof Identifier)) { | 9350 if ((definition instanceof Identifier)) { |
8161 this.compiler.unimplemented("SsaBuilder.visitVariableDefinitions without i
nitial value"); | 9351 this.compiler.unimplemented("SsaBuilder.visitVariableDefinitions without i
nitial value"); |
8162 } | 9352 } |
8163 else { | 9353 else { |
8164 $assert((definition instanceof SendSet), "definition is SendSet", "builder
.dart", 472, 16); | 9354 $assert((definition instanceof SendSet), "definition is SendSet", "builder
.dart", 472, 16); |
8165 this.updateDefinition((definition && definition.is$SendSet())); | 9355 this.updateDefinition((definition && definition.is$SendSet())); |
8166 } | 9356 } |
8167 } | 9357 } |
8168 } | 9358 } |
| 9359 SsaBuilder.prototype.add$1 = function($0) { |
| 9360 return this.add(($0 && $0.is$HInstruction())); |
| 9361 }; |
| 9362 SsaBuilder.prototype.visit$1 = function($0) { |
| 9363 return this.visit(($0 && $0.is$Node())); |
| 9364 }; |
8169 // ********** Code for SsaCodeGeneratorTask ************** | 9365 // ********** Code for SsaCodeGeneratorTask ************** |
8170 function SsaCodeGeneratorTask(compiler) { | 9366 function SsaCodeGeneratorTask(compiler) { |
8171 CompilerTask.call(this, compiler); | 9367 CompilerTask.call(this, compiler); |
8172 // Initializers done | 9368 // Initializers done |
8173 } | 9369 } |
8174 $inherits(SsaCodeGeneratorTask, CompilerTask); | 9370 $inherits(SsaCodeGeneratorTask, CompilerTask); |
8175 SsaCodeGeneratorTask.prototype.get$name = function() { | 9371 SsaCodeGeneratorTask.prototype.get$name = function() { |
8176 return 'SSA code generator'; | 9372 return 'SSA code generator'; |
8177 } | 9373 } |
8178 SsaCodeGeneratorTask.prototype.generate = function(tree, graph) { | 9374 SsaCodeGeneratorTask.prototype.generate = function(tree, graph) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8211 } | 9407 } |
8212 return result; | 9408 return result; |
8213 } | 9409 } |
8214 // ********** Code for SsaCodeGenerator ************** | 9410 // ********** Code for SsaCodeGenerator ************** |
8215 function SsaCodeGenerator(compiler, buffer) { | 9411 function SsaCodeGenerator(compiler, buffer) { |
8216 this.indent = 0 | 9412 this.indent = 0 |
8217 this.compiler = compiler; | 9413 this.compiler = compiler; |
8218 this.buffer = buffer; | 9414 this.buffer = buffer; |
8219 // Initializers done | 9415 // Initializers done |
8220 } | 9416 } |
| 9417 SsaCodeGenerator.prototype.is$HVisitor = function(){return this;}; |
8221 SsaCodeGenerator.prototype.visitGraph = function(graph) { | 9418 SsaCodeGenerator.prototype.visitGraph = function(graph) { |
8222 this.currentGraph = graph; | 9419 this.currentGraph = graph; |
8223 this.indent++; | 9420 this.indent++; |
8224 this.visitBasicBlock(graph.entry); | 9421 this.visitBasicBlock(graph.entry); |
8225 } | 9422 } |
8226 SsaCodeGenerator.temporary = function(instruction) { | 9423 SsaCodeGenerator.temporary = function(instruction) { |
8227 return ('t' + instruction.id + ''); | 9424 return ('t' + instruction.id + ''); |
8228 } | 9425 } |
8229 SsaCodeGenerator.parameter = function(index) { | 9426 SsaCodeGenerator.parameter = function(index) { |
8230 return ('p' + index + ''); | 9427 return ('p' + index + ''); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8262 } | 9459 } |
8263 SsaCodeGenerator.prototype.use = function(argument) { | 9460 SsaCodeGenerator.prototype.use = function(argument) { |
8264 if ($notnull_bool(argument.generateAtUseSite())) { | 9461 if ($notnull_bool(argument.generateAtUseSite())) { |
8265 this.visit(argument); | 9462 this.visit(argument); |
8266 } | 9463 } |
8267 else { | 9464 else { |
8268 this.buffer.add(SsaCodeGenerator.temporary(argument)); | 9465 this.buffer.add(SsaCodeGenerator.temporary(argument)); |
8269 } | 9466 } |
8270 } | 9467 } |
8271 SsaCodeGenerator.prototype.visit = function(node) { | 9468 SsaCodeGenerator.prototype.visit = function(node) { |
8272 return node.accept(this); | 9469 return node.accept$1(this); |
8273 } | 9470 } |
8274 SsaCodeGenerator.prototype.visitAdd = function(node) { | 9471 SsaCodeGenerator.prototype.visitAdd = function(node) { |
8275 this.invoke(const$274/*const SourceString('\$add')*/, node.inputs); | 9472 this.invoke(const$274/*const SourceString('\$add')*/, node.inputs); |
8276 } | 9473 } |
8277 SsaCodeGenerator.prototype.visitBasicBlock = function(node) { | 9474 SsaCodeGenerator.prototype.visitBasicBlock = function(node) { |
8278 if ($notnull_bool(node.isLoopHeader)) { | 9475 if ($notnull_bool(node.isLoopHeader)) { |
8279 this.buffer.add('while(true) {\n'); | 9476 this.buffer.add('while(true) {\n'); |
8280 this.indent++; | 9477 this.indent++; |
8281 } | 9478 } |
8282 this.currentBlock = node; | 9479 this.currentBlock = node; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8419 } | 9616 } |
8420 SsaCodeGenerator.prototype.visitTruncatingDivide = function(node) { | 9617 SsaCodeGenerator.prototype.visitTruncatingDivide = function(node) { |
8421 this.invoke(const$280/*const SourceString('\$tdiv')*/, node.inputs); | 9618 this.invoke(const$280/*const SourceString('\$tdiv')*/, node.inputs); |
8422 } | 9619 } |
8423 SsaCodeGenerator.prototype.addIndentation = function() { | 9620 SsaCodeGenerator.prototype.addIndentation = function() { |
8424 for (var i = 0; | 9621 for (var i = 0; |
8425 i < this.indent; i++) { | 9622 i < this.indent; i++) { |
8426 this.buffer.add(' '); | 9623 this.buffer.add(' '); |
8427 } | 9624 } |
8428 } | 9625 } |
| 9626 SsaCodeGenerator.prototype.visit$1 = SsaCodeGenerator.prototype.visit; |
8429 // ********** Code for HGraphVisitor ************** | 9627 // ********** Code for HGraphVisitor ************** |
8430 function HGraphVisitor() { | 9628 function HGraphVisitor() { |
8431 // Initializers done | 9629 // Initializers done |
8432 } | 9630 } |
8433 HGraphVisitor.prototype.visitDominatorTree = function(graph) { | 9631 HGraphVisitor.prototype.visitDominatorTree = function(graph) { |
8434 var $this = this; // closure support | 9632 var $this = this; // closure support |
8435 function visitBasicBlockAndSuccessors(block) { | 9633 function visitBasicBlockAndSuccessors(block) { |
8436 var $0; | 9634 var $0; |
8437 $this.visitBasicBlock(block); | 9635 $this.visitBasicBlock(block); |
8438 var dominated = block.dominatedBlocks; | 9636 var dominated = block.dominatedBlocks; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8530 var validator = new HValidator(); | 9728 var validator = new HValidator(); |
8531 validator.visitGraph(this); | 9729 validator.visitGraph(this); |
8532 return validator.isValid; | 9730 return validator.isValid; |
8533 } | 9731 } |
8534 // ********** Code for HBaseVisitor ************** | 9732 // ********** Code for HBaseVisitor ************** |
8535 function HBaseVisitor() { | 9733 function HBaseVisitor() { |
8536 HGraphVisitor.call(this); | 9734 HGraphVisitor.call(this); |
8537 // Initializers done | 9735 // Initializers done |
8538 } | 9736 } |
8539 $inherits(HBaseVisitor, HGraphVisitor); | 9737 $inherits(HBaseVisitor, HGraphVisitor); |
| 9738 HBaseVisitor.prototype.is$HVisitor = function(){return this;}; |
8540 HBaseVisitor.prototype.visitBasicBlock = function(node) { | 9739 HBaseVisitor.prototype.visitBasicBlock = function(node) { |
8541 this.currentBlock = node; | 9740 this.currentBlock = node; |
8542 var instruction = node.first; | 9741 var instruction = node.first; |
8543 while (instruction != null) { | 9742 while (instruction != null) { |
8544 instruction.accept(this); | 9743 instruction.accept(this); |
8545 instruction = instruction.next; | 9744 instruction = instruction.next; |
8546 } | 9745 } |
8547 } | 9746 } |
8548 HBaseVisitor.prototype.visitInstruction = function(HInstruction) { | 9747 HBaseVisitor.prototype.visitInstruction = function(HInstruction) { |
8549 | 9748 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8619 // Initializers done | 9818 // Initializers done |
8620 } | 9819 } |
8621 HBasicBlock.withId$ctor = function(id) { | 9820 HBasicBlock.withId$ctor = function(id) { |
8622 this.status = 0/*HBasicBlock.STATUS_NEW*/ | 9821 this.status = 0/*HBasicBlock.STATUS_NEW*/ |
8623 this.isLoopHeader = false | 9822 this.isLoopHeader = false |
8624 this.first = null | 9823 this.first = null |
8625 this.last = null | 9824 this.last = null |
8626 this.dominator = null | 9825 this.dominator = null |
8627 this.id = id; | 9826 this.id = id; |
8628 this.predecessors = []; | 9827 this.predecessors = []; |
8629 this.successors = const$15/*const []*/; | 9828 this.successors = const$5/*const <HInstruction>[]*/; |
8630 this.dominatedBlocks = []; | 9829 this.dominatedBlocks = []; |
8631 // Initializers done | 9830 // Initializers done |
8632 } | 9831 } |
8633 HBasicBlock.withId$ctor.prototype = HBasicBlock.prototype; | 9832 HBasicBlock.withId$ctor.prototype = HBasicBlock.prototype; |
8634 HBasicBlock.prototype.is$HBasicBlock = function(){return this;}; | 9833 HBasicBlock.prototype.is$HBasicBlock = function(){return this;}; |
8635 HBasicBlock.prototype.isNew = function() { | 9834 HBasicBlock.prototype.isNew = function() { |
8636 return this.status == 0/*HBasicBlock.STATUS_NEW*/; | 9835 return this.status == 0/*HBasicBlock.STATUS_NEW*/; |
8637 } | 9836 } |
8638 HBasicBlock.prototype.isOpen = function() { | 9837 HBasicBlock.prototype.isOpen = function() { |
8639 return this.status == 1/*HBasicBlock.STATUS_OPEN*/; | 9838 return this.status == 1/*HBasicBlock.STATUS_OPEN*/; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8777 second = second.dominator; | 9976 second = second.dominator; |
8778 } | 9977 } |
8779 $assert(first != null && second != null, "first !== null && second !== nul
l", "nodes.dart", 364, 16); | 9978 $assert(first != null && second != null, "first !== null && second !== nul
l", "nodes.dart", 364, 16); |
8780 } | 9979 } |
8781 if (this.dominator !== first) { | 9980 if (this.dominator !== first) { |
8782 this.dominator.removeDominatedBlock(this); | 9981 this.dominator.removeDominatedBlock(this); |
8783 first.addDominatedBlock(this); | 9982 first.addDominatedBlock(this); |
8784 } | 9983 } |
8785 } | 9984 } |
8786 } | 9985 } |
| 9986 HBasicBlock.prototype.accept$1 = function($0) { |
| 9987 return this.accept(($0 && $0.is$HVisitor())); |
| 9988 }; |
| 9989 HBasicBlock.prototype.add$1 = function($0) { |
| 9990 return this.add(($0 && $0.is$HInstruction())); |
| 9991 }; |
| 9992 HBasicBlock.prototype.isExitBlock$0 = function() { |
| 9993 return this.isExitBlock(); |
| 9994 }; |
| 9995 HBasicBlock.prototype.last$0 = function() { |
| 9996 return this.last(); |
| 9997 }; |
8787 // ********** Code for HInstruction ************** | 9998 // ********** Code for HInstruction ************** |
8788 function HInstruction(inputs) { | 9999 function HInstruction(inputs) { |
8789 this._usedBy = null | 10000 this._usedBy = null |
8790 this.previous = null | 10001 this.previous = null |
8791 this.next = null | 10002 this.next = null |
8792 this.flags = 0 | 10003 this.flags = 0 |
8793 this.inputs = inputs; | 10004 this.inputs = inputs; |
8794 // Initializers done | 10005 // Initializers done |
8795 this.prepareGvn(); | 10006 this.prepareGvn(); |
8796 } | 10007 } |
(...skipping 22 matching lines...) Expand all Loading... |
8819 HInstruction.prototype.generateAtUseSite = function() { | 10030 HInstruction.prototype.generateAtUseSite = function() { |
8820 return this.getFlag(2/*HInstruction.FLAG_GENERATE_AT_USE_SITE*/); | 10031 return this.getFlag(2/*HInstruction.FLAG_GENERATE_AT_USE_SITE*/); |
8821 } | 10032 } |
8822 HInstruction.prototype.setGenerateAtUseSite = function() { | 10033 HInstruction.prototype.setGenerateAtUseSite = function() { |
8823 this.setFlag(2/*HInstruction.FLAG_GENERATE_AT_USE_SITE*/); | 10034 this.setFlag(2/*HInstruction.FLAG_GENERATE_AT_USE_SITE*/); |
8824 } | 10035 } |
8825 HInstruction.prototype.setUseGvn = function() { | 10036 HInstruction.prototype.setUseGvn = function() { |
8826 this.setFlag(3/*HInstruction.FLAG_USE_GVN*/); | 10037 this.setFlag(3/*HInstruction.FLAG_USE_GVN*/); |
8827 } | 10038 } |
8828 HInstruction.prototype.get$usedBy = function() { | 10039 HInstruction.prototype.get$usedBy = function() { |
8829 if (this._usedBy == null) return const$15/*const []*/; | 10040 if (this._usedBy == null) return const$5/*const <HInstruction>[]*/; |
8830 return this._usedBy; | 10041 return this._usedBy; |
8831 } | 10042 } |
8832 HInstruction.prototype.isInBasicBlock = function() { | 10043 HInstruction.prototype.isInBasicBlock = function() { |
8833 return this._usedBy != null; | 10044 return this._usedBy != null; |
8834 } | 10045 } |
8835 HInstruction.prototype.notifyAddedToBlock = function() { | 10046 HInstruction.prototype.notifyAddedToBlock = function() { |
8836 $assert(!$notnull_bool(this.isInBasicBlock()), "!isInBasicBlock()", "nodes.dar
t", 472, 12); | 10047 $assert(!$notnull_bool(this.isInBasicBlock()), "!isInBasicBlock()", "nodes.dar
t", 472, 12); |
8837 this._usedBy = []; | 10048 this._usedBy = []; |
8838 for (var i = 0; | 10049 for (var i = 0; |
8839 i < this.inputs.length; i++) { | 10050 i < this.inputs.length; i++) { |
8840 $assert(this.inputs.$index(i).isInBasicBlock(), "inputs[i].isInBasicBlock()"
, "nodes.dart", 476, 14); | 10051 $assert(this.inputs.$index(i).isInBasicBlock$0(), "inputs[i].isInBasicBlock(
)", "nodes.dart", 476, 14); |
8841 this.inputs.$index(i).get$usedBy().add(this); | 10052 this.inputs.$index(i).get$usedBy().add(this); |
8842 } | 10053 } |
8843 $assert(this.isValid(), "isValid()", "nodes.dart", 479, 12); | 10054 $assert(this.isValid(), "isValid()", "nodes.dart", 479, 12); |
8844 } | 10055 } |
8845 HInstruction.prototype.notifyRemovedFromBlock = function() { | 10056 HInstruction.prototype.notifyRemovedFromBlock = function() { |
8846 $assert(this.isInBasicBlock(), "isInBasicBlock()", "nodes.dart", 483, 12); | 10057 $assert(this.isInBasicBlock(), "isInBasicBlock()", "nodes.dart", 483, 12); |
8847 $assert(this.get$usedBy().isEmpty(), "usedBy.isEmpty()", "nodes.dart", 484, 12
); | 10058 $assert(this.get$usedBy().isEmpty(), "usedBy.isEmpty()", "nodes.dart", 484, 12
); |
8848 for (var i = 0; | 10059 for (var i = 0; |
8849 i < this.inputs.length; i++) { | 10060 i < this.inputs.length; i++) { |
8850 var inputUsedBy = this.inputs.$index(i).get$usedBy(); | 10061 var inputUsedBy = this.inputs.$index(i).get$usedBy(); |
(...skipping 13 matching lines...) Expand all Loading... |
8864 return false; | 10075 return false; |
8865 } | 10076 } |
8866 HInstruction.prototype.isLiteralString = function() { | 10077 HInstruction.prototype.isLiteralString = function() { |
8867 return false; | 10078 return false; |
8868 } | 10079 } |
8869 HInstruction.prototype.isValid = function() { | 10080 HInstruction.prototype.isValid = function() { |
8870 var validator = new HValidator(); | 10081 var validator = new HValidator(); |
8871 validator.visitInstruction(this); | 10082 validator.visitInstruction(this); |
8872 return validator.isValid; | 10083 return validator.isValid; |
8873 } | 10084 } |
| 10085 HInstruction.prototype.accept$1 = function($0) { |
| 10086 return this.accept(($0 && $0.is$HVisitor())); |
| 10087 }; |
| 10088 HInstruction.prototype.isInBasicBlock$0 = function() { |
| 10089 return this.isInBasicBlock(); |
| 10090 }; |
| 10091 HInstruction.prototype.isLiteralNumber$0 = function() { |
| 10092 return this.isLiteralNumber(); |
| 10093 }; |
| 10094 HInstruction.prototype.isLiteralString$0 = function() { |
| 10095 return this.isLiteralString(); |
| 10096 }; |
| 10097 HInstruction.prototype.next$0 = function() { |
| 10098 return this.next(); |
| 10099 }; |
| 10100 HInstruction.prototype.setGenerateAtUseSite$0 = function() { |
| 10101 return this.setGenerateAtUseSite(); |
| 10102 }; |
8874 // ********** Code for HConditionalBranch ************** | 10103 // ********** Code for HConditionalBranch ************** |
8875 function HConditionalBranch(inputs) { | 10104 function HConditionalBranch(inputs) { |
8876 HControlFlow.call(this, inputs); | 10105 HControlFlow.call(this, inputs); |
8877 // Initializers done | 10106 // Initializers done |
8878 } | 10107 } |
8879 $inherits(HConditionalBranch, HControlFlow); | 10108 $inherits(HConditionalBranch, HControlFlow); |
| 10109 HConditionalBranch.prototype.toString$0 = function() { |
| 10110 return this.toString(); |
| 10111 }; |
8880 // ********** Code for HControlFlow ************** | 10112 // ********** Code for HControlFlow ************** |
8881 function HControlFlow(inputs) { | 10113 function HControlFlow(inputs) { |
8882 HInstruction.call(this, inputs); | 10114 HInstruction.call(this, inputs); |
8883 // Initializers done | 10115 // Initializers done |
8884 } | 10116 } |
8885 $inherits(HControlFlow, HInstruction); | 10117 $inherits(HControlFlow, HInstruction); |
| 10118 HControlFlow.prototype.toString$0 = function() { |
| 10119 return this.toString(); |
| 10120 }; |
8886 // ********** Code for HInvoke ************** | 10121 // ********** Code for HInvoke ************** |
8887 function HInvoke(selector, inputs) { | 10122 function HInvoke(selector, inputs) { |
8888 this.selector = selector; | 10123 this.selector = selector; |
8889 HInstruction.call(this, inputs); | 10124 HInstruction.call(this, inputs); |
8890 // Initializers done | 10125 // Initializers done |
8891 } | 10126 } |
8892 $inherits(HInvoke, HInstruction); | 10127 $inherits(HInvoke, HInstruction); |
8893 HInvoke.prototype.toString = function() { | 10128 HInvoke.prototype.toString = function() { |
8894 return ('invoke: ' + this.selector + ''); | 10129 return ('invoke: ' + this.selector + ''); |
8895 } | 10130 } |
8896 HInvoke.prototype.accept = function(visitor) { | 10131 HInvoke.prototype.accept = function(visitor) { |
8897 return visitor.visitInvoke(this); | 10132 return visitor.visitInvoke(this); |
8898 } | 10133 } |
| 10134 HInvoke.prototype.accept$1 = function($0) { |
| 10135 return this.accept(($0 && $0.is$HVisitor())); |
| 10136 }; |
| 10137 HInvoke.prototype.toString$0 = function() { |
| 10138 return this.toString(); |
| 10139 }; |
8899 // ********** Code for HInvokeForeign ************** | 10140 // ********** Code for HInvokeForeign ************** |
8900 function HInvokeForeign(code, inputs) { | 10141 function HInvokeForeign(code, inputs) { |
8901 HInvoke.call(this, code, inputs); | 10142 HInvoke.call(this, code, inputs); |
8902 // Initializers done | 10143 // Initializers done |
8903 } | 10144 } |
8904 $inherits(HInvokeForeign, HInvoke); | 10145 $inherits(HInvokeForeign, HInvoke); |
8905 HInvokeForeign.prototype.accept = function(visitor) { | 10146 HInvokeForeign.prototype.accept = function(visitor) { |
8906 return visitor.visitInvokeForeign(this); | 10147 return visitor.visitInvokeForeign(this); |
8907 } | 10148 } |
| 10149 HInvokeForeign.prototype.accept$1 = function($0) { |
| 10150 return this.accept(($0 && $0.is$HVisitor())); |
| 10151 }; |
8908 // ********** Code for HArithmetic ************** | 10152 // ********** Code for HArithmetic ************** |
8909 function HArithmetic(selector, inputs) { | 10153 function HArithmetic(selector, inputs) { |
8910 HInvoke.call(this, selector, inputs); | 10154 HInvoke.call(this, selector, inputs); |
8911 // Initializers done | 10155 // Initializers done |
8912 } | 10156 } |
8913 $inherits(HArithmetic, HInvoke); | 10157 $inherits(HArithmetic, HInvoke); |
8914 HArithmetic.prototype.prepareGvn = function() { | 10158 HArithmetic.prototype.prepareGvn = function() { |
8915 if (!(this.inputs.$index(0) instanceof HLiteral)) return; | 10159 if (!(this.inputs.$index(0) instanceof HLiteral)) return; |
8916 this.clearAllSideEffects(); | 10160 this.clearAllSideEffects(); |
8917 this.setUseGvn(); | 10161 this.setUseGvn(); |
8918 } | 10162 } |
8919 // ********** Code for HAdd ************** | 10163 // ********** Code for HAdd ************** |
8920 function HAdd(inputs) { | 10164 function HAdd(inputs) { |
8921 HArithmetic.call(this, const$247/*const SourceString('+')*/, inputs); | 10165 HArithmetic.call(this, const$249/*const SourceString('+')*/, inputs); |
8922 // Initializers done | 10166 // Initializers done |
8923 } | 10167 } |
8924 $inherits(HAdd, HArithmetic); | 10168 $inherits(HAdd, HArithmetic); |
8925 HAdd.prototype.prepareGvn = function() { | 10169 HAdd.prototype.prepareGvn = function() { |
8926 if (!$notnull_bool(this.inputs.$index(0).isLiteralNumber())) return; | 10170 if (!$notnull_bool(this.inputs.$index(0).isLiteralNumber$0())) return; |
8927 this.clearAllSideEffects(); | 10171 this.clearAllSideEffects(); |
8928 this.setUseGvn(); | 10172 this.setUseGvn(); |
8929 } | 10173 } |
8930 HAdd.prototype.accept = function(visitor) { | 10174 HAdd.prototype.accept = function(visitor) { |
8931 return visitor.visitAdd(this); | 10175 return visitor.visitAdd(this); |
8932 } | 10176 } |
8933 HAdd.prototype.evaluate = function(a, b) { | 10177 HAdd.prototype.evaluate = function(a, b) { |
8934 return a + b; | 10178 return a + b; |
8935 } | 10179 } |
| 10180 HAdd.prototype.accept$1 = function($0) { |
| 10181 return this.accept(($0 && $0.is$HVisitor())); |
| 10182 }; |
8936 // ********** Code for HDivide ************** | 10183 // ********** Code for HDivide ************** |
8937 function HDivide(inputs) { | 10184 function HDivide(inputs) { |
8938 HArithmetic.call(this, const$250/*const SourceString('/')*/, inputs); | 10185 HArithmetic.call(this, const$252/*const SourceString('/')*/, inputs); |
8939 // Initializers done | 10186 // Initializers done |
8940 } | 10187 } |
8941 $inherits(HDivide, HArithmetic); | 10188 $inherits(HDivide, HArithmetic); |
8942 HDivide.prototype.accept = function(visitor) { | 10189 HDivide.prototype.accept = function(visitor) { |
8943 return visitor.visitDivide(this); | 10190 return visitor.visitDivide(this); |
8944 } | 10191 } |
8945 HDivide.prototype.evaluate = function(a, b) { | 10192 HDivide.prototype.evaluate = function(a, b) { |
8946 return a / b; | 10193 return a / b; |
8947 } | 10194 } |
| 10195 HDivide.prototype.accept$1 = function($0) { |
| 10196 return this.accept(($0 && $0.is$HVisitor())); |
| 10197 }; |
8948 // ********** Code for HMultiply ************** | 10198 // ********** Code for HMultiply ************** |
8949 function HMultiply(inputs) { | 10199 function HMultiply(inputs) { |
8950 HArithmetic.call(this, const$249/*const SourceString('*')*/, inputs); | 10200 HArithmetic.call(this, const$251/*const SourceString('*')*/, inputs); |
8951 // Initializers done | 10201 // Initializers done |
8952 } | 10202 } |
8953 $inherits(HMultiply, HArithmetic); | 10203 $inherits(HMultiply, HArithmetic); |
8954 HMultiply.prototype.accept = function(visitor) { | 10204 HMultiply.prototype.accept = function(visitor) { |
8955 return visitor.visitMultiply(this); | 10205 return visitor.visitMultiply(this); |
8956 } | 10206 } |
8957 HMultiply.prototype.evaluate = function(a, b) { | 10207 HMultiply.prototype.evaluate = function(a, b) { |
8958 return a * b; | 10208 return a * b; |
8959 } | 10209 } |
| 10210 HMultiply.prototype.accept$1 = function($0) { |
| 10211 return this.accept(($0 && $0.is$HVisitor())); |
| 10212 }; |
8960 // ********** Code for HSubtract ************** | 10213 // ********** Code for HSubtract ************** |
8961 function HSubtract(inputs) { | 10214 function HSubtract(inputs) { |
8962 HArithmetic.call(this, const$248/*const SourceString('-')*/, inputs); | 10215 HArithmetic.call(this, const$250/*const SourceString('-')*/, inputs); |
8963 // Initializers done | 10216 // Initializers done |
8964 } | 10217 } |
8965 $inherits(HSubtract, HArithmetic); | 10218 $inherits(HSubtract, HArithmetic); |
8966 HSubtract.prototype.accept = function(visitor) { | 10219 HSubtract.prototype.accept = function(visitor) { |
8967 return visitor.visitSubtract(this); | 10220 return visitor.visitSubtract(this); |
8968 } | 10221 } |
8969 HSubtract.prototype.evaluate = function(a, b) { | 10222 HSubtract.prototype.evaluate = function(a, b) { |
8970 return a - b; | 10223 return a - b; |
8971 } | 10224 } |
| 10225 HSubtract.prototype.accept$1 = function($0) { |
| 10226 return this.accept(($0 && $0.is$HVisitor())); |
| 10227 }; |
8972 // ********** Code for HTruncatingDivide ************** | 10228 // ********** Code for HTruncatingDivide ************** |
8973 function HTruncatingDivide(inputs) { | 10229 function HTruncatingDivide(inputs) { |
8974 HArithmetic.call(this, const$252/*const SourceString('~/')*/, inputs); | 10230 HArithmetic.call(this, const$254/*const SourceString('~/')*/, inputs); |
8975 // Initializers done | 10231 // Initializers done |
8976 } | 10232 } |
8977 $inherits(HTruncatingDivide, HArithmetic); | 10233 $inherits(HTruncatingDivide, HArithmetic); |
8978 HTruncatingDivide.prototype.accept = function(visitor) { | 10234 HTruncatingDivide.prototype.accept = function(visitor) { |
8979 return visitor.visitTruncatingDivide(this); | 10235 return visitor.visitTruncatingDivide(this); |
8980 } | 10236 } |
8981 HTruncatingDivide.prototype.evaluate = function(a, b) { | 10237 HTruncatingDivide.prototype.evaluate = function(a, b) { |
8982 return $truncdiv(a, b); | 10238 return $truncdiv(a, b); |
8983 } | 10239 } |
| 10240 HTruncatingDivide.prototype.accept$1 = function($0) { |
| 10241 return this.accept(($0 && $0.is$HVisitor())); |
| 10242 }; |
8984 // ********** Code for HEquals ************** | 10243 // ********** Code for HEquals ************** |
8985 function HEquals(inputs) { | 10244 function HEquals(inputs) { |
8986 HInvoke.call(this, const$253/*const SourceString('==')*/, inputs); | 10245 HInvoke.call(this, const$255/*const SourceString('==')*/, inputs); |
8987 // Initializers done | 10246 // Initializers done |
8988 } | 10247 } |
8989 $inherits(HEquals, HInvoke); | 10248 $inherits(HEquals, HInvoke); |
8990 HEquals.prototype.prepareGvn = function() { | 10249 HEquals.prototype.prepareGvn = function() { |
8991 if (!(this.inputs.$index(0) instanceof HLiteral)) return; | 10250 if (!(this.inputs.$index(0) instanceof HLiteral)) return; |
8992 this.clearAllSideEffects(); | 10251 this.clearAllSideEffects(); |
8993 this.setUseGvn(); | 10252 this.setUseGvn(); |
8994 } | 10253 } |
8995 HEquals.prototype.accept = function(visitor) { | 10254 HEquals.prototype.accept = function(visitor) { |
8996 return visitor.visitEquals(this); | 10255 return visitor.visitEquals(this); |
8997 } | 10256 } |
| 10257 HEquals.prototype.accept$1 = function($0) { |
| 10258 return this.accept(($0 && $0.is$HVisitor())); |
| 10259 }; |
8998 // ********** Code for HExit ************** | 10260 // ********** Code for HExit ************** |
8999 function HExit() { | 10261 function HExit() { |
9000 HControlFlow.call(this, const$15/*const []*/); | 10262 HControlFlow.call(this, const$5/*const <HInstruction>[]*/); |
9001 // Initializers done | 10263 // Initializers done |
9002 } | 10264 } |
9003 $inherits(HExit, HControlFlow); | 10265 $inherits(HExit, HControlFlow); |
9004 HExit.prototype.toString = function() { | 10266 HExit.prototype.toString = function() { |
9005 return 'exit'; | 10267 return 'exit'; |
9006 } | 10268 } |
9007 HExit.prototype.accept = function(visitor) { | 10269 HExit.prototype.accept = function(visitor) { |
9008 return visitor.visitExit(this); | 10270 return visitor.visitExit(this); |
9009 } | 10271 } |
| 10272 HExit.prototype.accept$1 = function($0) { |
| 10273 return this.accept(($0 && $0.is$HVisitor())); |
| 10274 }; |
| 10275 HExit.prototype.toString$0 = function() { |
| 10276 return this.toString(); |
| 10277 }; |
9010 // ********** Code for HGoto ************** | 10278 // ********** Code for HGoto ************** |
9011 function HGoto() { | 10279 function HGoto() { |
9012 HControlFlow.call(this, const$15/*const []*/); | 10280 HControlFlow.call(this, const$5/*const <HInstruction>[]*/); |
9013 // Initializers done | 10281 // Initializers done |
9014 } | 10282 } |
9015 $inherits(HGoto, HControlFlow); | 10283 $inherits(HGoto, HControlFlow); |
9016 HGoto.prototype.toString = function() { | 10284 HGoto.prototype.toString = function() { |
9017 return 'goto'; | 10285 return 'goto'; |
9018 } | 10286 } |
9019 HGoto.prototype.accept = function(visitor) { | 10287 HGoto.prototype.accept = function(visitor) { |
9020 return visitor.visitGoto(this); | 10288 return visitor.visitGoto(this); |
9021 } | 10289 } |
| 10290 HGoto.prototype.accept$1 = function($0) { |
| 10291 return this.accept(($0 && $0.is$HVisitor())); |
| 10292 }; |
| 10293 HGoto.prototype.toString$0 = function() { |
| 10294 return this.toString(); |
| 10295 }; |
9022 // ********** Code for HIf ************** | 10296 // ********** Code for HIf ************** |
9023 function HIf(condition, hasElse) { | 10297 function HIf(condition, hasElse) { |
9024 this.hasElse = hasElse; | 10298 this.hasElse = hasElse; |
9025 HConditionalBranch.call(this, [condition]); | 10299 HConditionalBranch.call(this, [condition]); |
9026 // Initializers done | 10300 // Initializers done |
9027 } | 10301 } |
9028 $inherits(HIf, HConditionalBranch); | 10302 $inherits(HIf, HConditionalBranch); |
9029 HIf.prototype.toString = function() { | 10303 HIf.prototype.toString = function() { |
9030 return 'if'; | 10304 return 'if'; |
9031 } | 10305 } |
9032 HIf.prototype.accept = function(visitor) { | 10306 HIf.prototype.accept = function(visitor) { |
9033 return visitor.visitIf(this); | 10307 return visitor.visitIf(this); |
9034 } | 10308 } |
| 10309 HIf.prototype.accept$1 = function($0) { |
| 10310 return this.accept(($0 && $0.is$HVisitor())); |
| 10311 }; |
| 10312 HIf.prototype.toString$0 = function() { |
| 10313 return this.toString(); |
| 10314 }; |
9035 // ********** Code for HLoopBranch ************** | 10315 // ********** Code for HLoopBranch ************** |
9036 function HLoopBranch(condition) { | 10316 function HLoopBranch(condition) { |
9037 HConditionalBranch.call(this, [condition]); | 10317 HConditionalBranch.call(this, [condition]); |
9038 // Initializers done | 10318 // Initializers done |
9039 } | 10319 } |
9040 $inherits(HLoopBranch, HConditionalBranch); | 10320 $inherits(HLoopBranch, HConditionalBranch); |
9041 HLoopBranch.prototype.toString = function() { | 10321 HLoopBranch.prototype.toString = function() { |
9042 return 'loop-branch'; | 10322 return 'loop-branch'; |
9043 } | 10323 } |
9044 HLoopBranch.prototype.accept = function(visitor) { | 10324 HLoopBranch.prototype.accept = function(visitor) { |
9045 return visitor.visitLoopBranch(this); | 10325 return visitor.visitLoopBranch(this); |
9046 } | 10326 } |
| 10327 HLoopBranch.prototype.accept$1 = function($0) { |
| 10328 return this.accept(($0 && $0.is$HVisitor())); |
| 10329 }; |
| 10330 HLoopBranch.prototype.toString$0 = function() { |
| 10331 return this.toString(); |
| 10332 }; |
9047 // ********** Code for HLiteral ************** | 10333 // ********** Code for HLiteral ************** |
9048 function HLiteral(value) { | 10334 function HLiteral(value) { |
9049 this.value = value; | 10335 this.value = value; |
9050 HInstruction.call(this, []); | 10336 HInstruction.call(this, []); |
9051 // Initializers done | 10337 // Initializers done |
9052 } | 10338 } |
9053 $inherits(HLiteral, HInstruction); | 10339 $inherits(HLiteral, HInstruction); |
9054 HLiteral.prototype.is$HLiteral = function(){return this;}; | 10340 HLiteral.prototype.is$HLiteral = function(){return this;}; |
9055 HLiteral.prototype.get$value = function() { return this.value; }; | 10341 HLiteral.prototype.get$value = function() { return this.value; }; |
9056 HLiteral.prototype.prepareGvn = function() { | 10342 HLiteral.prototype.prepareGvn = function() { |
9057 this.clearAllSideEffects(); | 10343 this.clearAllSideEffects(); |
9058 this.setUseGvn(); | 10344 this.setUseGvn(); |
9059 } | 10345 } |
9060 HLiteral.prototype.toString = function() { | 10346 HLiteral.prototype.toString = function() { |
9061 return ('literal: ' + this.value + ''); | 10347 return ('literal: ' + this.value + ''); |
9062 } | 10348 } |
9063 HLiteral.prototype.accept = function(visitor) { | 10349 HLiteral.prototype.accept = function(visitor) { |
9064 return visitor.visitLiteral(this); | 10350 return visitor.visitLiteral(this); |
9065 } | 10351 } |
9066 HLiteral.prototype.isLiteralNumber = function() { | 10352 HLiteral.prototype.isLiteralNumber = function() { |
9067 return (typeof(this.value) == 'number'); | 10353 return (typeof(this.value) == 'number'); |
9068 } | 10354 } |
9069 HLiteral.prototype.isLiteralString = function() { | 10355 HLiteral.prototype.isLiteralString = function() { |
9070 var $0; | 10356 var $0; |
9071 return !!(($0 = this.value) && $0.is$SourceString); | 10357 return !!(($0 = this.value) && $0.is$SourceString); |
9072 } | 10358 } |
| 10359 HLiteral.prototype.accept$1 = function($0) { |
| 10360 return this.accept(($0 && $0.is$HVisitor())); |
| 10361 }; |
| 10362 HLiteral.prototype.isLiteralNumber$0 = function() { |
| 10363 return this.isLiteralNumber(); |
| 10364 }; |
| 10365 HLiteral.prototype.isLiteralString$0 = function() { |
| 10366 return this.isLiteralString(); |
| 10367 }; |
| 10368 HLiteral.prototype.toString$0 = function() { |
| 10369 return this.toString(); |
| 10370 }; |
9073 // ********** Code for HParameter ************** | 10371 // ********** Code for HParameter ************** |
9074 function HParameter(parameterIndex) { | 10372 function HParameter(parameterIndex) { |
9075 this.parameterIndex = parameterIndex; | 10373 this.parameterIndex = parameterIndex; |
9076 HInstruction.call(this, []); | 10374 HInstruction.call(this, []); |
9077 // Initializers done | 10375 // Initializers done |
9078 } | 10376 } |
9079 $inherits(HParameter, HInstruction); | 10377 $inherits(HParameter, HInstruction); |
9080 HParameter.prototype.prepareGvn = function() { | 10378 HParameter.prototype.prepareGvn = function() { |
9081 this.clearAllSideEffects(); | 10379 this.clearAllSideEffects(); |
9082 } | 10380 } |
9083 HParameter.prototype.toString = function() { | 10381 HParameter.prototype.toString = function() { |
9084 return ('parameter ' + this.parameterIndex + ''); | 10382 return ('parameter ' + this.parameterIndex + ''); |
9085 } | 10383 } |
9086 HParameter.prototype.accept = function(visitor) { | 10384 HParameter.prototype.accept = function(visitor) { |
9087 return visitor.visitParameter(this); | 10385 return visitor.visitParameter(this); |
9088 } | 10386 } |
| 10387 HParameter.prototype.accept$1 = function($0) { |
| 10388 return this.accept(($0 && $0.is$HVisitor())); |
| 10389 }; |
| 10390 HParameter.prototype.toString$0 = function() { |
| 10391 return this.toString(); |
| 10392 }; |
9089 // ********** Code for HPhi ************** | 10393 // ********** Code for HPhi ************** |
9090 function HPhi(input1, input2) { | 10394 function HPhi(input1, input2) { |
9091 HInstruction.call(this, [input1, input2]); | 10395 HInstruction.call(this, [input1, input2]); |
9092 // Initializers done | 10396 // Initializers done |
9093 } | 10397 } |
9094 $inherits(HPhi, HInstruction); | 10398 $inherits(HPhi, HInstruction); |
9095 HPhi.prototype.is$HPhi = function(){return this;}; | 10399 HPhi.prototype.is$HPhi = function(){return this;}; |
9096 HPhi.prototype.toString = function() { | 10400 HPhi.prototype.toString = function() { |
9097 return 'phi'; | 10401 return 'phi'; |
9098 } | 10402 } |
9099 HPhi.prototype.accept = function(visitor) { | 10403 HPhi.prototype.accept = function(visitor) { |
9100 return visitor.visitPhi(this); | 10404 return visitor.visitPhi(this); |
9101 } | 10405 } |
| 10406 HPhi.prototype.accept$1 = function($0) { |
| 10407 return this.accept(($0 && $0.is$HVisitor())); |
| 10408 }; |
| 10409 HPhi.prototype.toString$0 = function() { |
| 10410 return this.toString(); |
| 10411 }; |
9102 // ********** Code for HReturn ************** | 10412 // ********** Code for HReturn ************** |
9103 function HReturn(value) { | 10413 function HReturn(value) { |
9104 HControlFlow.call(this, [value]); | 10414 HControlFlow.call(this, [value]); |
9105 // Initializers done | 10415 // Initializers done |
9106 } | 10416 } |
9107 $inherits(HReturn, HControlFlow); | 10417 $inherits(HReturn, HControlFlow); |
9108 HReturn.prototype.toString = function() { | 10418 HReturn.prototype.toString = function() { |
9109 return 'return'; | 10419 return 'return'; |
9110 } | 10420 } |
9111 HReturn.prototype.accept = function(visitor) { | 10421 HReturn.prototype.accept = function(visitor) { |
9112 return visitor.visitReturn(this); | 10422 return visitor.visitReturn(this); |
9113 } | 10423 } |
| 10424 HReturn.prototype.accept$1 = function($0) { |
| 10425 return this.accept(($0 && $0.is$HVisitor())); |
| 10426 }; |
| 10427 HReturn.prototype.toString$0 = function() { |
| 10428 return this.toString(); |
| 10429 }; |
9114 // ********** Code for HThrow ************** | 10430 // ********** Code for HThrow ************** |
9115 function HThrow(value) { | 10431 function HThrow(value) { |
9116 HControlFlow.call(this, [value]); | 10432 HControlFlow.call(this, [value]); |
9117 // Initializers done | 10433 // Initializers done |
9118 } | 10434 } |
9119 $inherits(HThrow, HControlFlow); | 10435 $inherits(HThrow, HControlFlow); |
9120 HThrow.prototype.toString = function() { | 10436 HThrow.prototype.toString = function() { |
9121 return 'throw'; | 10437 return 'throw'; |
9122 } | 10438 } |
9123 HThrow.prototype.accept = function(visitor) { | 10439 HThrow.prototype.accept = function(visitor) { |
9124 return visitor.visitThrow(this); | 10440 return visitor.visitThrow(this); |
9125 } | 10441 } |
| 10442 HThrow.prototype.accept$1 = function($0) { |
| 10443 return this.accept(($0 && $0.is$HVisitor())); |
| 10444 }; |
| 10445 HThrow.prototype.toString$0 = function() { |
| 10446 return this.toString(); |
| 10447 }; |
9126 // ********** Code for SsaOptimizerTask ************** | 10448 // ********** Code for SsaOptimizerTask ************** |
9127 function SsaOptimizerTask(compiler) { | 10449 function SsaOptimizerTask(compiler) { |
9128 CompilerTask.call(this, compiler); | 10450 CompilerTask.call(this, compiler); |
9129 // Initializers done | 10451 // Initializers done |
9130 } | 10452 } |
9131 $inherits(SsaOptimizerTask, CompilerTask); | 10453 $inherits(SsaOptimizerTask, CompilerTask); |
9132 SsaOptimizerTask.prototype.get$name = function() { | 10454 SsaOptimizerTask.prototype.get$name = function() { |
9133 return 'SSA optimizer'; | 10455 return 'SSA optimizer'; |
9134 } | 10456 } |
9135 SsaOptimizerTask.prototype.optimize = function(graph) { | 10457 SsaOptimizerTask.prototype.optimize = function(graph) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9171 var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral()); | 10493 var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral()); |
9172 var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral()); | 10494 var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral()); |
9173 return new HLiteral($eq(op1.value, op2.value)); | 10495 return new HLiteral($eq(op1.value, op2.value)); |
9174 } | 10496 } |
9175 return node; | 10497 return node; |
9176 } | 10498 } |
9177 SsaConstantFolder.prototype.visitArithmetic = function(node) { | 10499 SsaConstantFolder.prototype.visitArithmetic = function(node) { |
9178 var $0; | 10500 var $0; |
9179 var inputs = node.inputs; | 10501 var inputs = node.inputs; |
9180 $assert(inputs.length == 2, "inputs.length == 2", "optimize.dart", 57, 12); | 10502 $assert(inputs.length == 2, "inputs.length == 2", "optimize.dart", 57, 12); |
9181 if ($notnull_bool(inputs.$index(0).isLiteralNumber() && inputs.$index(1).isLit
eralNumber())) { | 10503 if ($notnull_bool(inputs.$index(0).isLiteralNumber$0() && inputs.$index(1).isL
iteralNumber$0())) { |
9182 var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral()); | 10504 var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral()); |
9183 var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral()); | 10505 var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral()); |
9184 try { | 10506 try { |
9185 var folded = node.evaluate(op1.value, op2.value); | 10507 var folded = node.evaluate(op1.value, op2.value); |
9186 return new HLiteral(folded); | 10508 return new HLiteral(folded); |
9187 } catch (e) { | 10509 } catch (e) { |
9188 e = $toDartException(e); | 10510 e = $toDartException(e); |
9189 if (!(e instanceof IntegerDivisionByZeroException)) throw e; | 10511 if (!(e instanceof IntegerDivisionByZeroException)) throw e; |
9190 return node; | 10512 return node; |
9191 } | 10513 } |
9192 } | 10514 } |
9193 return node; | 10515 return node; |
9194 } | 10516 } |
9195 SsaConstantFolder.prototype.visitAdd = function(node) { | 10517 SsaConstantFolder.prototype.visitAdd = function(node) { |
9196 var $0; | 10518 var $0; |
9197 if ($notnull_bool(node.inputs.$index(0).isLiteralString())) { | 10519 if ($notnull_bool(node.inputs.$index(0).isLiteralString$0())) { |
9198 var op1 = (($0 = node.inputs.$index(0)) && $0.is$HLiteral()); | 10520 var op1 = (($0 = node.inputs.$index(0)) && $0.is$HLiteral()); |
9199 var op2 = (($0 = node.inputs.$index(1)) && $0.is$HLiteral()); | 10521 var op2 = (($0 = node.inputs.$index(1)) && $0.is$HLiteral()); |
9200 return new HLiteral(new StringWrapper(("" + op1.value + " + " + op2.value +
""))); | 10522 return new HLiteral(new StringWrapper(("" + op1.value + " + " + op2.value +
""))); |
9201 } | 10523 } |
9202 return this.visitArithmetic(node); | 10524 return this.visitArithmetic(node); |
9203 } | 10525 } |
9204 // ********** Code for SsaDeadCodeEliminator ************** | 10526 // ********** Code for SsaDeadCodeEliminator ************** |
9205 function SsaDeadCodeEliminator() { | 10527 function SsaDeadCodeEliminator() { |
9206 HGraphVisitor.call(this); | 10528 HGraphVisitor.call(this); |
9207 // Initializers done | 10529 // Initializers done |
(...skipping 24 matching lines...) Expand all Loading... |
9232 } | 10554 } |
9233 SsaInstructionMerger.prototype.visitInstruction = function(node) { | 10555 SsaInstructionMerger.prototype.visitInstruction = function(node) { |
9234 var inputs = node.inputs; | 10556 var inputs = node.inputs; |
9235 var previousUnused = node.previous; | 10557 var previousUnused = node.previous; |
9236 for (var i = inputs.length - 1; | 10558 for (var i = inputs.length - 1; |
9237 i >= 0; i--) { | 10559 i >= 0; i--) { |
9238 if (previousUnused == null) return; | 10560 if (previousUnused == null) return; |
9239 if ((previousUnused instanceof HPhi)) return; | 10561 if ((previousUnused instanceof HPhi)) return; |
9240 if (inputs.$index(i).get$usedBy().length != 1) return; | 10562 if (inputs.$index(i).get$usedBy().length != 1) return; |
9241 if (inputs.$index(i) !== previousUnused) return; | 10563 if (inputs.$index(i) !== previousUnused) return; |
9242 inputs.$index(i).setGenerateAtUseSite(); | 10564 inputs.$index(i).setGenerateAtUseSite$0(); |
9243 previousUnused = previousUnused.previous; | 10565 previousUnused = previousUnused.previous; |
9244 } | 10566 } |
9245 } | 10567 } |
9246 // ********** Code for HTracer ************** | 10568 // ********** Code for HTracer ************** |
9247 function HTracer() {} | 10569 function HTracer() {} |
9248 HTracer._internal$ctor = function() { | 10570 HTracer._internal$ctor = function() { |
9249 this.indent = 0 | 10571 this.indent = 0 |
9250 this.output = new StringBufferImpl(""); | 10572 this.output = new StringBufferImpl(""); |
9251 // Initializers done | 10573 // Initializers done |
9252 } | 10574 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9373 } | 10695 } |
9374 HTracer.prototype.addIndent = function() { | 10696 HTracer.prototype.addIndent = function() { |
9375 for (var i = 0; | 10697 for (var i = 0; |
9376 i < this.indent; i++) { | 10698 i < this.indent; i++) { |
9377 this.add(" "); | 10699 this.add(" "); |
9378 } | 10700 } |
9379 } | 10701 } |
9380 HTracer.prototype.toString = function() { | 10702 HTracer.prototype.toString = function() { |
9381 return this.output.toString(); | 10703 return this.output.toString(); |
9382 } | 10704 } |
| 10705 HTracer.prototype.add$1 = function($0) { |
| 10706 return this.add($assert_String($0)); |
| 10707 }; |
| 10708 HTracer.prototype.toString$0 = function() { |
| 10709 return this.toString(); |
| 10710 }; |
9383 // ********** Code for HInstructionStringifier ************** | 10711 // ********** Code for HInstructionStringifier ************** |
9384 function HInstructionStringifier(currentBlock) { | 10712 function HInstructionStringifier(currentBlock) { |
9385 this.currentBlock = currentBlock; | 10713 this.currentBlock = currentBlock; |
9386 // Initializers done | 10714 // Initializers done |
9387 } | 10715 } |
| 10716 HInstructionStringifier.prototype.is$HVisitor = function(){return this;}; |
9388 HInstructionStringifier.prototype.visit = function(node) { | 10717 HInstructionStringifier.prototype.visit = function(node) { |
9389 return node.accept(this); | 10718 return node.accept(this); |
9390 } | 10719 } |
9391 HInstructionStringifier.prototype.visitBasicBlock = function(node) { | 10720 HInstructionStringifier.prototype.visitBasicBlock = function(node) { |
9392 unreachable(); | 10721 unreachable(); |
9393 } | 10722 } |
9394 HInstructionStringifier.prototype.temporaryId = function(instruction) { | 10723 HInstructionStringifier.prototype.temporaryId = function(instruction) { |
9395 return ("v" + instruction.id + ""); | 10724 return ("v" + instruction.id + ""); |
9396 } | 10725 } |
9397 HInstructionStringifier.prototype.visitAdd = function(node) { | 10726 HInstructionStringifier.prototype.visitAdd = function(node) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9461 HInstructionStringifier.prototype.visitSubtract = function(node) { | 10790 HInstructionStringifier.prototype.visitSubtract = function(node) { |
9462 return this.visitInvoke(node); | 10791 return this.visitInvoke(node); |
9463 } | 10792 } |
9464 HInstructionStringifier.prototype.visitThrow = function(node) { | 10793 HInstructionStringifier.prototype.visitThrow = function(node) { |
9465 var $0; | 10794 var $0; |
9466 return ("Throw " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HIn
struction())) + ""); | 10795 return ("Throw " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HIn
struction())) + ""); |
9467 } | 10796 } |
9468 HInstructionStringifier.prototype.visitTruncatingDivide = function(node) { | 10797 HInstructionStringifier.prototype.visitTruncatingDivide = function(node) { |
9469 return this.visitInvoke(node); | 10798 return this.visitInvoke(node); |
9470 } | 10799 } |
| 10800 HInstructionStringifier.prototype.visit$1 = function($0) { |
| 10801 return this.visit(($0 && $0.is$HInstruction())); |
| 10802 }; |
9471 // ********** Code for HValidator ************** | 10803 // ********** Code for HValidator ************** |
9472 function HValidator() { | 10804 function HValidator() { |
9473 this.isValid = true | 10805 this.isValid = true |
9474 HInstructionVisitor.call(this); | 10806 HInstructionVisitor.call(this); |
9475 // Initializers done | 10807 // Initializers done |
9476 } | 10808 } |
9477 $inherits(HValidator, HInstructionVisitor); | 10809 $inherits(HValidator, HInstructionVisitor); |
9478 HValidator.prototype.visitGraph = function(graph) { | 10810 HValidator.prototype.visitGraph = function(graph) { |
9479 this.graph = graph; | 10811 this.graph = graph; |
9480 this.visitDominatorTree(graph); | 10812 this.visitDominatorTree(graph); |
(...skipping 12 matching lines...) Expand all Loading... |
9493 } | 10825 } |
9494 if ((block.last instanceof HIf) && block.successors.length != 2) { | 10826 if ((block.last instanceof HIf) && block.successors.length != 2) { |
9495 this.markInvalid("If node without two successors"); | 10827 this.markInvalid("If node without two successors"); |
9496 } | 10828 } |
9497 if ((block.last instanceof HConditionalBranch) && block.successors.length != 2
) { | 10829 if ((block.last instanceof HConditionalBranch) && block.successors.length != 2
) { |
9498 this.markInvalid("Conditional node without two successors"); | 10830 this.markInvalid("Conditional node without two successors"); |
9499 } | 10831 } |
9500 if ((block.last instanceof HGoto) && block.successors.length != 1) { | 10832 if ((block.last instanceof HGoto) && block.successors.length != 1) { |
9501 this.markInvalid("Goto node without one successor"); | 10833 this.markInvalid("Goto node without one successor"); |
9502 } | 10834 } |
9503 if ((block.last instanceof HReturn) && (block.successors.length != 1 || !$notn
ull_bool(block.successors.$index(0).isExitBlock()))) { | 10835 if ((block.last instanceof HReturn) && (block.successors.length != 1 || !$notn
ull_bool(block.successors.$index(0).isExitBlock$0()))) { |
9504 this.markInvalid("Return node with > 1 succesor or not going to exit-block")
; | 10836 this.markInvalid("Return node with > 1 succesor or not going to exit-block")
; |
9505 } | 10837 } |
9506 if ((block.last instanceof HExit) && !block.successors.isEmpty()) { | 10838 if ((block.last instanceof HExit) && !block.successors.isEmpty()) { |
9507 this.markInvalid("Exit block with successor"); | 10839 this.markInvalid("Exit block with successor"); |
9508 } | 10840 } |
9509 if ((block.last instanceof HThrow) && !block.successors.isEmpty()) { | 10841 if ((block.last instanceof HThrow) && !block.successors.isEmpty()) { |
9510 this.markInvalid("Throw block with successor"); | 10842 this.markInvalid("Throw block with successor"); |
9511 } | 10843 } |
9512 if (block.successors.isEmpty() && !(block.last instanceof HThrow) && !$notnull
_bool(block.isExitBlock())) { | 10844 if (block.successors.isEmpty() && !(block.last instanceof HThrow) && !$notnull
_bool(block.isExitBlock())) { |
9513 this.markInvalid("Non-exit or throw block without successor"); | 10845 this.markInvalid("Non-exit or throw block without successor"); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9560 count++; | 10892 count++; |
9561 } | 10893 } |
9562 } | 10894 } |
9563 if (!$notnull_bool(f.call$2(current, count))) return false; | 10895 if (!$notnull_bool(f.call$2(current, count))) return false; |
9564 } | 10896 } |
9565 return true; | 10897 return true; |
9566 } | 10898 } |
9567 HValidator.prototype.visitInstruction = function(instruction) { | 10899 HValidator.prototype.visitInstruction = function(instruction) { |
9568 var $this = this; // closure support | 10900 var $this = this; // closure support |
9569 function hasCorrectInputs(instruction) { | 10901 function hasCorrectInputs(instruction) { |
9570 var inBasicBlock = instruction.isInBasicBlock(); | 10902 var inBasicBlock = $assert_bool(instruction.isInBasicBlock$0()); |
9571 return HValidator.everyInstruction(instruction.inputs, (function (input, cou
nt) { | 10903 return HValidator.everyInstruction(instruction.inputs, (function (input, cou
nt) { |
9572 if ($notnull_bool(inBasicBlock)) { | 10904 if ($notnull_bool(inBasicBlock)) { |
9573 return HValidator.countInstruction(input.get$usedBy(), (instruction && i
nstruction.is$HInstruction())) == count; | 10905 return HValidator.countInstruction(input.get$usedBy(), (instruction && i
nstruction.is$HInstruction())) == count; |
9574 } | 10906 } |
9575 else { | 10907 else { |
9576 return HValidator.countInstruction(input.get$usedBy(), (instruction && i
nstruction.is$HInstruction())) == 0; | 10908 return HValidator.countInstruction(input.get$usedBy(), (instruction && i
nstruction.is$HInstruction())) == 0; |
9577 } | 10909 } |
9578 }) | 10910 }) |
9579 ); | 10911 ); |
9580 } | 10912 } |
9581 function hasCorrectUses(instruction) { | 10913 function hasCorrectUses(instruction) { |
9582 if (!$notnull_bool(instruction.isInBasicBlock())) return true; | 10914 if (!$notnull_bool(instruction.isInBasicBlock$0())) return true; |
9583 return HValidator.everyInstruction(instruction.get$usedBy(), (function (use,
count) { | 10915 return HValidator.everyInstruction(instruction.get$usedBy(), (function (use,
count) { |
9584 return HValidator.countInstruction(use.inputs, (instruction && instruction
.is$HInstruction())) == count; | 10916 return HValidator.countInstruction(use.inputs, (instruction && instruction
.is$HInstruction())) == count; |
9585 }) | 10917 }) |
9586 ); | 10918 ); |
9587 } | 10919 } |
9588 this.isValid = $notnull_bool($notnull_bool(this.isValid && hasCorrectInputs(in
struction)) && hasCorrectUses(instruction)); | 10920 this.isValid = $notnull_bool($notnull_bool(this.isValid && hasCorrectInputs(in
struction)) && hasCorrectUses(instruction)); |
9589 } | 10921 } |
| 10922 // ********** Code for ValueSetNode ************** |
| 10923 function ValueSetNode() {} |
| 10924 ValueSetNode.prototype.get$value = function() { return this.value; }; |
| 10925 ValueSetNode.prototype.next$0 = function() { |
| 10926 return this.next(); |
| 10927 }; |
9590 // ********** Code for top level ************** | 10928 // ********** Code for top level ************** |
9591 // ********** Library leg ************** | 10929 // ********** Library leg ************** |
9592 // ********** Code for WorldCompiler ************** | 10930 // ********** Code for WorldCompiler ************** |
9593 function WorldCompiler(world, script) { | 10931 function WorldCompiler(world, script) { |
9594 this.world = world; | 10932 this.world = world; |
9595 Compiler.call(this, script); | 10933 Compiler.call(this, script); |
9596 // Initializers done | 10934 // Initializers done |
9597 } | 10935 } |
9598 $inherits(WorldCompiler, Compiler); | 10936 $inherits(WorldCompiler, Compiler); |
9599 WorldCompiler.prototype.log = function(message) { | 10937 WorldCompiler.prototype.log = function(message) { |
(...skipping 15 matching lines...) Expand all Loading... |
9615 } | 10953 } |
9616 return success; | 10954 return success; |
9617 } | 10955 } |
9618 WorldCompiler.prototype.spanFromNode = function(node) { | 10956 WorldCompiler.prototype.spanFromNode = function(node) { |
9619 var begin = node.getBeginToken(); | 10957 var begin = node.getBeginToken(); |
9620 var end = node.getEndToken(); | 10958 var end = node.getEndToken(); |
9621 if (begin == null || end == null) { | 10959 if (begin == null || end == null) { |
9622 this.cancel(('cannot find tokens to produce error message for ' + node + '.'
)); | 10960 this.cancel(('cannot find tokens to produce error message for ' + node + '.'
)); |
9623 } | 10961 } |
9624 var startOffset = begin.get$charOffset(); | 10962 var startOffset = begin.get$charOffset(); |
9625 var endOffset = end.get$charOffset() + end.toString().length; | 10963 var endOffset = end.get$charOffset() + end.toString$0().length; |
9626 return new SourceSpan(this.script.file, startOffset, endOffset); | 10964 return new SourceSpan(this.script.file, startOffset, endOffset); |
9627 } | 10965 } |
9628 WorldCompiler.prototype.reportWarning = function(node, message) { | 10966 WorldCompiler.prototype.reportWarning = function(node, message) { |
9629 var $0; | 10967 var $0; |
9630 this.world.warning(('' + message + '.'), (($0 = this.spanFromNode(node)) && $0
.is$SourceSpan())); | 10968 this.world.warning(('' + message + '.'), (($0 = this.spanFromNode(node)) && $0
.is$SourceSpan())); |
9631 } | 10969 } |
9632 // ********** Code for Compiler ************** | 10970 // ********** Code for Compiler ************** |
9633 function Compiler(script) { | 10971 function Compiler(script) { |
9634 this.script = script; | 10972 this.script = script; |
9635 // Initializers done | 10973 // Initializers done |
9636 this.universe = new Universe(); | 10974 this.universe = new Universe(); |
9637 this.worklist = DoubleLinkedQueue.DoubleLinkedQueue$from$factory([const$3/*Com
piler.MAIN*/]); | 10975 this.worklist = DoubleLinkedQueue.DoubleLinkedQueue$from$factory([const$7/*Com
piler.MAIN*/]); |
9638 this.scanner = new ScannerTask(this); | 10976 this.scanner = new ScannerTask(this); |
9639 this.parser = new ParserTask(this); | 10977 this.parser = new ParserTask(this); |
9640 this.resolver = new ResolverTask(this); | 10978 this.resolver = new ResolverTask(this); |
9641 this.checker = new TypeCheckerTask(this); | 10979 this.checker = new TypeCheckerTask(this); |
9642 this.builder = new SsaBuilderTask(this); | 10980 this.builder = new SsaBuilderTask(this); |
9643 this.optimizer = new SsaOptimizerTask(this); | 10981 this.optimizer = new SsaOptimizerTask(this); |
9644 this.generator = new SsaCodeGeneratorTask(this); | 10982 this.generator = new SsaCodeGeneratorTask(this); |
9645 this.tasks = [this.scanner, this.parser, this.resolver, this.checker, this.bui
lder, this.optimizer, this.generator]; | 10983 this.tasks = [this.scanner, this.parser, this.resolver, this.checker, this.bui
lder, this.optimizer, this.generator]; |
9646 } | 10984 } |
| 10985 Compiler.prototype.is$Compiler = function(){return this;}; |
9647 Compiler.prototype.ensure = function(condition) { | 10986 Compiler.prototype.ensure = function(condition) { |
9648 if (!$notnull_bool(condition)) this.cancel('failed assertion in leg'); | 10987 if (!$notnull_bool(condition)) this.cancel('failed assertion in leg'); |
9649 } | 10988 } |
9650 Compiler.prototype.unimplemented = function(methodName) { | 10989 Compiler.prototype.unimplemented = function(methodName) { |
9651 this.cancel(("" + methodName + " not implemented")); | 10990 this.cancel(("" + methodName + " not implemented")); |
9652 } | 10991 } |
9653 Compiler.prototype.cancel = function(reason) { | 10992 Compiler.prototype.cancel = function(reason) { |
9654 $throw(new CompilerCancelledException(reason)); | 10993 $throw(new CompilerCancelledException(reason)); |
9655 } | 10994 } |
9656 Compiler.prototype.log = function(message) { | 10995 Compiler.prototype.log = function(message) { |
(...skipping 14 matching lines...) Expand all Loading... |
9671 print(HTracer.HTracer$singleton$factory()); | 11010 print(HTracer.HTracer$singleton$factory()); |
9672 print("------------------"); | 11011 print("------------------"); |
9673 } | 11012 } |
9674 this.log('compilation succeeded'); | 11013 this.log('compilation succeeded'); |
9675 return true; | 11014 return true; |
9676 } | 11015 } |
9677 Compiler.prototype.scanCoreLibrary = function() { | 11016 Compiler.prototype.scanCoreLibrary = function() { |
9678 var fileName = join([options.libDir, '..', 'leg', 'lib', 'core.dart']); | 11017 var fileName = join([options.libDir, '..', 'leg', 'lib', 'core.dart']); |
9679 var file = readSync(fileName); | 11018 var file = readSync(fileName); |
9680 this.scanner.scan(new leg_Script(file)); | 11019 this.scanner.scan(new leg_Script(file)); |
9681 var element = new ForeignElement(const$243/*const SourceString('JS')*/); | 11020 var element = new ForeignElement(const$245/*const SourceString('JS')*/); |
9682 this.universe.define(element); | 11021 this.universe.define(element); |
9683 } | 11022 } |
9684 Compiler.prototype.runCompiler = function() { | 11023 Compiler.prototype.runCompiler = function() { |
9685 var $0; | 11024 var $0; |
9686 this.scanCoreLibrary(); | 11025 this.scanCoreLibrary(); |
9687 this.scanner.scan(this.script); | 11026 this.scanner.scan(this.script); |
9688 while (!this.worklist.isEmpty()) { | 11027 while (!this.worklist.isEmpty()) { |
9689 this.compileMethod((($0 = this.worklist.removeLast()) && $0.is$SourceString(
))); | 11028 this.compileMethod((($0 = this.worklist.removeLast()) && $0.is$SourceString(
))); |
9690 } | 11029 } |
9691 } | 11030 } |
(...skipping 22 matching lines...) Expand all Loading... |
9714 for (var i = codeBlocks.length - 1; | 11053 for (var i = codeBlocks.length - 1; |
9715 i >= 0; i--) { | 11054 i >= 0; i--) { |
9716 buffer.add(codeBlocks.$index(i)); | 11055 buffer.add(codeBlocks.$index(i)); |
9717 } | 11056 } |
9718 buffer.add('main();\n'); | 11057 buffer.add('main();\n'); |
9719 return buffer.toString(); | 11058 return buffer.toString(); |
9720 } | 11059 } |
9721 Compiler.prototype.reportWarning = function(node, message) { | 11060 Compiler.prototype.reportWarning = function(node, message) { |
9722 | 11061 |
9723 } | 11062 } |
| 11063 Compiler.prototype.unimplemented$1 = function($0) { |
| 11064 return this.unimplemented($assert_String($0)); |
| 11065 }; |
9724 // ********** Code for CompilerTask ************** | 11066 // ********** Code for CompilerTask ************** |
9725 function CompilerTask(compiler) { | 11067 function CompilerTask(compiler) { |
9726 this.compiler = compiler; | 11068 this.compiler = compiler; |
9727 this.watch = new StopWatchImplementation(); | 11069 this.watch = new StopWatchImplementation(); |
9728 // Initializers done | 11070 // Initializers done |
9729 } | 11071 } |
9730 CompilerTask.prototype.get$name = function() { | 11072 CompilerTask.prototype.get$name = function() { |
9731 return 'Unknown task'; | 11073 return 'Unknown task'; |
9732 } | 11074 } |
9733 CompilerTask.prototype.get$timing = function() { | 11075 CompilerTask.prototype.get$timing = function() { |
9734 return this.watch.elapsedInMs(); | 11076 return this.watch.elapsedInMs(); |
9735 } | 11077 } |
9736 CompilerTask.prototype.measure = function(action) { | 11078 CompilerTask.prototype.measure = function(action) { |
9737 this.watch.start(); | 11079 this.watch.start(); |
9738 var result = action.call$0(); | 11080 var result = action.call$0(); |
9739 this.watch.stop(); | 11081 this.watch.stop(); |
9740 return result; | 11082 return result; |
9741 } | 11083 } |
9742 // ********** Code for CompilerCancelledException ************** | 11084 // ********** Code for CompilerCancelledException ************** |
9743 function CompilerCancelledException(reason) { | 11085 function CompilerCancelledException(reason) { |
9744 this.reason = reason; | 11086 this.reason = reason; |
9745 // Initializers done | 11087 // Initializers done |
9746 } | 11088 } |
9747 CompilerCancelledException.prototype.toString = function() { | 11089 CompilerCancelledException.prototype.toString = function() { |
9748 var banner = 'compiler cancelled'; | 11090 var banner = 'compiler cancelled'; |
9749 return (this.reason != null) ? ('' + banner + ': ' + this.reason + '') : ('' +
banner + ''); | 11091 return (this.reason != null) ? ('' + banner + ': ' + this.reason + '') : ('' +
banner + ''); |
9750 } | 11092 } |
| 11093 CompilerCancelledException.prototype.toString$0 = function() { |
| 11094 return this.toString(); |
| 11095 }; |
9751 // ********** Code for ResolverTask ************** | 11096 // ********** Code for ResolverTask ************** |
9752 function ResolverTask(compiler) { | 11097 function ResolverTask(compiler) { |
9753 CompilerTask.call(this, compiler); | 11098 CompilerTask.call(this, compiler); |
9754 // Initializers done | 11099 // Initializers done |
9755 } | 11100 } |
9756 $inherits(ResolverTask, CompilerTask); | 11101 $inherits(ResolverTask, CompilerTask); |
9757 ResolverTask.prototype.get$name = function() { | 11102 ResolverTask.prototype.get$name = function() { |
9758 return 'Resolver'; | 11103 return 'Resolver'; |
9759 } | 11104 } |
9760 ResolverTask.prototype.resolve = function(tree) { | 11105 ResolverTask.prototype.resolve = function(tree) { |
9761 var $this = this; // closure support | 11106 var $this = this; // closure support |
9762 var $0; | 11107 var $0; |
9763 return (($0 = this.measure((function () { | 11108 return (($0 = this.measure((function () { |
9764 var visitor = new ResolverVisitor($this.compiler); | 11109 var visitor = new ResolverVisitor($this.compiler); |
9765 visitor.visit(tree); | 11110 visitor.visit(tree); |
9766 return visitor.mapping; | 11111 return visitor.mapping; |
9767 }) | 11112 }) |
9768 )) && $0.is$Map$Node$Element()); | 11113 )) && $0.is$Map$Node$Element()); |
9769 } | 11114 } |
| 11115 ResolverTask.prototype.resolve$1 = function($0) { |
| 11116 return this.resolve(($0 && $0.is$Node())); |
| 11117 }; |
9770 // ********** Code for ErrorMessages ************** | 11118 // ********** Code for ErrorMessages ************** |
9771 function ErrorMessages() {} | 11119 function ErrorMessages() {} |
9772 ErrorMessages.cannotResolve = function(id) { | 11120 ErrorMessages.cannotResolve = function(id) { |
9773 return ("cannot resolve " + id + ""); | 11121 return ("cannot resolve " + id + ""); |
9774 } | 11122 } |
9775 ErrorMessages.cannotResolveType = function(id) { | 11123 ErrorMessages.cannotResolveType = function(id) { |
9776 return ("cannot resolve type " + id + ""); | 11124 return ("cannot resolve type " + id + ""); |
9777 } | 11125 } |
9778 ErrorMessages.duplicateDefinition = function(id) { | 11126 ErrorMessages.duplicateDefinition = function(id) { |
9779 return ("duplicate definition of " + id + ""); | 11127 return ("duplicate definition of " + id + ""); |
9780 } | 11128 } |
9781 // ********** Code for ResolverVisitor ************** | 11129 // ********** Code for ResolverVisitor ************** |
9782 function ResolverVisitor(compiler) { | 11130 function ResolverVisitor(compiler) { |
9783 this.compiler = compiler; | 11131 this.compiler = compiler; |
9784 this.mapping = new LinkedHashMapImplementation$Node$Element(); | 11132 this.mapping = new LinkedHashMapImplementation$Node$Element(); |
9785 this.context = new Scope(new TopScope(compiler.universe)); | 11133 this.context = new Scope(new TopScope(compiler.universe)); |
9786 // Initializers done | 11134 // Initializers done |
9787 } | 11135 } |
| 11136 ResolverVisitor.prototype.is$Visitor = function(){return this;}; |
9788 ResolverVisitor.prototype.fail = function(node, message) { | 11137 ResolverVisitor.prototype.fail = function(node, message) { |
9789 this.compiler.cancel(message); | 11138 this.compiler.cancel(message); |
9790 } | 11139 } |
9791 ResolverVisitor.prototype.warning = function(node, message) { | 11140 ResolverVisitor.prototype.warning = function(node, message) { |
9792 this.compiler.reportWarning(node, message); | 11141 this.compiler.reportWarning(node, message); |
9793 } | 11142 } |
9794 ResolverVisitor.prototype.visit = function(node) { | 11143 ResolverVisitor.prototype.visit = function(node) { |
9795 if (node == null) return null; | 11144 if (node == null) return null; |
9796 return node.accept(this); | 11145 return node.accept(this); |
9797 } | 11146 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9832 this.visit(node.condition); | 11181 this.visit(node.condition); |
9833 this.visit(node.thenPart); | 11182 this.visit(node.thenPart); |
9834 this.visit(node.elsePart); | 11183 this.visit(node.elsePart); |
9835 } | 11184 } |
9836 ResolverVisitor.prototype.visitSend = function(node) { | 11185 ResolverVisitor.prototype.visitSend = function(node) { |
9837 var $0; | 11186 var $0; |
9838 var target = null; | 11187 var target = null; |
9839 this.visit(node.receiver); | 11188 this.visit(node.receiver); |
9840 var selector = (($0 = node.selector) && $0.is$Identifier()); | 11189 var selector = (($0 = node.selector) && $0.is$Identifier()); |
9841 var name = selector.get$source(); | 11190 var name = selector.get$source(); |
9842 if ($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($not
null_bool($eq(name, const$247/*const SourceString('+')*/) || $eq(name, const$248
/*const SourceString('-')*/)) || $eq(name, const$249/*const SourceString('*')*/)
) || $eq(name, const$250/*const SourceString('/')*/)) || $eq(name, const$251/*co
nst SourceString('<')*/)) || $eq(name, const$252/*const SourceString('~/')*/)) |
| $eq(name, const$253/*const SourceString('==')*/))) { | 11191 if ($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($not
null_bool($eq(name, const$249/*const SourceString('+')*/) || $eq(name, const$250
/*const SourceString('-')*/)) || $eq(name, const$251/*const SourceString('*')*/)
) || $eq(name, const$252/*const SourceString('/')*/)) || $eq(name, const$253/*co
nst SourceString('<')*/)) || $eq(name, const$254/*const SourceString('~/')*/)) |
| $eq(name, const$255/*const SourceString('==')*/))) { |
9843 } | 11192 } |
9844 else { | 11193 else { |
9845 target = this.context.lookup(name); | 11194 target = this.context.lookup(name); |
9846 if (target == null) this.fail(node, ErrorMessages.cannotResolve(name)); | 11195 if (target == null) this.fail(node, ErrorMessages.cannotResolve(name)); |
9847 } | 11196 } |
9848 this.visit(node.argumentsNode); | 11197 this.visit(node.argumentsNode); |
9849 return this.useElement(node, target); | 11198 return this.useElement(node, target); |
9850 } | 11199 } |
9851 ResolverVisitor.prototype.visitSendSet = function(node) { | 11200 ResolverVisitor.prototype.visitSendSet = function(node) { |
9852 var $0; | 11201 var $0; |
(...skipping 30 matching lines...) Expand all Loading... |
9883 this.fail(node, "Unimplemented in the resolver"); | 11232 this.fail(node, "Unimplemented in the resolver"); |
9884 } | 11233 } |
9885 ResolverVisitor.prototype.visitReturn = function(node) { | 11234 ResolverVisitor.prototype.visitReturn = function(node) { |
9886 this.visit(node.expression); | 11235 this.visit(node.expression); |
9887 } | 11236 } |
9888 ResolverVisitor.prototype.visitThrow = function(node) { | 11237 ResolverVisitor.prototype.visitThrow = function(node) { |
9889 this.visit(node.expression); | 11238 this.visit(node.expression); |
9890 } | 11239 } |
9891 ResolverVisitor.prototype.visitTypeAnnotation = function(node) { | 11240 ResolverVisitor.prototype.visitTypeAnnotation = function(node) { |
9892 var name = node.typeName; | 11241 var name = node.typeName; |
9893 if ($notnull_bool($eq(name.get$source(), const$254/*const SourceString('var')*
/))) return null; | 11242 if ($notnull_bool($eq(name.get$source(), const$256/*const SourceString('var')*
/))) return null; |
9894 var element = this.context.lookup(name.get$source()); | 11243 var element = this.context.lookup(name.get$source()); |
9895 if (element == null) { | 11244 if (element == null) { |
9896 this.warning(node, ErrorMessages.cannotResolveType(name)); | 11245 this.warning(node, ErrorMessages.cannotResolveType(name)); |
9897 } | 11246 } |
9898 return this.useElement(node, element); | 11247 return this.useElement(node, element); |
9899 } | 11248 } |
9900 ResolverVisitor.prototype.visitVariableDefinitions = function(node) { | 11249 ResolverVisitor.prototype.visitVariableDefinitions = function(node) { |
9901 this.visit(node.type); | 11250 this.visit(node.type); |
9902 var visitor = new VariableDefinitionsVisitor(node, this); | 11251 var visitor = new VariableDefinitionsVisitor(node, this); |
9903 visitor.visit(node.definitions); | 11252 visitor.visit(node.definitions); |
9904 } | 11253 } |
9905 ResolverVisitor.prototype.defineElement = function(node, element) { | 11254 ResolverVisitor.prototype.defineElement = function(node, element) { |
9906 var $0; | 11255 var $0; |
9907 this.compiler.ensure(element != null); | 11256 this.compiler.ensure(element != null); |
9908 this.mapping.$setindex(node, element); | 11257 this.mapping.$setindex(node, element); |
9909 return (($0 = this.context.add(element)) && $0.is$Element()); | 11258 return (($0 = this.context.add(element)) && $0.is$Element()); |
9910 } | 11259 } |
9911 ResolverVisitor.prototype.useElement = function(node, element) { | 11260 ResolverVisitor.prototype.useElement = function(node, element) { |
9912 if (element == null) return null; | 11261 if (element == null) return null; |
9913 this.mapping.$setindex(node, element); | 11262 this.mapping.$setindex(node, element); |
9914 return element; | 11263 return element; |
9915 } | 11264 } |
| 11265 ResolverVisitor.prototype.visit$1 = function($0) { |
| 11266 return this.visit(($0 && $0.is$Node())); |
| 11267 }; |
9916 // ********** Code for VariableDefinitionsVisitor ************** | 11268 // ********** Code for VariableDefinitionsVisitor ************** |
9917 function VariableDefinitionsVisitor(definitions, resolver) { | 11269 function VariableDefinitionsVisitor(definitions, resolver) { |
9918 this.definitions = definitions; | 11270 this.definitions = definitions; |
9919 this.resolver = resolver; | 11271 this.resolver = resolver; |
9920 // Initializers done | 11272 // Initializers done |
9921 } | 11273 } |
| 11274 VariableDefinitionsVisitor.prototype.is$Visitor = function(){return this;}; |
9922 VariableDefinitionsVisitor.prototype.visitSendSet = function(node) { | 11275 VariableDefinitionsVisitor.prototype.visitSendSet = function(node) { |
9923 var $0; | 11276 var $0; |
9924 $assert(node.get$arguments().get$tail().isEmpty(), "node.arguments.tail.isEmpt
y()", "resolver.dart", 200, 12); | 11277 $assert(node.get$arguments().get$tail().isEmpty$0(), "node.arguments.tail.isEm
pty()", "resolver.dart", 200, 12); |
9925 if (node.receiver != null) { | 11278 if (node.receiver != null) { |
9926 this.resolver.compiler.unimplemented("receiver on a variable definition"); | 11279 this.resolver.compiler.unimplemented("receiver on a variable definition"); |
9927 } | 11280 } |
9928 var selector = (($0 = node.selector) && $0.is$Identifier()); | 11281 var selector = (($0 = node.selector) && $0.is$Identifier()); |
9929 this.resolver.visit((($0 = node.get$arguments().get$head()) && $0.is$Node())); | 11282 this.resolver.visit((($0 = node.get$arguments().get$head()) && $0.is$Node())); |
9930 return (($0 = this.visit(node.selector)) && $0.is$SourceString()); | 11283 return (($0 = this.visit(node.selector)) && $0.is$SourceString()); |
9931 } | 11284 } |
9932 VariableDefinitionsVisitor.prototype.visitIdentifier = function(node) { | 11285 VariableDefinitionsVisitor.prototype.visitIdentifier = function(node) { |
9933 return node.get$source(); | 11286 return node.get$source(); |
9934 } | 11287 } |
9935 VariableDefinitionsVisitor.prototype.visitNodeList = function(node) { | 11288 VariableDefinitionsVisitor.prototype.visitNodeList = function(node) { |
9936 var $0; | 11289 var $0; |
9937 for (var link = node.nodes; | 11290 for (var link = node.nodes; |
9938 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
Node())) { | 11291 !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$
Node())) { |
9939 var name = (($0 = this.visit((($0 = link.get$head()) && $0.is$Node()))) && $
0.is$SourceString()); | 11292 var name = (($0 = this.visit((($0 = link.get$head()) && $0.is$Node()))) && $
0.is$SourceString()); |
9940 var element = new VariableElement((($0 = link.get$head()) && $0.is$Node()),
this.definitions.type, name, this.resolver.context.enclosingElement); | 11293 var element = new VariableElement((($0 = link.get$head()) && $0.is$Node()),
this.definitions.type, name, this.resolver.context.enclosingElement); |
9941 var existing = this.resolver.defineElement((($0 = link.get$head()) && $0.is$
Node()), element); | 11294 var existing = this.resolver.defineElement((($0 = link.get$head()) && $0.is$
Node()), element); |
9942 if ($ne(existing, element)) { | 11295 if ($ne(existing, element)) { |
9943 this.resolver.fail(node, ErrorMessages.duplicateDefinition(link.get$head()
)); | 11296 this.resolver.fail(node, ErrorMessages.duplicateDefinition(link.get$head()
)); |
9944 } | 11297 } |
9945 } | 11298 } |
9946 } | 11299 } |
9947 VariableDefinitionsVisitor.prototype.visit = function(node) { | 11300 VariableDefinitionsVisitor.prototype.visit = function(node) { |
9948 return node.accept(this); | 11301 return node.accept(this); |
9949 } | 11302 } |
| 11303 VariableDefinitionsVisitor.prototype.visit$1 = function($0) { |
| 11304 return this.visit(($0 && $0.is$Node())); |
| 11305 }; |
9950 // ********** Code for Scope ************** | 11306 // ********** Code for Scope ************** |
9951 function Scope(parent) { | 11307 function Scope(parent) { |
9952 Scope.enclosing$ctor.call(this, parent, parent.enclosingElement); | 11308 Scope.enclosing$ctor.call(this, parent, parent.enclosingElement); |
9953 // Initializers done | 11309 // Initializers done |
9954 } | 11310 } |
9955 Scope.top$ctor = function() { | 11311 Scope.top$ctor = function() { |
9956 this.parent = null; | 11312 this.parent = null; |
9957 this.elements = const$246/*const {}*/; | 11313 this.elements = const$248/*const {}*/; |
9958 this.enclosingElement = null; | 11314 this.enclosingElement = null; |
9959 // Initializers done | 11315 // Initializers done |
9960 } | 11316 } |
9961 Scope.top$ctor.prototype = Scope.prototype; | 11317 Scope.top$ctor.prototype = Scope.prototype; |
9962 Scope.enclosing$ctor = function(parent, enclosingElement) { | 11318 Scope.enclosing$ctor = function(parent, enclosingElement) { |
9963 this.parent = parent; | 11319 this.parent = parent; |
9964 this.enclosingElement = enclosingElement; | 11320 this.enclosingElement = enclosingElement; |
9965 this.elements = $map([]); | 11321 this.elements = $map([]); |
9966 // Initializers done | 11322 // Initializers done |
9967 } | 11323 } |
9968 Scope.enclosing$ctor.prototype = Scope.prototype; | 11324 Scope.enclosing$ctor.prototype = Scope.prototype; |
9969 Scope.prototype.get$parent = function() { return this.parent; }; | 11325 Scope.prototype.get$parent = function() { return this.parent; }; |
9970 Scope.prototype.lookup = function(name) { | 11326 Scope.prototype.lookup = function(name) { |
9971 var $0; | 11327 var $0; |
9972 var element = (($0 = this.elements.$index(name)) && $0.is$Element()); | 11328 var element = (($0 = this.elements.$index(name)) && $0.is$Element()); |
9973 if (element != null) return element; | 11329 if (element != null) return element; |
9974 return this.parent.lookup(name); | 11330 return this.parent.lookup(name); |
9975 } | 11331 } |
9976 Scope.prototype.add = function(element) { | 11332 Scope.prototype.add = function(element) { |
9977 var $0; | 11333 var $0; |
9978 if (this.elements.containsKey(element.name)) return (($0 = this.elements.$inde
x(element.name)) && $0.is$Element()); | 11334 if (this.elements.containsKey(element.name)) return (($0 = this.elements.$inde
x(element.name)) && $0.is$Element()); |
9979 this.elements.$setindex(element.name, element); | 11335 this.elements.$setindex(element.name, element); |
9980 return element; | 11336 return element; |
9981 } | 11337 } |
| 11338 Scope.prototype.add$1 = function($0) { |
| 11339 return this.add(($0 && $0.is$Element())); |
| 11340 }; |
| 11341 Scope.prototype.lookup$1 = function($0) { |
| 11342 return this.lookup(($0 && $0.is$SourceString())); |
| 11343 }; |
9982 // ********** Code for TopScope ************** | 11344 // ********** Code for TopScope ************** |
9983 function TopScope(universe) { | 11345 function TopScope(universe) { |
9984 this.universe = universe; | 11346 this.universe = universe; |
9985 Scope.top$ctor.call(this); | 11347 Scope.top$ctor.call(this); |
9986 // Initializers done | 11348 // Initializers done |
9987 } | 11349 } |
9988 $inherits(TopScope, Scope); | 11350 $inherits(TopScope, Scope); |
9989 TopScope.prototype.lookup = function(name) { | 11351 TopScope.prototype.lookup = function(name) { |
9990 return this.universe.find(name); | 11352 return this.universe.find(name); |
9991 } | 11353 } |
9992 TopScope.prototype.add = function(element) { | 11354 TopScope.prototype.add = function(element) { |
9993 $throw("Cannot add an element in the top scope"); | 11355 $throw("Cannot add an element in the top scope"); |
9994 } | 11356 } |
| 11357 TopScope.prototype.add$1 = function($0) { |
| 11358 return this.add(($0 && $0.is$Element())); |
| 11359 }; |
| 11360 TopScope.prototype.lookup$1 = function($0) { |
| 11361 return this.lookup(($0 && $0.is$SourceString())); |
| 11362 }; |
9995 // ********** Code for leg_Script ************** | 11363 // ********** Code for leg_Script ************** |
9996 function leg_Script(file) { | 11364 function leg_Script(file) { |
9997 this.file = file; | 11365 this.file = file; |
9998 // Initializers done | 11366 // Initializers done |
9999 } | 11367 } |
10000 leg_Script.prototype.get$text = function() { | 11368 leg_Script.prototype.get$text = function() { |
10001 return this.file.get$text(); | 11369 return this.file.get$text(); |
10002 } | 11370 } |
10003 // ********** Code for TypeCheckerTask ************** | 11371 // ********** Code for TypeCheckerTask ************** |
10004 function TypeCheckerTask(compiler) { | 11372 function TypeCheckerTask(compiler) { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10048 this.element = new Element(name, null, null); | 11416 this.element = new Element(name, null, null); |
10049 // Initializers done | 11417 // Initializers done |
10050 } | 11418 } |
10051 SimpleType.named$ctor.prototype = SimpleType.prototype; | 11419 SimpleType.named$ctor.prototype = SimpleType.prototype; |
10052 SimpleType.prototype.is$Type = function(){return this;}; | 11420 SimpleType.prototype.is$Type = function(){return this;}; |
10053 SimpleType.prototype.get$name = function() { return this.name; }; | 11421 SimpleType.prototype.get$name = function() { return this.name; }; |
10054 SimpleType.prototype.get$element = function() { return this.element; }; | 11422 SimpleType.prototype.get$element = function() { return this.element; }; |
10055 SimpleType.prototype.toString = function() { | 11423 SimpleType.prototype.toString = function() { |
10056 return this.name.toString(); | 11424 return this.name.toString(); |
10057 } | 11425 } |
| 11426 SimpleType.prototype.toString$0 = function() { |
| 11427 return this.toString(); |
| 11428 }; |
10058 // ********** Code for FunctionType ************** | 11429 // ********** Code for FunctionType ************** |
10059 function FunctionType(returnType, parameterTypes) { | 11430 function FunctionType(returnType, parameterTypes) { |
10060 this.returnType = returnType; | 11431 this.returnType = returnType; |
10061 this.parameterTypes = parameterTypes; | 11432 this.parameterTypes = parameterTypes; |
10062 // Initializers done | 11433 // Initializers done |
10063 } | 11434 } |
10064 FunctionType.prototype.is$FunctionType = function(){return this;}; | 11435 FunctionType.prototype.is$FunctionType = function(){return this;}; |
10065 FunctionType.prototype.is$Type = function(){return this;}; | 11436 FunctionType.prototype.is$Type = function(){return this;}; |
10066 FunctionType.prototype.get$returnType = function() { return this.returnType; }; | 11437 FunctionType.prototype.get$returnType = function() { return this.returnType; }; |
10067 FunctionType.prototype.toString = function() { | 11438 FunctionType.prototype.toString = function() { |
10068 var sb = new StringBufferImpl(""); | 11439 var sb = new StringBufferImpl(""); |
10069 var first = true; | 11440 var first = true; |
10070 sb.add('('); | 11441 sb.add('('); |
10071 this.parameterTypes.printOn(sb, ', '); | 11442 this.parameterTypes.printOn(sb, ', '); |
10072 sb.add((') -> ' + this.returnType + '')); | 11443 sb.add((') -> ' + this.returnType + '')); |
10073 return sb.toString(); | 11444 return sb.toString(); |
10074 } | 11445 } |
| 11446 FunctionType.prototype.toString$0 = function() { |
| 11447 return this.toString(); |
| 11448 }; |
10075 // ********** Code for Types ************** | 11449 // ********** Code for Types ************** |
10076 function Types() { | 11450 function Types() { |
10077 this.voidType = new SimpleType.named$ctor(const$6/*Types.VOID*/); | 11451 this.voidType = new SimpleType.named$ctor(const$10/*Types.VOID*/); |
10078 this.intType = new SimpleType.named$ctor(const$8/*Types.INT*/); | 11452 this.intType = new SimpleType.named$ctor(const$12/*Types.INT*/); |
10079 this.dynamicType = new SimpleType.named$ctor(const$10/*Types.DYNAMIC*/); | 11453 this.dynamicType = new SimpleType.named$ctor(const$14/*Types.DYNAMIC*/); |
10080 this.stringType = new SimpleType.named$ctor(const$12/*Types.STRING*/); | 11454 this.stringType = new SimpleType.named$ctor(const$16/*Types.STRING*/); |
10081 // Initializers done | 11455 // Initializers done |
10082 } | 11456 } |
| 11457 Types.prototype.is$Types = function(){return this;}; |
10083 Types.prototype.lookup = function(s) { | 11458 Types.prototype.lookup = function(s) { |
10084 if ($notnull_bool($eq(const$6/*Types.VOID*/, s))) { | 11459 if ($notnull_bool($eq(const$10/*Types.VOID*/, s))) { |
10085 return this.voidType; | 11460 return this.voidType; |
10086 } | 11461 } |
10087 else if ($notnull_bool($eq(const$8/*Types.INT*/, s))) { | 11462 else if ($notnull_bool($eq(const$12/*Types.INT*/, s))) { |
10088 return this.intType; | 11463 return this.intType; |
10089 } | 11464 } |
10090 else if ($notnull_bool($eq(const$10/*Types.DYNAMIC*/, s) || s.get$stringValue(
) === 'var')) { | 11465 else if ($notnull_bool($eq(const$14/*Types.DYNAMIC*/, s) || s.get$stringValue(
) === 'var')) { |
10091 return this.dynamicType; | 11466 return this.dynamicType; |
10092 } | 11467 } |
10093 else if ($notnull_bool($eq(const$12/*Types.STRING*/, s))) { | 11468 else if ($notnull_bool($eq(const$16/*Types.STRING*/, s))) { |
10094 return this.stringType; | 11469 return this.stringType; |
10095 } | 11470 } |
10096 return null; | 11471 return null; |
10097 } | 11472 } |
10098 Types.prototype.isSubtype = function(r, s) { | 11473 Types.prototype.isSubtype = function(r, s) { |
10099 return r === s || r === this.dynamicType || s === this.dynamicType; | 11474 return r === s || r === this.dynamicType || s === this.dynamicType; |
10100 } | 11475 } |
10101 Types.prototype.isAssignable = function(r, s) { | 11476 Types.prototype.isAssignable = function(r, s) { |
10102 return $notnull_bool(this.isSubtype(r, s) || this.isSubtype(s, r)); | 11477 return $notnull_bool(this.isSubtype(r, s) || this.isSubtype(s, r)); |
10103 } | 11478 } |
| 11479 Types.prototype.lookup$1 = function($0) { |
| 11480 return this.lookup(($0 && $0.is$SourceString())); |
| 11481 }; |
10104 // ********** Code for CancelTypeCheckException ************** | 11482 // ********** Code for CancelTypeCheckException ************** |
10105 function CancelTypeCheckException(node, reason) { | 11483 function CancelTypeCheckException(node, reason) { |
10106 this.node = node; | 11484 this.node = node; |
10107 this.reason = reason; | 11485 this.reason = reason; |
10108 // Initializers done | 11486 // Initializers done |
10109 } | 11487 } |
10110 // ********** Code for TypeCheckerVisitor ************** | 11488 // ********** Code for TypeCheckerVisitor ************** |
10111 function TypeCheckerVisitor(compiler, elements, types) { | 11489 function TypeCheckerVisitor(compiler, elements, types) { |
10112 this.compiler = compiler; | 11490 this.compiler = compiler; |
10113 this.elements = elements; | 11491 this.elements = elements; |
10114 this.types = types; | 11492 this.types = types; |
10115 // Initializers done | 11493 // Initializers done |
10116 } | 11494 } |
| 11495 TypeCheckerVisitor.prototype.is$Visitor = function(){return this;}; |
10117 TypeCheckerVisitor.prototype.fail = function(node, reason) { | 11496 TypeCheckerVisitor.prototype.fail = function(node, reason) { |
10118 var message = 'cannot type-check'; | 11497 var message = 'cannot type-check'; |
10119 if (reason != null) { | 11498 if (reason != null) { |
10120 message = ('' + message + ': ' + reason + ''); | 11499 message = ('' + message + ': ' + reason + ''); |
10121 } | 11500 } |
10122 $throw(new CancelTypeCheckException(node, message)); | 11501 $throw(new CancelTypeCheckException(node, message)); |
10123 } | 11502 } |
10124 TypeCheckerVisitor.prototype.nonVoidType = function(node) { | 11503 TypeCheckerVisitor.prototype.nonVoidType = function(node) { |
10125 var type = this.type(node); | 11504 var type = this.type(node); |
10126 if ($eq(type, this.types.voidType)) { | 11505 if ($eq(type, this.types.voidType)) { |
(...skipping 24 matching lines...) Expand all Loading... |
10151 this.fail(node); | 11530 this.fail(node); |
10152 } | 11531 } |
10153 TypeCheckerVisitor.prototype.visitExpressionStatement = function(node) { | 11532 TypeCheckerVisitor.prototype.visitExpressionStatement = function(node) { |
10154 return this.type(node.expression); | 11533 return this.type(node.expression); |
10155 } | 11534 } |
10156 TypeCheckerVisitor.prototype.visitFor = function(node) { | 11535 TypeCheckerVisitor.prototype.visitFor = function(node) { |
10157 this.fail(node); | 11536 this.fail(node); |
10158 } | 11537 } |
10159 TypeCheckerVisitor.prototype.visitFunctionExpression = function(node) { | 11538 TypeCheckerVisitor.prototype.visitFunctionExpression = function(node) { |
10160 var $0; | 11539 var $0; |
10161 var functionType = (($0 = this.elements.$index(node.name).computeType(this.com
piler, this.types)) && $0.is$FunctionType()); | 11540 var functionType = (($0 = this.elements.$index(node.name).computeType$2(this.c
ompiler, this.types)) && $0.is$FunctionType()); |
10162 var returnType = functionType.returnType; | 11541 var returnType = functionType.returnType; |
10163 var previous = this.expectedReturnType; | 11542 var previous = this.expectedReturnType; |
10164 this.expectedReturnType = returnType; | 11543 this.expectedReturnType = returnType; |
10165 this.type(node.body); | 11544 this.type(node.body); |
10166 this.expectedReturnType = previous; | 11545 this.expectedReturnType = previous; |
10167 return functionType; | 11546 return functionType; |
10168 } | 11547 } |
10169 TypeCheckerVisitor.prototype.visitIdentifier = function(node) { | 11548 TypeCheckerVisitor.prototype.visitIdentifier = function(node) { |
10170 this.fail(node); | 11549 this.fail(node); |
10171 } | 11550 } |
10172 TypeCheckerVisitor.prototype.visitIf = function(node) { | 11551 TypeCheckerVisitor.prototype.visitIf = function(node) { |
10173 this.type(node.condition); | 11552 this.type(node.condition); |
10174 this.type(node.thenPart); | 11553 this.type(node.thenPart); |
10175 if ($notnull_bool(node.get$hasElsePart())) this.type(node.elsePart); | 11554 if ($notnull_bool(node.get$hasElsePart())) this.type(node.elsePart); |
10176 return this.types.voidType; | 11555 return this.types.voidType; |
10177 } | 11556 } |
10178 TypeCheckerVisitor.prototype.visitSend = function(node) { | 11557 TypeCheckerVisitor.prototype.visitSend = function(node) { |
10179 var $0; | 11558 var $0; |
10180 var target = this.elements.$index(node); | 11559 var target = this.elements.$index(node); |
10181 if (target != null) { | 11560 if (target != null) { |
10182 var targetType = target.computeType(this.compiler, this.types); | 11561 var targetType = target.computeType$2(this.compiler, this.types); |
10183 if ($notnull_bool(node.get$isPropertyAccess())) { | 11562 if ($notnull_bool(node.get$isPropertyAccess())) { |
10184 return (targetType && targetType.is$Type()); | 11563 return (targetType && targetType.is$Type()); |
10185 } | 11564 } |
10186 else if ($notnull_bool(node.get$isFunctionObjectInvocation())) { | 11565 else if ($notnull_bool(node.get$isFunctionObjectInvocation())) { |
10187 this.fail(node); | 11566 this.fail(node); |
10188 } | 11567 } |
10189 else { | 11568 else { |
10190 if (!(targetType instanceof FunctionType)) { | 11569 if (!(targetType instanceof FunctionType)) { |
10191 if ((target instanceof ForeignElement)) { | 11570 if ((target instanceof ForeignElement)) { |
10192 return this.types.dynamicType; | 11571 return this.types.dynamicType; |
(...skipping 15 matching lines...) Expand all Loading... |
10208 } | 11587 } |
10209 if (!$notnull_bool(arguments.isEmpty())) { | 11588 if (!$notnull_bool(arguments.isEmpty())) { |
10210 this.compiler.reportWarning(arguments.get$head(), 'additional arguments'
); | 11589 this.compiler.reportWarning(arguments.get$head(), 'additional arguments'
); |
10211 } | 11590 } |
10212 return funType.returnType; | 11591 return funType.returnType; |
10213 } | 11592 } |
10214 } | 11593 } |
10215 else { | 11594 else { |
10216 var selector = (($0 = node.selector) && $0.is$Identifier()); | 11595 var selector = (($0 = node.selector) && $0.is$Identifier()); |
10217 var name = selector.get$source(); | 11596 var name = selector.get$source(); |
10218 if ($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($n
otnull_bool($eq(name, const$247/*const SourceString('+')*/) || $eq(name, const$2
57/*const SourceString('=')*/)) || $eq(name, const$248/*const SourceString('-')*
/)) || $eq(name, const$249/*const SourceString('*')*/)) || $eq(name, const$250/*
const SourceString('/')*/)) || $eq(name, const$251/*const SourceString('<')*/))
|| $eq(name, const$252/*const SourceString('~/')*/))) { | 11597 if ($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($n
otnull_bool($eq(name, const$249/*const SourceString('+')*/) || $eq(name, const$2
59/*const SourceString('=')*/)) || $eq(name, const$250/*const SourceString('-')*
/)) || $eq(name, const$251/*const SourceString('*')*/)) || $eq(name, const$252/*
const SourceString('/')*/)) || $eq(name, const$253/*const SourceString('<')*/))
|| $eq(name, const$254/*const SourceString('~/')*/))) { |
10219 return this.types.dynamicType; | 11598 return this.types.dynamicType; |
10220 } | 11599 } |
10221 this.fail(node, ('unresolved send ' + name + '')); | 11600 this.fail(node, ('unresolved send ' + name + '')); |
10222 } | 11601 } |
10223 } | 11602 } |
10224 TypeCheckerVisitor.prototype.visitSendSet = function(node) { | 11603 TypeCheckerVisitor.prototype.visitSendSet = function(node) { |
10225 var $0; | 11604 var $0; |
10226 this.compiler.ensure(node.get$arguments() != null && !$notnull_bool(node.get$a
rguments().isEmpty())); | 11605 this.compiler.ensure(node.get$arguments() != null && !$notnull_bool(node.get$a
rguments().isEmpty())); |
10227 var targetType = (($0 = this.elements.$index(node).computeType(this.compiler,
this.types)) && $0.is$Type()); | 11606 var targetType = (($0 = this.elements.$index(node).computeType$2(this.compiler
, this.types)) && $0.is$Type()); |
10228 var value = (($0 = node.get$arguments().get$head()) && $0.is$Node()); | 11607 var value = (($0 = node.get$arguments().get$head()) && $0.is$Node()); |
10229 this.checkAssignable(value, this.type(value), targetType); | 11608 this.checkAssignable(value, this.type(value), targetType); |
10230 return targetType; | 11609 return targetType; |
10231 } | 11610 } |
10232 TypeCheckerVisitor.prototype.visitLiteralInt = function(node) { | 11611 TypeCheckerVisitor.prototype.visitLiteralInt = function(node) { |
10233 return this.types.intType; | 11612 return this.types.intType; |
10234 } | 11613 } |
10235 TypeCheckerVisitor.prototype.visitLiteralDouble = function(node) { | 11614 TypeCheckerVisitor.prototype.visitLiteralDouble = function(node) { |
10236 return this.types.dynamicType; | 11615 return this.types.dynamicType; |
10237 } | 11616 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10296 var initializer = this.nonVoidType((($0 = link.get$head()) && $0.is$Node()
)); | 11675 var initializer = this.nonVoidType((($0 = link.get$head()) && $0.is$Node()
)); |
10297 this.checkAssignable(node, type, initializer); | 11676 this.checkAssignable(node, type, initializer); |
10298 } | 11677 } |
10299 } | 11678 } |
10300 return null; | 11679 return null; |
10301 } | 11680 } |
10302 // ********** Code for Universe ************** | 11681 // ********** Code for Universe ************** |
10303 function Universe() { | 11682 function Universe() { |
10304 this.elements = $map([]); | 11683 this.elements = $map([]); |
10305 this.generatedCode = $map([]); | 11684 this.generatedCode = $map([]); |
10306 this.scope = new Element(const$2, null, null); | 11685 this.scope = new Element(const$6, null, null); |
10307 // Initializers done | 11686 // Initializers done |
10308 } | 11687 } |
10309 Universe.prototype.find = function(name) { | 11688 Universe.prototype.find = function(name) { |
10310 var $0; | 11689 var $0; |
10311 return (($0 = this.elements.$index(name)) && $0.is$Element()); | 11690 return (($0 = this.elements.$index(name)) && $0.is$Element()); |
10312 } | 11691 } |
10313 Universe.prototype.define = function(element) { | 11692 Universe.prototype.define = function(element) { |
10314 $assert(this.elements.$index(element.name) == null, "elements[element.name] ==
null", "universe.dart", 20, 12); | 11693 $assert(this.elements.$index(element.name) == null, "elements[element.name] ==
null", "universe.dart", 20, 12); |
10315 this.elements.$setindex(element.name, element); | 11694 this.elements.$setindex(element.name, element); |
10316 } | 11695 } |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10493 } | 11872 } |
10494 if ($notnull_bool(this.useSetIndex)) { | 11873 if ($notnull_bool(this.useSetIndex)) { |
10495 w.writeln("Object.prototype.$setindex = function(i, value) { return this[i]
= value; }\nArray.prototype.$setindex = function(i, value) { return this[i] = va
lue; }"); | 11874 w.writeln("Object.prototype.$setindex = function(i, value) { return this[i]
= value; }\nArray.prototype.$setindex = function(i, value) { return this[i] = va
lue; }"); |
10496 } | 11875 } |
10497 var $list = orderValuesByKeys(this._usedOperators); | 11876 var $list = orderValuesByKeys(this._usedOperators); |
10498 for (var $i = 0;$i < $list.length; $i++) { | 11877 for (var $i = 0;$i < $list.length; $i++) { |
10499 var opImpl = $list.$index($i); | 11878 var opImpl = $list.$index($i); |
10500 w.writeln($assert_String(opImpl)); | 11879 w.writeln($assert_String(opImpl)); |
10501 } | 11880 } |
10502 } | 11881 } |
| 11882 CoreJs.prototype.generate$1 = function($0) { |
| 11883 return this.generate(($0 && $0.is$CodeWriter())); |
| 11884 }; |
10503 // ********** Code for WorldGenerator ************** | 11885 // ********** Code for WorldGenerator ************** |
10504 function WorldGenerator(main, writer) { | 11886 function WorldGenerator(main, writer) { |
10505 this._inheritsGenerated = false | 11887 this._inheritsGenerated = false |
10506 this.main = main; | 11888 this.main = main; |
10507 this.writer = writer; | 11889 this.writer = writer; |
10508 this.globals = $map([]); | 11890 this.globals = $map([]); |
10509 this.corejs = new CoreJs(); | 11891 this.corejs = new CoreJs(); |
10510 // Initializers done | 11892 // Initializers done |
10511 } | 11893 } |
10512 WorldGenerator.prototype.run = function() { | 11894 WorldGenerator.prototype.run = function() { |
10513 var $0; | 11895 var $0; |
10514 var metaGen = new MethodGenerator(this.main, null); | 11896 var metaGen = new MethodGenerator(this.main, null); |
10515 var mainCall = this.main.invoke((metaGen && metaGen.is$MethodGenerator()), nul
l, null, Arguments.get$EMPTY(), false); | 11897 var mainCall = this.main.invoke((metaGen && metaGen.is$MethodGenerator()), nul
l, null, Arguments.get$EMPTY(), false); |
10516 this.main.declaringType.markUsed(); | 11898 this.main.declaringType.markUsed(); |
10517 world.corelib.types.$index('BadNumberFormatException').markUsed(); | 11899 world.corelib.types.$index('BadNumberFormatException').markUsed$0(); |
10518 world.get$coreimpl().types.$index('NumImplementation').markUsed(); | 11900 world.get$coreimpl().types.$index('NumImplementation').markUsed$0(); |
10519 world.get$coreimpl().types.$index('StringImplementation').markUsed(); | 11901 world.get$coreimpl().types.$index('StringImplementation').markUsed$0(); |
10520 world.get$coreimpl().types.$index('MatchImplementation').markUsed(); | 11902 world.get$coreimpl().types.$index('MatchImplementation').markUsed$0(); |
10521 this.genMethod((($0 = world.get$coreimpl().types.$index('MatchImplementation')
.getConstructor('')) && $0.is$Member())); | 11903 this.genMethod((($0 = world.get$coreimpl().types.$index('MatchImplementation')
.getConstructor$1('')) && $0.is$Member())); |
10522 this.writeTypes(world.get$coreimpl()); | 11904 this.writeTypes(world.get$coreimpl()); |
10523 this.writeTypes(world.corelib); | 11905 this.writeTypes(world.corelib); |
10524 this.writeTypes(this.main.declaringType.get$library()); | 11906 this.writeTypes(this.main.declaringType.get$library()); |
10525 this._writeGlobals(); | 11907 this._writeGlobals(); |
10526 this.writer.writeln(('RunEntry(function () {' + mainCall.code + ';}, []);')); | 11908 this.writer.writeln(('RunEntry(function () {' + mainCall.code + ';}, []);')); |
10527 } | 11909 } |
10528 WorldGenerator.prototype.globalForStaticField = function(field, fieldValue, depe
ndencies) { | 11910 WorldGenerator.prototype.globalForStaticField = function(field, fieldValue, depe
ndencies) { |
10529 var $0; | 11911 var $0; |
10530 var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname
() + ""); | 11912 var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname
() + ""); |
10531 if (!this.globals.containsKey(fullname)) { | 11913 if (!this.globals.containsKey(fullname)) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10629 var standardConstructor = (($0 = type.get$constructors().$index('')) && $0.i
s$Member()); | 12011 var standardConstructor = (($0 = type.get$constructors().$index('')) && $0.i
s$Member()); |
10630 if (standardConstructor == null || standardConstructor.generator == null) { | 12012 if (standardConstructor == null || standardConstructor.generator == null) { |
10631 if (!$notnull_bool(type.get$isNativeType())) { | 12013 if (!$notnull_bool(type.get$isNativeType())) { |
10632 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); | 12014 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
10633 } | 12015 } |
10634 } | 12016 } |
10635 else { | 12017 else { |
10636 standardConstructor.generator.writeDefinition(this.writer, null); | 12018 standardConstructor.generator.writeDefinition(this.writer, null); |
10637 } | 12019 } |
10638 var $list = type.get$constructors().getValues(); | 12020 var $list = type.get$constructors().getValues(); |
10639 for (var $i = type.get$constructors().getValues().iterator(); $i.hasNext();
) { | 12021 for (var $i = type.get$constructors().getValues().iterator$0(); $i.hasNext$0
(); ) { |
10640 var c = $i.next(); | 12022 var c = $i.next$0(); |
10641 if ($notnull_bool($ne(c.generator, null) && $ne(c, standardConstructor)))
{ | 12023 if ($notnull_bool($ne(c.generator, null) && $ne(c, standardConstructor)))
{ |
10642 c.generator.writeDefinition(this.writer, null); | 12024 c.generator.writeDefinition$2(this.writer); |
10643 } | 12025 } |
10644 } | 12026 } |
10645 } | 12027 } |
10646 if (!$notnull_bool(type.get$isTop())) { | 12028 if (!$notnull_bool(type.get$isTop())) { |
10647 if ((type instanceof ConcreteType)) { | 12029 if ((type instanceof ConcreteType)) { |
10648 this._ensureInheritsHelper(); | 12030 this._ensureInheritsHelper(); |
10649 this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get$g
enericType().get$jsname() + ');')); | 12031 this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get$g
enericType().get$jsname() + ');')); |
10650 } | 12032 } |
10651 else if (!$notnull_bool(type.get$isNativeType())) { | 12033 else if (!$notnull_bool(type.get$isNativeType())) { |
10652 if (type.get$parent() != null && !$notnull_bool(type.get$parent().get$isOb
ject())) { | 12034 if (type.get$parent() != null && !$notnull_bool(type.get$parent().get$isOb
ject())) { |
(...skipping 21 matching lines...) Expand all Loading... |
10674 var interface_ = worklist.removeLast(); | 12056 var interface_ = worklist.removeLast(); |
10675 this._maybeIsTest(type, interface_.get$genericType()); | 12057 this._maybeIsTest(type, interface_.get$genericType()); |
10676 if (interface_.get$genericType()._concreteTypes != null) { | 12058 if (interface_.get$genericType()._concreteTypes != null) { |
10677 var $list = this._orderValues(interface_.get$genericType()._concreteType
s); | 12059 var $list = this._orderValues(interface_.get$genericType()._concreteType
s); |
10678 for (var $i = 0;$i < $list.length; $i++) { | 12060 for (var $i = 0;$i < $list.length; $i++) { |
10679 var ct = $list.$index($i); | 12061 var ct = $list.$index($i); |
10680 this._maybeIsTest(type, (ct && ct.is$lang_Type())); | 12062 this._maybeIsTest(type, (ct && ct.is$lang_Type())); |
10681 } | 12063 } |
10682 } | 12064 } |
10683 var $list = interface_.get$interfaces(); | 12065 var $list = interface_.get$interfaces(); |
10684 for (var $i = interface_.get$interfaces().iterator(); $i.hasNext(); ) { | 12066 for (var $i = interface_.get$interfaces().iterator$0(); $i.hasNext$0(); )
{ |
10685 var other = $i.next(); | 12067 var other = $i.next$0(); |
10686 if (!seen.contains(other)) { | 12068 if (!seen.contains(other)) { |
10687 worklist.addLast(other); | 12069 worklist.addLast(other); |
10688 seen.add(other); | 12070 seen.add(other); |
10689 } | 12071 } |
10690 } | 12072 } |
10691 } | 12073 } |
10692 } | 12074 } |
10693 type.get$factories().forEach(this.get$_writeMethod()); | 12075 type.get$factories().forEach(this.get$_writeMethod()); |
10694 var $list = this._orderValues(type.get$members()); | 12076 var $list = this._orderValues(type.get$members()); |
10695 for (var $i = 0;$i < $list.length; $i++) { | 12077 for (var $i = 0;$i < $list.length; $i++) { |
(...skipping 13 matching lines...) Expand all Loading... |
10709 WorldGenerator.prototype._ensureInheritsHelper = function() { | 12091 WorldGenerator.prototype._ensureInheritsHelper = function() { |
10710 if ($notnull_bool(this._inheritsGenerated)) return; | 12092 if ($notnull_bool(this._inheritsGenerated)) return; |
10711 this._inheritsGenerated = true; | 12093 this._inheritsGenerated = true; |
10712 this.writer.writeln("/** Implements extends for Dart classes on JavaScript pro
totypes. */\nfunction $inherits(child, parent) {\n if (child.prototype.__proto_
_) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n functio
n tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tm
p();\n child.prototype.constructor = child;\n }\n}"); | 12094 this.writer.writeln("/** Implements extends for Dart classes on JavaScript pro
totypes. */\nfunction $inherits(child, parent) {\n if (child.prototype.__proto_
_) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n functio
n tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tm
p();\n child.prototype.constructor = child;\n }\n}"); |
10713 } | 12095 } |
10714 WorldGenerator.prototype._writeDynamicStubs = function(type) { | 12096 WorldGenerator.prototype._writeDynamicStubs = function(type) { |
10715 if (type.varStubs != null) { | 12097 if (type.varStubs != null) { |
10716 var $list = orderValuesByKeys(type.varStubs); | 12098 var $list = orderValuesByKeys(type.varStubs); |
10717 for (var $i = 0;$i < $list.length; $i++) { | 12099 for (var $i = 0;$i < $list.length; $i++) { |
10718 var stub = $list.$index($i); | 12100 var stub = $list.$index($i); |
10719 stub.generate(this.writer); | 12101 stub.generate$1(this.writer); |
10720 } | 12102 } |
10721 } | 12103 } |
10722 } | 12104 } |
10723 WorldGenerator.prototype._writeStaticField = function(field) { | 12105 WorldGenerator.prototype._writeStaticField = function(field) { |
10724 if ($notnull_bool(field.isFinal)) return; | 12106 if ($notnull_bool(field.isFinal)) return; |
10725 var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname
() + ""); | 12107 var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname
() + ""); |
10726 if (this.globals.containsKey(fullname)) { | 12108 if (this.globals.containsKey(fullname)) { |
10727 var value = this.globals.$index(fullname); | 12109 var value = this.globals.$index(fullname); |
10728 if ($notnull_bool(field.declaringType.get$isTop() && !$notnull_bool(field.is
Native))) { | 12110 if ($notnull_bool(field.declaringType.get$isTop() && !$notnull_bool(field.is
Native))) { |
10729 this.writer.writeln(('var ' + field.get$jsname() + ' = ' + value.exp.code
+ ';')); | 12111 this.writer.writeln(('var ' + field.get$jsname() + ' = ' + value.exp.code
+ ';')); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10765 } | 12147 } |
10766 } | 12148 } |
10767 WorldGenerator.prototype.get$_writeMethod = function() { | 12149 WorldGenerator.prototype.get$_writeMethod = function() { |
10768 return WorldGenerator.prototype._writeMethod.bind(this); | 12150 return WorldGenerator.prototype._writeMethod.bind(this); |
10769 } | 12151 } |
10770 WorldGenerator.prototype._writeGlobals = function() { | 12152 WorldGenerator.prototype._writeGlobals = function() { |
10771 if (this.globals.get$length() > 0) { | 12153 if (this.globals.get$length() > 0) { |
10772 this.writer.comment('// ********** Globals **************'); | 12154 this.writer.comment('// ********** Globals **************'); |
10773 } | 12155 } |
10774 var list = this.globals.getValues(); | 12156 var list = this.globals.getValues(); |
10775 list.sort((function (a, b) { | 12157 list.sort$1((function (a, b) { |
10776 return a.compareTo(b); | 12158 return a.compareTo$1(b); |
10777 }) | 12159 }) |
10778 ); | 12160 ); |
10779 for (var $i = list.iterator(); $i.hasNext(); ) { | 12161 for (var $i = list.iterator$0(); $i.hasNext$0(); ) { |
10780 var global = $i.next(); | 12162 var global = $i.next$0(); |
10781 if (global.field != null) { | 12163 if (global.field != null) { |
10782 this._writeStaticField(global.field); | 12164 this._writeStaticField(global.field); |
10783 } | 12165 } |
10784 else { | 12166 else { |
10785 this.writer.writeln(('var ' + global.get$name() + ' = ' + global.exp.code
+ ';')); | 12167 this.writer.writeln(('var ' + global.get$name() + ' = ' + global.exp.code
+ ';')); |
10786 } | 12168 } |
10787 } | 12169 } |
10788 } | 12170 } |
10789 WorldGenerator.prototype._orderValues = function(map) { | 12171 WorldGenerator.prototype._orderValues = function(map) { |
10790 var $0; | 12172 var $0; |
10791 var values = (($0 = map.getValues()) && $0.is$List()); | 12173 var values = (($0 = map.getValues()) && $0.is$List()); |
10792 values.sort(this.get$_compareMembers()); | 12174 values.sort(this.get$_compareMembers()); |
10793 return values; | 12175 return values; |
10794 } | 12176 } |
10795 WorldGenerator.prototype._compareMembers = function(x, y) { | 12177 WorldGenerator.prototype._compareMembers = function(x, y) { |
10796 if (x.get$span() != null && y.get$span() != null) { | 12178 if (x.get$span() != null && y.get$span() != null) { |
10797 var spans = x.get$span().compareTo(y.get$span()); | 12179 var spans = x.get$span().compareTo(y.get$span()); |
10798 if (spans != 0) return spans; | 12180 if (spans != 0) return spans; |
10799 } | 12181 } |
10800 if (x.get$span() == null) return 1; | 12182 if (x.get$span() == null) return 1; |
10801 if (y.get$span() == null) return -1; | 12183 if (y.get$span() == null) return -1; |
10802 return x.get$name().compareTo(y.get$name()); | 12184 return $assert_num(x.get$name().compareTo$1(y.get$name())); |
10803 } | 12185 } |
10804 WorldGenerator.prototype.get$_compareMembers = function() { | 12186 WorldGenerator.prototype.get$_compareMembers = function() { |
10805 return WorldGenerator.prototype._compareMembers.bind(this); | 12187 return WorldGenerator.prototype._compareMembers.bind(this); |
10806 } | 12188 } |
10807 WorldGenerator.prototype.useMapFactory = function() { | 12189 WorldGenerator.prototype.useMapFactory = function() { |
10808 var $0; | 12190 var $0; |
10809 this.corejs.useMap = true; | 12191 this.corejs.useMap = true; |
10810 var factType = world.get$coreimpl().types.$index('HashMapImplementation'); | 12192 var factType = world.get$coreimpl().types.$index('HashMapImplementation'); |
10811 var m = factType.resolveMember('\$setindex'); | 12193 var m = factType.resolveMember$1('\$setindex'); |
10812 this.genMethod((($0 = m.get$members().$index(0)) && $0.is$Member())); | 12194 this.genMethod((($0 = m.get$members().$index(0)) && $0.is$Member())); |
10813 var c = factType.getConstructor(''); | 12195 var c = factType.getConstructor$1(''); |
10814 this.genMethod((c && c.is$Member())); | 12196 this.genMethod((c && c.is$Member())); |
10815 return (factType && factType.is$lang_Type()); | 12197 return (factType && factType.is$lang_Type()); |
10816 } | 12198 } |
10817 // ********** Code for BlockScope ************** | 12199 // ********** Code for BlockScope ************** |
10818 function BlockScope(enclosingMethod, parent, reentrant) { | 12200 function BlockScope(enclosingMethod, parent, reentrant) { |
10819 this.enclosingMethod = enclosingMethod; | 12201 this.enclosingMethod = enclosingMethod; |
10820 this.parent = parent; | 12202 this.parent = parent; |
10821 this.reentrant = reentrant; | 12203 this.reentrant = reentrant; |
10822 this._vars = $map([]); | 12204 this._vars = $map([]); |
10823 // Initializers done | 12205 // Initializers done |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10889 var type = this.enclosingMethod.method.resolveType(id.type, false); | 12271 var type = this.enclosingMethod.method.resolveType(id.type, false); |
10890 return this.create(id.name.name, (type && type.is$lang_Type()), id.span, false
); | 12272 return this.create(id.name.name, (type && type.is$lang_Type()), id.span, false
); |
10891 } | 12273 } |
10892 BlockScope.prototype.getRethrow = function() { | 12274 BlockScope.prototype.getRethrow = function() { |
10893 var scope = this; | 12275 var scope = this; |
10894 while ($notnull_bool(scope.rethrow == null && $ne(scope.get$parent(), null)))
{ | 12276 while ($notnull_bool(scope.rethrow == null && $ne(scope.get$parent(), null)))
{ |
10895 scope = scope.get$parent(); | 12277 scope = scope.get$parent(); |
10896 } | 12278 } |
10897 return scope.rethrow; | 12279 return scope.rethrow; |
10898 } | 12280 } |
| 12281 BlockScope.prototype.lookup$1 = function($0) { |
| 12282 return this.lookup($assert_String($0)); |
| 12283 }; |
10899 // ********** Code for MethodGenerator ************** | 12284 // ********** Code for MethodGenerator ************** |
10900 function MethodGenerator(method, enclosingMethod) { | 12285 function MethodGenerator(method, enclosingMethod) { |
10901 var $0; | 12286 var $0; |
10902 this.method = method; | 12287 this.method = method; |
10903 this.enclosingMethod = enclosingMethod; | 12288 this.enclosingMethod = enclosingMethod; |
10904 this.writer = new CodeWriter(); | 12289 this.writer = new CodeWriter(); |
10905 this.needsThis = false; | 12290 this.needsThis = false; |
10906 // Initializers done | 12291 // Initializers done |
10907 if (this.enclosingMethod != null) { | 12292 if (this.enclosingMethod != null) { |
10908 this._scope = new BlockScope(this, this.enclosingMethod._scope, false); | 12293 this._scope = new BlockScope(this, this.enclosingMethod._scope, false); |
10909 this.captures = new HashSetImplementation(); | 12294 this.captures = new HashSetImplementation(); |
10910 } | 12295 } |
10911 else { | 12296 else { |
10912 this._scope = new BlockScope(this, null, false); | 12297 this._scope = new BlockScope(this, null, false); |
10913 } | 12298 } |
10914 if (this.enclosingMethod != null && this.method.name != '') { | 12299 if (this.enclosingMethod != null && this.method.name != '') { |
10915 var m = (($0 = this.method) && $0.is$MethodMember()); | 12300 var m = (($0 = this.method) && $0.is$MethodMember()); |
10916 this._scope.create(m.name, m.get$functionType(), m.definition.span, false); | 12301 this._scope.create(m.name, m.get$functionType(), m.definition.span, false); |
10917 } | 12302 } |
10918 this._usedTemps = new HashSetImplementation(); | 12303 this._usedTemps = new HashSetImplementation(); |
10919 this._freeTemps = []; | 12304 this._freeTemps = []; |
10920 } | 12305 } |
10921 MethodGenerator.prototype.is$MethodGenerator = function(){return this;}; | 12306 MethodGenerator.prototype.is$MethodGenerator = function(){return this;}; |
| 12307 MethodGenerator.prototype.is$TreeVisitor = function(){return this;}; |
10922 MethodGenerator.prototype.get$library = function() { | 12308 MethodGenerator.prototype.get$library = function() { |
10923 return this.method.get$library(); | 12309 return this.method.get$library(); |
10924 } | 12310 } |
10925 MethodGenerator.prototype.findMembers = function(name) { | 12311 MethodGenerator.prototype.findMembers = function(name) { |
10926 return this.get$library()._findMembers(name); | 12312 return this.get$library()._findMembers(name); |
10927 } | 12313 } |
10928 MethodGenerator.prototype.get$isClosure = function() { | 12314 MethodGenerator.prototype.get$isClosure = function() { |
10929 return (this.enclosingMethod != null); | 12315 return (this.enclosingMethod != null); |
10930 } | 12316 } |
10931 MethodGenerator.prototype.get$isStatic = function() { | 12317 MethodGenerator.prototype.get$isStatic = function() { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10980 else { | 12366 else { |
10981 this.writeBody(); | 12367 this.writeBody(); |
10982 } | 12368 } |
10983 } | 12369 } |
10984 MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { | 12370 MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
10985 var $0; | 12371 var $0; |
10986 var paramCode = this._paramCode; | 12372 var paramCode = this._paramCode; |
10987 var names = null; | 12373 var names = null; |
10988 if (this.captures != null && this.captures.get$length() > 0) { | 12374 if (this.captures != null && this.captures.get$length() > 0) { |
10989 names = ListFactory.ListFactory$from$factory(this.captures); | 12375 names = ListFactory.ListFactory$from$factory(this.captures); |
10990 names.sort((function (x, y) { | 12376 names.sort$1((function (x, y) { |
10991 return x.compareTo(y); | 12377 return x.compareTo$1(y); |
10992 }) | 12378 }) |
10993 ); | 12379 ); |
10994 paramCode = ListFactory.ListFactory$from$factory((names && names.is$Iterable
())); | 12380 paramCode = ListFactory.ListFactory$from$factory((names && names.is$Iterable
())); |
10995 paramCode.addAll(this._paramCode); | 12381 paramCode.addAll$1(this._paramCode); |
10996 } | 12382 } |
10997 var _params = ('(' + Strings.join(this._paramCode, ", ") + ')'); | 12383 var _params = ('(' + Strings.join(this._paramCode, ", ") + ')'); |
10998 var params = ('(' + Strings.join((paramCode && paramCode.is$List$String()), ",
") + ')'); | 12384 var params = ('(' + Strings.join((paramCode && paramCode.is$List$String()), ",
") + ')'); |
10999 if ($notnull_bool(this.method.declaringType.get$isTop() && !$notnull_bool(this
.get$isClosure()))) { | 12385 if ($notnull_bool(this.method.declaringType.get$isTop() && !$notnull_bool(this
.get$isClosure()))) { |
11000 defWriter.enterBlock(('function ' + this.method.get$jsname() + '' + params +
' {')); | 12386 defWriter.enterBlock(('function ' + this.method.get$jsname() + '' + params +
' {')); |
11001 } | 12387 } |
11002 else if ($notnull_bool(this.get$isClosure())) { | 12388 else if ($notnull_bool(this.get$isClosure())) { |
11003 if (this.method.name == '') { | 12389 if (this.method.name == '') { |
11004 defWriter.enterBlock(('(function ' + params + ' {')); | 12390 defWriter.enterBlock(('(function ' + params + ' {')); |
11005 } | 12391 } |
(...skipping 26 matching lines...) Expand all Loading... |
11032 else { | 12418 else { |
11033 defWriter.enterBlock(('' + this.method.declaringType.get$jsname() + '.protot
ype.') + ('' + this.method.get$jsname() + ' = function' + _params + ' {')); | 12419 defWriter.enterBlock(('' + this.method.declaringType.get$jsname() + '.protot
ype.') + ('' + this.method.get$jsname() + ' = function' + _params + ' {')); |
11034 } | 12420 } |
11035 if ($notnull_bool(this.needsThis)) { | 12421 if ($notnull_bool(this.needsThis)) { |
11036 defWriter.writeln('var \$this = this; // closure support'); | 12422 defWriter.writeln('var \$this = this; // closure support'); |
11037 } | 12423 } |
11038 if (this._usedTemps.get$length() > 0 || this._freeTemps.length > 0) { | 12424 if (this._usedTemps.get$length() > 0 || this._freeTemps.length > 0) { |
11039 $assert(this._usedTemps.get$length() == 0, "_usedTemps.length == 0", "gen.da
rt", 695, 14); | 12425 $assert(this._usedTemps.get$length() == 0, "_usedTemps.length == 0", "gen.da
rt", 695, 14); |
11040 this._freeTemps.addAll(this._usedTemps); | 12426 this._freeTemps.addAll(this._usedTemps); |
11041 this._freeTemps.sort((function (x, y) { | 12427 this._freeTemps.sort((function (x, y) { |
11042 return x.compareTo(y); | 12428 return x.compareTo$1(y); |
11043 }) | 12429 }) |
11044 ); | 12430 ); |
11045 defWriter.writeln(('var ' + Strings.join(this._freeTemps, ", ") + ';')); | 12431 defWriter.writeln(('var ' + Strings.join(this._freeTemps, ", ") + ';')); |
11046 } | 12432 } |
11047 defWriter.writeln(this.writer.get$text()); | 12433 defWriter.writeln(this.writer.get$text()); |
11048 if ($notnull_bool($ne(names, null))) { | 12434 if ($notnull_bool($ne(names, null))) { |
11049 defWriter.exitBlock(('}).bind(null, ' + Strings.join((names && names.is$List
$String()), ", ") + ')')); | 12435 defWriter.exitBlock(('}).bind(null, ' + Strings.join((names && names.is$List
$String()), ", ") + ')')); |
11050 } | 12436 } |
11051 else if ($notnull_bool(this.get$isClosure() && this.method.name == '')) { | 12437 else if ($notnull_bool(this.get$isClosure() && this.method.name == '')) { |
11052 defWriter.exitBlock('})'); | 12438 defWriter.exitBlock('})'); |
(...skipping 22 matching lines...) Expand all Loading... |
11075 if ((this.method instanceof MethodMember)) { | 12461 if ((this.method instanceof MethodMember)) { |
11076 var meth = (($0 = this.method) && $0.is$MethodMember()); | 12462 var meth = (($0 = this.method) && $0.is$MethodMember()); |
11077 if ($notnull_bool(meth._provideOptionalParamInfo)) { | 12463 if ($notnull_bool(meth._provideOptionalParamInfo)) { |
11078 var optNames = []; | 12464 var optNames = []; |
11079 var optValues = []; | 12465 var optValues = []; |
11080 meth.genParameterValues(); | 12466 meth.genParameterValues(); |
11081 var $list = meth.parameters; | 12467 var $list = meth.parameters; |
11082 for (var $i = 0;$i < $list.length; $i++) { | 12468 for (var $i = 0;$i < $list.length; $i++) { |
11083 var param = $list.$index($i); | 12469 var param = $list.$index($i); |
11084 if ($notnull_bool(param.get$isOptional())) { | 12470 if ($notnull_bool(param.get$isOptional())) { |
11085 optNames.add(param.get$name()); | 12471 optNames.add$1(param.get$name()); |
11086 optValues.add(MethodGenerator._escapeString(param.get$value().code)); | 12472 optValues.add$1(MethodGenerator._escapeString(param.get$value().code))
; |
11087 } | 12473 } |
11088 } | 12474 } |
11089 if (optNames.length > 0) { | 12475 if (optNames.length > 0) { |
11090 var start = ''; | 12476 var start = ''; |
11091 if ($notnull_bool(meth.isStatic)) { | 12477 if ($notnull_bool(meth.isStatic)) { |
11092 if (!$notnull_bool(meth.declaringType.get$isTop())) { | 12478 if (!$notnull_bool(meth.declaringType.get$isTop())) { |
11093 start = meth.declaringType.get$jsname() + '.'; | 12479 start = meth.declaringType.get$jsname() + '.'; |
11094 } | 12480 } |
11095 } | 12481 } |
11096 else { | 12482 else { |
11097 start = meth.declaringType.get$jsname() + '.prototype.'; | 12483 start = meth.declaringType.get$jsname() + '.prototype.'; |
11098 } | 12484 } |
11099 optNames.addAll(optValues); | 12485 optNames.addAll$1(optValues); |
11100 var optional = "['" + Strings.join((optNames && optNames.is$List$String(
)), "', '") + "']"; | 12486 var optional = "['" + Strings.join((optNames && optNames.is$List$String(
)), "', '") + "']"; |
11101 defWriter.writeln(('' + start + '' + meth.get$jsname() + '.\$optional =
' + optional + '')); | 12487 defWriter.writeln(('' + start + '' + meth.get$jsname() + '.\$optional =
' + optional + '')); |
11102 } | 12488 } |
11103 } | 12489 } |
11104 } | 12490 } |
11105 } | 12491 } |
11106 MethodGenerator.prototype.writeBody = function() { | 12492 MethodGenerator.prototype.writeBody = function() { |
11107 var initializers = null; | 12493 var initializers = null; |
11108 var initializedFields = null; | 12494 var initializedFields = null; |
11109 if ($notnull_bool(this.method.get$isConstructor())) { | 12495 if ($notnull_bool(this.method.get$isConstructor())) { |
11110 initializers = []; | 12496 initializers = []; |
11111 initializedFields = new HashSetImplementation(); | 12497 initializedFields = new HashSetImplementation(); |
11112 var $list = world.gen._orderValues(this.method.declaringType.getAllMembers()
); | 12498 var $list = world.gen._orderValues(this.method.declaringType.getAllMembers()
); |
11113 for (var $i = 0;$i < $list.length; $i++) { | 12499 for (var $i = 0;$i < $list.length; $i++) { |
11114 var f = $list.$index($i); | 12500 var f = $list.$index($i); |
11115 if ((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic())) { | 12501 if ((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic())) { |
11116 var cv = f.computeValue(); | 12502 var cv = f.computeValue$0(); |
11117 if ($notnull_bool($ne(cv, null))) { | 12503 if ($notnull_bool($ne(cv, null))) { |
11118 initializers.add(('this.' + f.get$jsname() + ' = ' + cv.code + '')); | 12504 initializers.add$1(('this.' + f.get$jsname() + ' = ' + cv.code + '')); |
11119 initializedFields.add(f.get$name()); | 12505 initializedFields.add$1(f.get$name()); |
11120 } | 12506 } |
11121 } | 12507 } |
11122 } | 12508 } |
11123 } | 12509 } |
11124 this._paramCode = []; | 12510 this._paramCode = []; |
11125 var $list = this.method.get$parameters(); | 12511 var $list = this.method.get$parameters(); |
11126 for (var $i = 0;$i < $list.length; $i++) { | 12512 for (var $i = 0;$i < $list.length; $i++) { |
11127 var p = $list.$index($i); | 12513 var p = $list.$index($i); |
11128 if ($notnull_bool($ne(initializers, null) && p.isInitializer)) { | 12514 if ($notnull_bool($ne(initializers, null) && p.isInitializer)) { |
11129 var field = this.method.declaringType.getMember(p.get$name()); | 12515 var field = this.method.declaringType.getMember(p.get$name()); |
11130 if ($notnull_bool(field == null)) { | 12516 if ($notnull_bool(field == null)) { |
11131 world.error('bad this parameter - no matching field', p.get$definition()
.get$span()); | 12517 world.error('bad this parameter - no matching field', p.get$definition()
.get$span()); |
11132 } | 12518 } |
11133 if (!$notnull_bool(field.get$isField())) { | 12519 if (!$notnull_bool(field.get$isField())) { |
11134 world.error(('"this.' + p.get$name() + '" does not refer to a field'), p
.get$definition().get$span()); | 12520 world.error(('"this.' + p.get$name() + '" does not refer to a field'), p
.get$definition().get$span()); |
11135 } | 12521 } |
11136 var paramValue = new Value(field.get$returnType(), p.get$name(), p.get$def
inition().get$span(), false); | 12522 var paramValue = new Value(field.get$returnType(), p.get$name(), p.get$def
inition().get$span(), false); |
11137 this._paramCode.add(paramValue.code); | 12523 this._paramCode.add(paramValue.code); |
11138 initializers.add(('this.' + field.get$jsname() + ' = ' + paramValue.code +
';')); | 12524 initializers.add$1(('this.' + field.get$jsname() + ' = ' + paramValue.code
+ ';')); |
11139 initializedFields.add(p.get$name()); | 12525 initializedFields.add$1(p.get$name()); |
11140 } | 12526 } |
11141 else { | 12527 else { |
11142 var paramValue = this._scope.declareParameter((p && p.is$Parameter())); | 12528 var paramValue = this._scope.declareParameter((p && p.is$Parameter())); |
11143 this._paramCode.add(paramValue.code); | 12529 this._paramCode.add(paramValue.code); |
11144 } | 12530 } |
11145 } | 12531 } |
11146 var body = this.method.get$definition().body; | 12532 var body = this.method.get$definition().body; |
11147 if ($notnull_bool(body == null && !$notnull_bool(this.method.get$isConstructor
()))) { | 12533 if ($notnull_bool(body == null && !$notnull_bool(this.method.get$isConstructor
()))) { |
11148 world.error(('unexpected empty body for ' + this.method.name + ''), this.met
hod.get$definition().get$span()); | 12534 world.error(('unexpected empty body for ' + this.method.name + ''), this.met
hod.get$definition().get$span()); |
11149 } | 12535 } |
11150 if ($notnull_bool($ne(initializers, null))) { | 12536 if ($notnull_bool($ne(initializers, null))) { |
11151 for (var $i = initializers.iterator(); $i.hasNext(); ) { | 12537 for (var $i = initializers.iterator$0(); $i.hasNext$0(); ) { |
11152 var i = $i.next(); | 12538 var i = $i.next$0(); |
11153 this.writer.writeln($assert_String(i)); | 12539 this.writer.writeln($assert_String(i)); |
11154 } | 12540 } |
11155 var declaredInitializers = this.method.get$definition().initializers; | 12541 var declaredInitializers = this.method.get$definition().initializers; |
11156 if (declaredInitializers != null) { | 12542 if (declaredInitializers != null) { |
11157 var initializerCall = null; | 12543 var initializerCall = null; |
11158 for (var $i = 0;$i < declaredInitializers.length; $i++) { | 12544 for (var $i = 0;$i < declaredInitializers.length; $i++) { |
11159 var init = declaredInitializers.$index($i); | 12545 var init = declaredInitializers.$index($i); |
11160 if ((init instanceof CallExpression)) { | 12546 if ((init instanceof CallExpression)) { |
11161 if ($notnull_bool($ne(initializerCall, null))) { | 12547 if ($notnull_bool($ne(initializerCall, null))) { |
11162 world.error('only one initializer redirecting call is allowed', init
.get$span()); | 12548 world.error('only one initializer redirecting call is allowed', init
.get$span()); |
11163 } | 12549 } |
11164 initializerCall = init; | 12550 initializerCall = init; |
11165 } | 12551 } |
11166 else if ((init instanceof BinaryExpression) && TokenKind.kindFromAssign(
init.op.kind) == 0) { | 12552 else if ((init instanceof BinaryExpression) && TokenKind.kindFromAssign(
init.op.kind) == 0) { |
11167 var left = init.x; | 12553 var left = init.x; |
11168 if (!((left instanceof DotExpression) && (left.self instanceof ThisExp
ression) || (left instanceof VarExpression))) { | 12554 if (!((left instanceof DotExpression) && (left.self instanceof ThisExp
ression) || (left instanceof VarExpression))) { |
11169 world.error('invalid left side of initializer', left.get$span()); | 12555 world.error('invalid left side of initializer', left.get$span()); |
11170 continue; | 12556 continue; |
11171 } | 12557 } |
11172 var f = this.method.declaringType.getMember(left.get$name().get$name()
); | 12558 var f = this.method.declaringType.getMember(left.get$name().get$name()
); |
11173 if ($notnull_bool(f == null)) { | 12559 if ($notnull_bool(f == null)) { |
11174 world.error('bad initializer - no matching field', left.get$span()); | 12560 world.error('bad initializer - no matching field', left.get$span()); |
11175 continue; | 12561 continue; |
11176 } | 12562 } |
11177 else if (!$notnull_bool(f.get$isField())) { | 12563 else if (!$notnull_bool(f.get$isField())) { |
11178 world.error(('"' + left.get$name().get$name() + '" does not refer to
a field'), left.get$span()); | 12564 world.error(('"' + left.get$name().get$name() + '" does not refer to
a field'), left.get$span()); |
11179 continue; | 12565 continue; |
11180 } | 12566 } |
11181 initializedFields.add(f.get$name()); | 12567 initializedFields.add$1(f.get$name()); |
11182 this.writer.writeln(('this.' + f.get$jsname() + ' = ' + this.visitValu
e(init.y).code + ';')); | 12568 this.writer.writeln(('this.' + f.get$jsname() + ' = ' + this.visitValu
e(init.y).code + ';')); |
11183 } | 12569 } |
11184 else { | 12570 else { |
11185 world.error('invalid initializer', init.get$span()); | 12571 world.error('invalid initializer', init.get$span()); |
11186 } | 12572 } |
11187 } | 12573 } |
11188 if ($notnull_bool($ne(initializerCall, null))) { | 12574 if ($notnull_bool($ne(initializerCall, null))) { |
11189 var target = this._writeInitializerCall((initializerCall && initializerC
all.is$CallExpression())); | 12575 var target = this._writeInitializerCall((initializerCall && initializerC
all.is$CallExpression())); |
11190 if (!$notnull_bool(target.isSuper)) { | 12576 if (!$notnull_bool(target.isSuper)) { |
11191 if (initializers.length > 0) { | 12577 if (initializers.length > 0) { |
(...skipping 13 matching lines...) Expand all Loading... |
11205 initializedFields = null; | 12591 initializedFields = null; |
11206 } | 12592 } |
11207 } | 12593 } |
11208 else { | 12594 else { |
11209 } | 12595 } |
11210 } | 12596 } |
11211 this.writer.comment('// Initializers done'); | 12597 this.writer.comment('// Initializers done'); |
11212 } | 12598 } |
11213 if ($notnull_bool($ne(initializedFields, null))) { | 12599 if ($notnull_bool($ne(initializedFields, null))) { |
11214 var $list = this.method.declaringType.get$members().getKeys(); | 12600 var $list = this.method.declaringType.get$members().getKeys(); |
11215 for (var $i = this.method.declaringType.get$members().getKeys().iterator();
$i.hasNext(); ) { | 12601 for (var $i = this.method.declaringType.get$members().getKeys().iterator$0()
; $i.hasNext$0(); ) { |
11216 var name = $i.next(); | 12602 var name = $i.next$0(); |
11217 var member = this.method.declaringType.get$members().$index(name); | 12603 var member = this.method.declaringType.get$members().$index(name); |
11218 if ($notnull_bool((member instanceof FieldMember) && member.isFinal) && !$
notnull_bool(member.get$isStatic()) && !initializedFields.contains(name)) { | 12604 if ($notnull_bool((member instanceof FieldMember) && member.isFinal) && !$
notnull_bool(member.get$isStatic()) && !$notnull_bool(initializedFields.contains
$1(name))) { |
11219 world.error(('Field "' + name + '" is final and was not initialized'), t
his.method.get$definition().get$span()); | 12605 world.error(('Field "' + name + '" is final and was not initialized'), t
his.method.get$definition().get$span()); |
11220 } | 12606 } |
11221 } | 12607 } |
11222 } | 12608 } |
11223 this.visitStatementsInBlock((body && body.is$lang_Statement())); | 12609 this.visitStatementsInBlock((body && body.is$lang_Statement())); |
11224 } | 12610 } |
11225 MethodGenerator.prototype._writeInitializerCall = function(node) { | 12611 MethodGenerator.prototype._writeInitializerCall = function(node) { |
11226 var contructorName = ''; | 12612 var contructorName = ''; |
11227 var targetExp = node.target; | 12613 var targetExp = node.target; |
11228 if ((targetExp instanceof DotExpression)) { | 12614 if ((targetExp instanceof DotExpression)) { |
11229 var dot = (targetExp && targetExp.is$DotExpression()); | 12615 var dot = (targetExp && targetExp.is$DotExpression()); |
11230 targetExp = dot.self; | 12616 targetExp = dot.self; |
11231 contructorName = dot.name.name; | 12617 contructorName = dot.name.name; |
11232 } | 12618 } |
11233 var target = null; | 12619 var target = null; |
11234 if ((targetExp instanceof SuperExpression)) { | 12620 if ((targetExp instanceof SuperExpression)) { |
11235 target = this._makeSuperValue((targetExp && targetExp.is$lang_Node())); | 12621 target = this._makeSuperValue((targetExp && targetExp.is$lang_Node())); |
11236 } | 12622 } |
11237 else if ((targetExp instanceof ThisExpression)) { | 12623 else if ((targetExp instanceof ThisExpression)) { |
11238 target = this._makeThisValue((targetExp && targetExp.is$lang_Node())); | 12624 target = this._makeThisValue((targetExp && targetExp.is$lang_Node())); |
11239 } | 12625 } |
11240 else { | 12626 else { |
11241 world.error('bad call in initializers', node.span); | 12627 world.error('bad call in initializers', node.span); |
11242 } | 12628 } |
11243 var m = target.type.getConstructor(contructorName); | 12629 var m = target.type.getConstructor$1(contructorName); |
11244 this.method.set$initDelegate(m); | 12630 this.method.set$initDelegate(m); |
11245 var other = m; | 12631 var other = m; |
11246 while ($notnull_bool($ne(other, null))) { | 12632 while ($notnull_bool($ne(other, null))) { |
11247 if ($notnull_bool($eq(other, this.method))) { | 12633 if ($notnull_bool($eq(other, this.method))) { |
11248 world.error('initialization cycle', node.span); | 12634 world.error('initialization cycle', node.span); |
11249 break; | 12635 break; |
11250 } | 12636 } |
11251 other = other.get$initDelegate(); | 12637 other = other.get$initDelegate(); |
11252 } | 12638 } |
11253 world.gen.genMethod((m && m.is$Member())); | 12639 world.gen.genMethod((m && m.is$Member())); |
11254 var value = m.invoke$4(this, node, target, this._makeArgs(node.arguments)); | 12640 var value = m.invoke$4(this, node, target, this._makeArgs(node.arguments)); |
11255 if ($notnull_bool($ne(target.type, world.objectType))) { | 12641 if ($notnull_bool($ne(target.type, world.objectType))) { |
11256 this.writer.writeln(('' + value.code + ';')); | 12642 this.writer.writeln(('' + value.code + ';')); |
11257 } | 12643 } |
11258 return (target && target.is$Value()); | 12644 return (target && target.is$Value()); |
11259 } | 12645 } |
11260 MethodGenerator.prototype._makeArgs = function(arguments) { | 12646 MethodGenerator.prototype._makeArgs = function(arguments) { |
11261 var $0; | 12647 var $0; |
11262 var args = []; | 12648 var args = []; |
11263 var seenLabel = false; | 12649 var seenLabel = false; |
11264 for (var $i = 0;$i < arguments.length; $i++) { | 12650 for (var $i = 0;$i < arguments.length; $i++) { |
11265 var arg = arguments.$index($i); | 12651 var arg = arguments.$index($i); |
11266 if (arg.label != null) { | 12652 if (arg.label != null) { |
11267 seenLabel = true; | 12653 seenLabel = true; |
11268 } | 12654 } |
11269 else if ($notnull_bool(seenLabel)) { | 12655 else if ($notnull_bool(seenLabel)) { |
11270 world.error('bare argument can not follow named arguments', arg.get$span()
); | 12656 world.error('bare argument can not follow named arguments', arg.get$span()
); |
11271 } | 12657 } |
11272 args.add(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression())
)); | 12658 args.add$1(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression(
)))); |
11273 } | 12659 } |
11274 return new Arguments(arguments, args); | 12660 return new Arguments(arguments, args); |
11275 } | 12661 } |
11276 MethodGenerator._escapeString = function(text) { | 12662 MethodGenerator._escapeString = function(text) { |
11277 return text.replaceAll('\\', '\\\\').replaceAll('"', '\\"').replaceAll('\n', '
\\n').replaceAll('\r', '\\r'); | 12663 return text.replaceAll('\\', '\\\\').replaceAll('"', '\\"').replaceAll('\n', '
\\n').replaceAll('\r', '\\r'); |
11278 } | 12664 } |
11279 MethodGenerator.prototype.visitStatementsInBlock = function(body) { | 12665 MethodGenerator.prototype.visitStatementsInBlock = function(body) { |
11280 if ((body instanceof BlockStatement)) { | 12666 if ((body instanceof BlockStatement)) { |
11281 var block = (body && body.is$BlockStatement()); | 12667 var block = (body && body.is$BlockStatement()); |
11282 var $list = block.body; | 12668 var $list = block.body; |
11283 for (var $i = 0;$i < $list.length; $i++) { | 12669 for (var $i = 0;$i < $list.length; $i++) { |
11284 var stmt = $list.$index($i); | 12670 var stmt = $list.$index($i); |
11285 stmt.visit(this); | 12671 stmt.visit$1(this); |
11286 } | 12672 } |
11287 } | 12673 } |
11288 else { | 12674 else { |
11289 if (body != null) body.visit(this); | 12675 if (body != null) body.visit(this); |
11290 } | 12676 } |
11291 return false; | 12677 return false; |
11292 } | 12678 } |
11293 MethodGenerator.prototype._pushBlock = function(reentrant) { | 12679 MethodGenerator.prototype._pushBlock = function(reentrant) { |
11294 this._scope = new BlockScope(this, this._scope, reentrant); | 12680 this._scope = new BlockScope(this, this._scope, reentrant); |
11295 } | 12681 } |
11296 MethodGenerator.prototype._popBlock = function() { | 12682 MethodGenerator.prototype._popBlock = function() { |
11297 this._scope = this._scope.parent; | 12683 this._scope = this._scope.parent; |
11298 } | 12684 } |
11299 MethodGenerator.prototype._makeLambdaMethod = function(name, func) { | 12685 MethodGenerator.prototype._makeLambdaMethod = function(name, func) { |
11300 var meth = new MethodMember(name, this.method.declaringType, func); | 12686 var meth = new MethodMember(name, this.method.declaringType, func); |
11301 meth.isLambda = true; | 12687 meth.isLambda = true; |
11302 meth.resolve(this.method.declaringType); | 12688 meth.resolve$1(this.method.declaringType); |
11303 world.gen.genMethod((meth && meth.is$Member()), this); | 12689 world.gen.genMethod((meth && meth.is$Member()), this); |
11304 return (meth && meth.is$MethodMember()); | 12690 return (meth && meth.is$MethodMember()); |
11305 } | 12691 } |
11306 MethodGenerator.prototype.visitBool = function(node) { | 12692 MethodGenerator.prototype.visitBool = function(node) { |
11307 return this.visitValue(node).convertTo(this, world.nonNullBool, node, false); | 12693 return this.visitValue(node).convertTo$3(this, world.nonNullBool, node); |
11308 } | 12694 } |
11309 MethodGenerator.prototype.visitValue = function(node) { | 12695 MethodGenerator.prototype.visitValue = function(node) { |
11310 if (node == null) return null; | 12696 if (node == null) return null; |
11311 var value = node.visit(this); | 12697 var value = node.visit(this); |
11312 value.checkFirstClass(node.span); | 12698 value.checkFirstClass$1(node.span); |
11313 return value; | 12699 return value; |
11314 } | 12700 } |
11315 MethodGenerator.prototype.visitTypedValue = function(node, expectedType) { | 12701 MethodGenerator.prototype.visitTypedValue = function(node, expectedType) { |
11316 return this.visitValue(node).convertTo(this, expectedType, node, false); | 12702 return this.visitValue(node).convertTo$3(this, expectedType, node); |
11317 } | 12703 } |
11318 MethodGenerator.prototype.visitVoid = function(node) { | 12704 MethodGenerator.prototype.visitVoid = function(node) { |
11319 if ((node instanceof PostfixExpression)) { | 12705 if ((node instanceof PostfixExpression)) { |
11320 var value = this.visitPostfixExpression((node && node.is$PostfixExpression()
), true); | 12706 var value = this.visitPostfixExpression((node && node.is$PostfixExpression()
), true); |
11321 value.checkFirstClass(node.span); | 12707 value.checkFirstClass$1(node.span); |
11322 return value; | 12708 return value; |
11323 } | 12709 } |
11324 return this.visitValue(node); | 12710 return this.visitValue(node); |
11325 } | 12711 } |
11326 MethodGenerator.prototype.visitDietStatement = function(node) { | 12712 MethodGenerator.prototype.visitDietStatement = function(node) { |
11327 var parser = new lang_Parser(node.span.file, false, false, false, node.span.st
art); | 12713 var parser = new lang_Parser(node.span.file, false, false, false, node.span.st
art); |
11328 this.visitStatementsInBlock(parser.block()); | 12714 this.visitStatementsInBlock(parser.block$0()); |
11329 return false; | 12715 return false; |
11330 } | 12716 } |
11331 MethodGenerator.prototype.visitVariableDefinition = function(node) { | 12717 MethodGenerator.prototype.visitVariableDefinition = function(node) { |
11332 var $0; | 12718 var $0; |
11333 var isFinal = false; | 12719 var isFinal = false; |
11334 if ($notnull_bool(node.modifiers != null && $eq(node.modifiers.$index(0).kind,
97/*TokenKind.FINAL*/))) { | 12720 if ($notnull_bool(node.modifiers != null && $eq(node.modifiers.$index(0).kind,
97/*TokenKind.FINAL*/))) { |
11335 isFinal = true; | 12721 isFinal = true; |
11336 } | 12722 } |
11337 this.writer.write('var '); | 12723 this.writer.write('var '); |
11338 var type = this.method.resolveType(node.type, false); | 12724 var type = this.method.resolveType(node.type, false); |
(...skipping 11 matching lines...) Expand all Loading... |
11350 } | 12736 } |
11351 else { | 12737 else { |
11352 if ($notnull_bool(thisType.get$isVar())) thisType = value.type; | 12738 if ($notnull_bool(thisType.get$isVar())) thisType = value.type; |
11353 } | 12739 } |
11354 } | 12740 } |
11355 var val = this._scope.create($assert_String(name), (thisType && thisType.is$
lang_Type()), node.names.$index(i).get$span(), false); | 12741 var val = this._scope.create($assert_String(name), (thisType && thisType.is$
lang_Type()), node.names.$index(i).get$span(), false); |
11356 if ($notnull_bool(value == null)) { | 12742 if ($notnull_bool(value == null)) { |
11357 this.writer.write(('' + val.code + '')); | 12743 this.writer.write(('' + val.code + '')); |
11358 } | 12744 } |
11359 else { | 12745 else { |
11360 value = value.convertTo(this, (type && type.is$lang_Type()), (($0 = node.v
alues.$index(i)) && $0.is$lang_Node()), false); | 12746 value = value.convertTo$3(this, type, node.values.$index(i)); |
11361 this.writer.write(('' + val.code + ' = ' + value.code + '')); | 12747 this.writer.write(('' + val.code + ' = ' + value.code + '')); |
11362 } | 12748 } |
11363 } | 12749 } |
11364 this.writer.writeln(';'); | 12750 this.writer.writeln(';'); |
11365 return false; | 12751 return false; |
11366 } | 12752 } |
11367 MethodGenerator.prototype.visitFunctionDefinition = function(node) { | 12753 MethodGenerator.prototype.visitFunctionDefinition = function(node) { |
11368 var $0; | 12754 var $0; |
11369 var name = world.toJsIdentifier(node.name.name); | 12755 var name = world.toJsIdentifier(node.name.name); |
11370 var meth = this._makeLambdaMethod($assert_String(name), node); | 12756 var meth = this._makeLambdaMethod($assert_String(name), node); |
11371 var funcValue = this._scope.create($assert_String(name), (($0 = meth.get$funct
ionType()) && $0.is$lang_Type()), this.method.get$definition().get$span(), false
); | 12757 var funcValue = this._scope.create($assert_String(name), (($0 = meth.get$funct
ionType()) && $0.is$lang_Type()), this.method.get$definition().get$span(), false
); |
11372 meth.generator.writeDefinition(this.writer, null); | 12758 meth.generator.writeDefinition$2(this.writer); |
11373 return false; | 12759 return false; |
11374 } | 12760 } |
11375 MethodGenerator.prototype.visitReturnStatement = function(node) { | 12761 MethodGenerator.prototype.visitReturnStatement = function(node) { |
11376 if (node.value == null) { | 12762 if (node.value == null) { |
11377 this.writer.writeln('return;'); | 12763 this.writer.writeln('return;'); |
11378 } | 12764 } |
11379 else { | 12765 else { |
11380 if ($notnull_bool(this.method.get$isConstructor())) { | 12766 if ($notnull_bool(this.method.get$isConstructor())) { |
11381 world.error('return of value not allowed from constructor', node.span); | 12767 world.error('return of value not allowed from constructor', node.span); |
11382 } | 12768 } |
(...skipping 18 matching lines...) Expand all Loading... |
11401 this.writer.writeln(('throw ' + rethrow.code + ';')); | 12787 this.writer.writeln(('throw ' + rethrow.code + ';')); |
11402 } | 12788 } |
11403 } | 12789 } |
11404 return true; | 12790 return true; |
11405 } | 12791 } |
11406 MethodGenerator.prototype.visitAssertStatement = function(node) { | 12792 MethodGenerator.prototype.visitAssertStatement = function(node) { |
11407 var $0; | 12793 var $0; |
11408 var test = this.visitValue(node.test); | 12794 var test = this.visitValue(node.test); |
11409 if ($notnull_bool(options.enableAsserts)) { | 12795 if ($notnull_bool(options.enableAsserts)) { |
11410 var err = world.corelib.types.$index('AssertError'); | 12796 var err = world.corelib.types.$index('AssertError'); |
11411 world.gen.genMethod((($0 = err.getConstructor('')) && $0.is$Member())); | 12797 world.gen.genMethod((($0 = err.getConstructor$1('')) && $0.is$Member())); |
11412 world.gen.genMethod((($0 = err.get$members().$index('toString')) && $0.is$Me
mber())); | 12798 world.gen.genMethod((($0 = err.get$members().$index('toString')) && $0.is$Me
mber())); |
11413 var span = node.test.span; | 12799 var span = node.test.span; |
11414 var line = span.file.getLine(span.start); | 12800 var line = span.file.getLine(span.start); |
11415 var column = span.file.getColumn($assert_num(line), span.start); | 12801 var column = span.file.getColumn($assert_num(line), span.start); |
11416 this.writer.writeln(('\$assert(' + test.code + ', "' + MethodGenerator._esca
peString(span.get$text()) + '",') + (' "' + basename(span.file.filename) + '", '
+ (line + 1) + ', ' + (column + 1) + ');')); | 12802 this.writer.writeln(('\$assert(' + test.code + ', "' + MethodGenerator._esca
peString(span.get$text()) + '",') + (' "' + basename(span.file.filename) + '", '
+ (line + 1) + ', ' + (column + 1) + ');')); |
11417 world.gen.corejs.useAssert = true; | 12803 world.gen.corejs.useAssert = true; |
11418 } | 12804 } |
11419 return false; | 12805 return false; |
11420 } | 12806 } |
11421 MethodGenerator.prototype.visitBreakStatement = function(node) { | 12807 MethodGenerator.prototype.visitBreakStatement = function(node) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11523 this.visitStatementsInBlock(node.body); | 12909 this.visitStatementsInBlock(node.body); |
11524 this.writer.exitBlock('}'); | 12910 this.writer.exitBlock('}'); |
11525 this._popBlock(); | 12911 this._popBlock(); |
11526 return false; | 12912 return false; |
11527 } | 12913 } |
11528 MethodGenerator.prototype._genToDartException = function(ex, node) { | 12914 MethodGenerator.prototype._genToDartException = function(ex, node) { |
11529 var types = const$403/*const [ | 12915 var types = const$403/*const [ |
11530 'NullPointerException', 'ObjectNotClosureException', | 12916 'NullPointerException', 'ObjectNotClosureException', |
11531 'NoSuchMethodException', 'StackOverflowException']*/; | 12917 'NoSuchMethodException', 'StackOverflowException']*/; |
11532 var target = new Value(world.varType, 'this', node.span, true); | 12918 var target = new Value(world.varType, 'this', node.span, true); |
11533 for (var $i = types.iterator(); $i.hasNext(); ) { | 12919 for (var $i = types.iterator$0(); $i.hasNext$0(); ) { |
11534 var name = $i.next(); | 12920 var name = $i.next$0(); |
11535 world.corelib.types.$index(name).markUsed(); | 12921 world.corelib.types.$index(name).markUsed$0(); |
11536 world.corelib.types.$index(name).get$members().$index('toString').invoke$4(t
his, node, target, Arguments.get$EMPTY()); | 12922 world.corelib.types.$index(name).get$members().$index('toString').invoke$4(t
his, node, target, Arguments.get$EMPTY()); |
11537 } | 12923 } |
11538 this.writer.writeln(('' + ex + ' = \$toDartException(' + ex + ');')); | 12924 this.writer.writeln(('' + ex + ' = \$toDartException(' + ex + ');')); |
11539 world.gen.corejs.useToDartException = true; | 12925 world.gen.corejs.useToDartException = true; |
11540 } | 12926 } |
11541 MethodGenerator.prototype.visitTryStatement = function(node) { | 12927 MethodGenerator.prototype.visitTryStatement = function(node) { |
11542 var $0; | 12928 var $0; |
11543 this.writer.enterBlock('try {'); | 12929 this.writer.enterBlock('try {'); |
11544 this._pushBlock(false); | 12930 this._pushBlock(false); |
11545 this.visitStatementsInBlock(node.body); | 12931 this.visitStatementsInBlock(node.body); |
11546 this._popBlock(); | 12932 this._popBlock(); |
11547 if (node.catches.length == 1) { | 12933 if (node.catches.length == 1) { |
11548 var catch_ = node.catches.$index(0); | 12934 var catch_ = node.catches.$index(0); |
11549 this._pushBlock(false); | 12935 this._pushBlock(false); |
11550 var ex = this._scope.declare((($0 = catch_.get$exception()) && $0.is$Declare
dIdentifier())); | 12936 var ex = this._scope.declare((($0 = catch_.get$exception()) && $0.is$Declare
dIdentifier())); |
11551 this._scope.rethrow = (ex && ex.is$Value()); | 12937 this._scope.rethrow = (ex && ex.is$Value()); |
11552 this.writer.nextBlock(('} catch (' + ex.code + ') {')); | 12938 this.writer.nextBlock(('} catch (' + ex.code + ') {')); |
11553 if (catch_.trace != null) { | 12939 if (catch_.trace != null) { |
11554 var trace = this._scope.declare(catch_.trace); | 12940 var trace = this._scope.declare(catch_.trace); |
11555 this.writer.writeln(('var ' + trace.code + ' = \$stackTraceOf(' + ex.code
+ ');')); | 12941 this.writer.writeln(('var ' + trace.code + ' = \$stackTraceOf(' + ex.code
+ ');')); |
11556 world.gen.corejs.useStackTraceOf = true; | 12942 world.gen.corejs.useStackTraceOf = true; |
11557 } | 12943 } |
11558 this._genToDartException(ex.code, node); | 12944 this._genToDartException(ex.code, node); |
11559 if (!$notnull_bool(ex.type.get$isVar())) { | 12945 if (!$notnull_bool(ex.type.get$isVar())) { |
11560 var test = ex.instanceOf(this, (($0 = ex.type) && $0.is$lang_Type()), catc
h_.get$exception().get$span(), false, true); | 12946 var test = ex.instanceOf$3$isTrue$forceCheck(this, ex.type, catch_.get$exc
eption().get$span(), false, true); |
11561 this.writer.writeln(('if (' + test.code + ') throw ' + ex.code + ';')); | 12947 this.writer.writeln(('if (' + test.code + ') throw ' + ex.code + ';')); |
11562 } | 12948 } |
11563 this.visitStatementsInBlock((($0 = node.catches.$index(0).body) && $0.is$lan
g_Statement())); | 12949 this.visitStatementsInBlock((($0 = node.catches.$index(0).body) && $0.is$lan
g_Statement())); |
11564 this._popBlock(); | 12950 this._popBlock(); |
11565 } | 12951 } |
11566 else if (node.catches.length > 0) { | 12952 else if (node.catches.length > 0) { |
11567 this._pushBlock(false); | 12953 this._pushBlock(false); |
11568 var ex = this._scope.create('\$ex', world.varType, null, false); | 12954 var ex = this._scope.create('\$ex', world.varType, null, false); |
11569 this._scope.rethrow = (ex && ex.is$Value()); | 12955 this._scope.rethrow = (ex && ex.is$Value()); |
11570 this.writer.nextBlock(('} catch (' + ex.code + ') {')); | 12956 this.writer.nextBlock(('} catch (' + ex.code + ') {')); |
11571 var trace = null; | 12957 var trace = null; |
11572 if (node.catches.some((function (c) { | 12958 if (node.catches.some((function (c) { |
11573 return c.trace != null; | 12959 return c.trace != null; |
11574 }) | 12960 }) |
11575 )) { | 12961 )) { |
11576 trace = this._scope.create('\$trace', world.varType, null, false); | 12962 trace = this._scope.create('\$trace', world.varType, null, false); |
11577 this.writer.writeln(('var ' + trace.code + ' = \$stackTraceOf(' + ex.code
+ ');')); | 12963 this.writer.writeln(('var ' + trace.code + ' = \$stackTraceOf(' + ex.code
+ ');')); |
11578 world.gen.corejs.useStackTraceOf = true; | 12964 world.gen.corejs.useStackTraceOf = true; |
11579 } | 12965 } |
11580 this._genToDartException(ex.code, node); | 12966 this._genToDartException(ex.code, node); |
11581 var needsRethrow = true; | 12967 var needsRethrow = true; |
11582 for (var i = 0; | 12968 for (var i = 0; |
11583 i < node.catches.length; i++) { | 12969 i < node.catches.length; i++) { |
11584 var catch_ = node.catches.$index(i); | 12970 var catch_ = node.catches.$index(i); |
11585 this._pushBlock(false); | 12971 this._pushBlock(false); |
11586 var tmp = this._scope.declare((($0 = catch_.get$exception()) && $0.is$Decl
aredIdentifier())); | 12972 var tmp = this._scope.declare((($0 = catch_.get$exception()) && $0.is$Decl
aredIdentifier())); |
11587 if (!$notnull_bool(tmp.type.get$isVar())) { | 12973 if (!$notnull_bool(tmp.type.get$isVar())) { |
11588 var test = ex.instanceOf(this, (($0 = tmp.type) && $0.is$lang_Type()), c
atch_.get$exception().get$span(), true, true); | 12974 var test = ex.instanceOf$3$isTrue$forceCheck(this, tmp.type, catch_.get$
exception().get$span(), true, true); |
11589 if (i == 0) { | 12975 if (i == 0) { |
11590 this.writer.enterBlock(('if (' + test.code + ') {')); | 12976 this.writer.enterBlock(('if (' + test.code + ') {')); |
11591 } | 12977 } |
11592 else { | 12978 else { |
11593 this.writer.nextBlock(('} else if (' + test.code + ') {')); | 12979 this.writer.nextBlock(('} else if (' + test.code + ') {')); |
11594 } | 12980 } |
11595 } | 12981 } |
11596 else if (i > 0) { | 12982 else if (i > 0) { |
11597 this.writer.nextBlock('} else {'); | 12983 this.writer.nextBlock('} else {'); |
11598 } | 12984 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11664 this.writer.exitBlock(''); | 13050 this.writer.exitBlock(''); |
11665 this._popBlock(); | 13051 this._popBlock(); |
11666 } | 13052 } |
11667 this.writer.exitBlock('}'); | 13053 this.writer.exitBlock('}'); |
11668 return false; | 13054 return false; |
11669 } | 13055 } |
11670 MethodGenerator.prototype._visitAllStatements = function(statementList, exits) { | 13056 MethodGenerator.prototype._visitAllStatements = function(statementList, exits) { |
11671 for (var i = 0; | 13057 for (var i = 0; |
11672 i < statementList.length; i++) { | 13058 i < statementList.length; i++) { |
11673 var stmt = statementList.$index(i); | 13059 var stmt = statementList.$index(i); |
11674 exits = stmt.visit(this); | 13060 exits = stmt.visit$1(this); |
11675 if ($notnull_bool($ne(stmt, statementList.$index(statementList.length - 1))
&& exits)) { | 13061 if ($notnull_bool($ne(stmt, statementList.$index(statementList.length - 1))
&& exits)) { |
11676 world.warning('unreachable code', statementList.$index(i + 1).get$span()); | 13062 world.warning('unreachable code', statementList.$index(i + 1).get$span()); |
11677 } | 13063 } |
11678 } | 13064 } |
11679 return $assert_bool(exits); | 13065 return $assert_bool(exits); |
11680 } | 13066 } |
11681 MethodGenerator.prototype.visitBlockStatement = function(node) { | 13067 MethodGenerator.prototype.visitBlockStatement = function(node) { |
11682 this._pushBlock(false); | 13068 this._pushBlock(false); |
11683 this.writer.enterBlock('{'); | 13069 this.writer.enterBlock('{'); |
11684 var exits = this._visitAllStatements(node.body, false); | 13070 var exits = this._visitAllStatements(node.body, false); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11746 return new Value(this.method.declaringType, 'this', node != null ? node.span
: null, false); | 13132 return new Value(this.method.declaringType, 'this', node != null ? node.span
: null, false); |
11747 } | 13133 } |
11748 } | 13134 } |
11749 MethodGenerator.prototype.visitLambdaExpression = function(node) { | 13135 MethodGenerator.prototype.visitLambdaExpression = function(node) { |
11750 var name = ''; | 13136 var name = ''; |
11751 if (node.func.name != null) { | 13137 if (node.func.name != null) { |
11752 name = world.toJsIdentifier(node.func.name.name); | 13138 name = world.toJsIdentifier(node.func.name.name); |
11753 } | 13139 } |
11754 var meth = this._makeLambdaMethod($assert_String(name), node.func); | 13140 var meth = this._makeLambdaMethod($assert_String(name), node.func); |
11755 var w = new CodeWriter(); | 13141 var w = new CodeWriter(); |
11756 meth.generator.writeDefinition((w && w.is$CodeWriter()), node); | 13142 meth.generator.writeDefinition$2(w, node); |
11757 return new Value(meth.get$functionType(), w.get$text(), node.span, true); | 13143 return new Value(meth.get$functionType(), w.get$text(), node.span, true); |
11758 } | 13144 } |
11759 MethodGenerator.prototype.visitCallExpression = function(node) { | 13145 MethodGenerator.prototype.visitCallExpression = function(node) { |
11760 var $0; | 13146 var $0; |
11761 var target; | 13147 var target; |
11762 var position = node.target; | 13148 var position = node.target; |
11763 var name = '\$call'; | 13149 var name = '\$call'; |
11764 if ((node.target instanceof DotExpression)) { | 13150 if ((node.target instanceof DotExpression)) { |
11765 var dot = (($0 = node.target) && $0.is$DotExpression()); | 13151 var dot = (($0 = node.target) && $0.is$DotExpression()); |
11766 target = dot.self.visit(this); | 13152 target = dot.self.visit(this); |
(...skipping 25 matching lines...) Expand all Loading... |
11792 var kind = node.op.kind; | 13178 var kind = node.op.kind; |
11793 if (kind == 35/*TokenKind.AND*/ || kind == 34/*TokenKind.OR*/) { | 13179 if (kind == 35/*TokenKind.AND*/ || kind == 34/*TokenKind.OR*/) { |
11794 var x = this.visitValue(node.x); | 13180 var x = this.visitValue(node.x); |
11795 var y = this.visitValue(node.y); | 13181 var y = this.visitValue(node.y); |
11796 var code = ('' + x.code + ' ' + node.op + ' ' + y.code + ''); | 13182 var code = ('' + x.code + ' ' + node.op + ' ' + y.code + ''); |
11797 if ($notnull_bool(x.get$isConst() && y.get$isConst())) { | 13183 if ($notnull_bool(x.get$isConst() && y.get$isConst())) { |
11798 var value = (kind == 35/*TokenKind.AND*/) ? $notnull_bool(x.get$actualValu
e() && y.get$actualValue()) : $notnull_bool(x.get$actualValue() || y.get$actualV
alue()); | 13184 var value = (kind == 35/*TokenKind.AND*/) ? $notnull_bool(x.get$actualValu
e() && y.get$actualValue()) : $notnull_bool(x.get$actualValue() || y.get$actualV
alue()); |
11799 return EvaluatedValue.EvaluatedValue$factory((($0 = x.type) && $0.is$lang_
Type()), value, ('' + value + ''), node.span); | 13185 return EvaluatedValue.EvaluatedValue$factory((($0 = x.type) && $0.is$lang_
Type()), value, ('' + value + ''), node.span); |
11800 } | 13186 } |
11801 var ret = new Value(lang_Type.union((($0 = x.type) && $0.is$lang_Type()), ((
$0 = y.type) && $0.is$lang_Type())), code, node.span, true); | 13187 var ret = new Value(lang_Type.union((($0 = x.type) && $0.is$lang_Type()), ((
$0 = y.type) && $0.is$lang_Type())), code, node.span, true); |
11802 return ret.convertTo(this, world.nonNullBool, node, false); | 13188 return ret.convertTo$3(this, world.nonNullBool, node); |
11803 } | 13189 } |
11804 else if (kind == 50/*TokenKind.EQ_STRICT*/ || kind == 51/*TokenKind.NE_STRICT*
/) { | 13190 else if (kind == 50/*TokenKind.EQ_STRICT*/ || kind == 51/*TokenKind.NE_STRICT*
/) { |
11805 var x = this.visitValue(node.x); | 13191 var x = this.visitValue(node.x); |
11806 var y = this.visitValue(node.y); | 13192 var y = this.visitValue(node.y); |
11807 if ($notnull_bool(x.get$isConst() && y.get$isConst())) { | 13193 if ($notnull_bool(x.get$isConst() && y.get$isConst())) { |
11808 var value = kind == 50/*TokenKind.EQ_STRICT*/ ? $eq(x.get$actualValue(), y
.get$actualValue()) : $ne(x.get$actualValue(), y.get$actualValue()); | 13194 var value = kind == 50/*TokenKind.EQ_STRICT*/ ? $eq(x.get$actualValue(), y
.get$actualValue()) : $ne(x.get$actualValue(), y.get$actualValue()); |
11809 return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, value, (""
+ value + ""), node.span); | 13195 return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, value, (""
+ value + ""), node.span); |
11810 } | 13196 } |
11811 if (x.code == 'null' || y.code == 'null') { | 13197 if (x.code == 'null' || y.code == 'null') { |
11812 var op = node.op.toString().substring(0, 2); | 13198 var op = node.op.toString().substring(0, 2); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11848 return this._visitIndexAssign(kind, (xn && xn.is$IndexExpression()), yn, pos
ition, captureOriginal); | 13234 return this._visitIndexAssign(kind, (xn && xn.is$IndexExpression()), yn, pos
ition, captureOriginal); |
11849 } | 13235 } |
11850 else if ((xn instanceof DotExpression)) { | 13236 else if ((xn instanceof DotExpression)) { |
11851 return this._visitDotAssign(kind, (xn && xn.is$DotExpression()), yn, positio
n, captureOriginal); | 13237 return this._visitDotAssign(kind, (xn && xn.is$DotExpression()), yn, positio
n, captureOriginal); |
11852 } | 13238 } |
11853 else { | 13239 else { |
11854 world.error('illegal lhs', position.span); | 13240 world.error('illegal lhs', position.span); |
11855 } | 13241 } |
11856 } | 13242 } |
11857 MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap
tureOriginal) { | 13243 MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap
tureOriginal) { |
11858 var $0; | |
11859 var name = xn.name.name; | 13244 var name = xn.name.name; |
11860 var x = this._scope.lookup(name); | 13245 var x = this._scope.lookup(name); |
11861 var y = this.visitValue(yn); | 13246 var y = this.visitValue(yn); |
11862 if ($notnull_bool(x == null)) { | 13247 if ($notnull_bool(x == null)) { |
11863 var members = this.method.declaringType.resolveMember(name); | 13248 var members = this.method.declaringType.resolveMember(name); |
11864 if ($notnull_bool($ne(members, null))) { | 13249 if ($notnull_bool($ne(members, null))) { |
11865 x = this._makeThisOrType(position.span); | 13250 x = this._makeThisOrType(position.span); |
11866 if (kind == 0) { | 13251 if (kind == 0) { |
11867 return x.set_(this, name, position, (y && y.is$Value()), false); | 13252 return x.set_$4(this, name, position, y); |
11868 } | 13253 } |
11869 else if ($notnull_bool(!$notnull_bool(members.get$treatAsField()) || membe
rs.get$containsMethods())) { | 13254 else if ($notnull_bool(!$notnull_bool(members.get$treatAsField()) || membe
rs.get$containsMethods())) { |
11870 var right = x.get_(this, name, position); | 13255 var right = x.get_$3(this, name, position); |
11871 right = captureOriginal((right && right.is$Value())); | 13256 right = captureOriginal((right && right.is$Value())); |
11872 y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new
Arguments(null, [y])); | 13257 y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new
Arguments(null, [y])); |
11873 return x.set_(this, name, position, (y && y.is$Value()), false); | 13258 return x.set_$4(this, name, position, y); |
11874 } | 13259 } |
11875 else { | 13260 else { |
11876 x = x.get_(this, name, position); | 13261 x = x.get_$3(this, name, position); |
11877 } | 13262 } |
11878 } | 13263 } |
11879 else { | 13264 else { |
11880 var member = this.get$library().lookup(name, xn.name.span); | 13265 var member = this.get$library().lookup(name, xn.name.span); |
11881 if (member == null) { | 13266 if (member == null) { |
11882 world.warning(('can not resolve ' + name + ''), xn.span); | 13267 world.warning(('can not resolve ' + name + ''), xn.span); |
11883 return this._makeMissingValue(name); | 13268 return this._makeMissingValue(name); |
11884 } | 13269 } |
11885 members = new MemberSet(member); | 13270 members = new MemberSet(member, false); |
11886 if ($notnull_bool(!$notnull_bool(members.get$treatAsField()) || members.ge
t$containsMethods())) { | 13271 if ($notnull_bool(!$notnull_bool(members.get$treatAsField()) || members.ge
t$containsMethods())) { |
11887 if (kind != 0) { | 13272 if (kind != 0) { |
11888 var right = members._get$3(this, position, x); | 13273 var right = members._get$3(this, position, x); |
11889 right = captureOriginal((right && right.is$Value())); | 13274 right = captureOriginal((right && right.is$Value())); |
11890 y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, n
ew Arguments(null, [y])); | 13275 y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, n
ew Arguments(null, [y])); |
11891 } | 13276 } |
11892 return members._set$4(this, position, x, y); | 13277 return members._set$4(this, position, x, y); |
11893 } | 13278 } |
11894 else { | 13279 else { |
11895 x = members._get$3(this, position, x); | 13280 x = members._get$3(this, position, x); |
11896 } | 13281 } |
11897 } | 13282 } |
11898 } | 13283 } |
11899 y = y.convertTo(this, (($0 = x.type) && $0.is$lang_Type()), yn, false); | 13284 y = y.convertTo$3(this, x.type, yn); |
11900 if (kind == 0) { | 13285 if (kind == 0) { |
11901 x = captureOriginal((x && x.is$Value())); | 13286 x = captureOriginal((x && x.is$Value())); |
11902 return new Value(y.type, ('' + x.code + ' = ' + y.code + ''), position.span,
true); | 13287 return new Value(y.type, ('' + x.code + ' = ' + y.code + ''), position.span,
true); |
11903 } | 13288 } |
11904 else if ($notnull_bool(x.type.get$isNum() && y.type.get$isNum()) && (kind != 4
6/*TokenKind.TRUNCDIV*/)) { | 13289 else if ($notnull_bool(x.type.get$isNum() && y.type.get$isNum()) && (kind != 4
6/*TokenKind.TRUNCDIV*/)) { |
11905 x = captureOriginal((x && x.is$Value())); | 13290 x = captureOriginal((x && x.is$Value())); |
11906 var op = TokenKind.kindToString(kind); | 13291 var op = TokenKind.kindToString(kind); |
11907 return new Value(y.type, ('' + x.code + ' ' + op + '= ' + y.code + ''), posi
tion.span, true); | 13292 return new Value(y.type, ('' + x.code + ' ' + op + '= ' + y.code + ''), posi
tion.span, true); |
11908 } | 13293 } |
11909 else { | 13294 else { |
(...skipping 21 matching lines...) Expand all Loading... |
11931 if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarg
et.is$Value())); | 13316 if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarg
et.is$Value())); |
11932 if ($notnull_bool($ne(tmpindex, index))) this.freeTemp((tmpindex && tmpindex.i
s$Value())); | 13317 if ($notnull_bool($ne(tmpindex, index))) this.freeTemp((tmpindex && tmpindex.i
s$Value())); |
11933 return ret; | 13318 return ret; |
11934 } | 13319 } |
11935 MethodGenerator.prototype._visitDotAssign = function(kind, xn, yn, position, cap
tureOriginal) { | 13320 MethodGenerator.prototype._visitDotAssign = function(kind, xn, yn, position, cap
tureOriginal) { |
11936 var target = xn.self.visit(this); | 13321 var target = xn.self.visit(this); |
11937 var y = this.visitValue(yn); | 13322 var y = this.visitValue(yn); |
11938 var tmptarget = target; | 13323 var tmptarget = target; |
11939 if (kind != 0) { | 13324 if (kind != 0) { |
11940 tmptarget = this.getTemp((target && target.is$Value())); | 13325 tmptarget = this.getTemp((target && target.is$Value())); |
11941 var right = tmptarget.get_(this, xn.name.name, xn.name); | 13326 var right = tmptarget.get_$3(this, xn.name.name, xn.name); |
11942 right = captureOriginal((right && right.is$Value())); | 13327 right = captureOriginal((right && right.is$Value())); |
11943 y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arg
uments(null, [y])); | 13328 y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arg
uments(null, [y])); |
11944 } | 13329 } |
11945 var ret = this.assignTemp((tmptarget && tmptarget.is$Value()), (target && targ
et.is$Value())).set_(this, xn.name.name, xn.name, (y && y.is$Value()), false); | 13330 var ret = this.assignTemp((tmptarget && tmptarget.is$Value()), (target && targ
et.is$Value())).set_(this, xn.name.name, xn.name, (y && y.is$Value()), false); |
11946 if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarg
et.is$Value())); | 13331 if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarg
et.is$Value())); |
11947 return ret; | 13332 return ret; |
11948 } | 13333 } |
11949 MethodGenerator.prototype.visitUnaryExpression = function(node) { | 13334 MethodGenerator.prototype.visitUnaryExpression = function(node) { |
11950 var $0; | 13335 var $0; |
11951 var value = this.visitValue(node.self); | 13336 var value = this.visitValue(node.self); |
(...skipping 10 matching lines...) Expand all Loading... |
11962 return this._visitAssign($assert_num(kind), node.self, (operand && opera
nd.is$lang_Expression()), node, to$call$1(null)); | 13347 return this._visitAssign($assert_num(kind), node.self, (operand && opera
nd.is$lang_Expression()), node, to$call$1(null)); |
11963 } | 13348 } |
11964 | 13349 |
11965 case 19/*TokenKind.NOT*/: | 13350 case 19/*TokenKind.NOT*/: |
11966 | 13351 |
11967 if ($notnull_bool(value.type.get$isBool() && value.get$isConst())) { | 13352 if ($notnull_bool(value.type.get$isBool() && value.get$isConst())) { |
11968 var newVal = !$notnull_bool(value.get$actualValue()); | 13353 var newVal = !$notnull_bool(value.get$actualValue()); |
11969 return EvaluatedValue.EvaluatedValue$factory((($0 = value.type) && $0.is
$lang_Type()), newVal, ('' + newVal + ''), node.span); | 13354 return EvaluatedValue.EvaluatedValue$factory((($0 = value.type) && $0.is
$lang_Type()), newVal, ('' + newVal + ''), node.span); |
11970 } | 13355 } |
11971 else { | 13356 else { |
11972 var newVal = value.convertTo(this, world.nonNullBool, node, false); | 13357 var newVal = value.convertTo$3(this, world.nonNullBool, node); |
11973 return new Value(newVal.type, ('!' + newVal.code + ''), node.span, true)
; | 13358 return new Value(newVal.type, ('!' + newVal.code + ''), node.span, true)
; |
11974 } | 13359 } |
11975 | 13360 |
11976 case 42/*TokenKind.ADD*/: | 13361 case 42/*TokenKind.ADD*/: |
11977 | 13362 |
11978 return value.convertTo(this, world.numType, node, false); | 13363 return value.convertTo$3(this, world.numType, node); |
11979 | 13364 |
11980 case 43/*TokenKind.SUB*/: | 13365 case 43/*TokenKind.SUB*/: |
11981 case 18/*TokenKind.BIT_NOT*/: | 13366 case 18/*TokenKind.BIT_NOT*/: |
11982 | 13367 |
11983 if (node.op.kind == 18/*TokenKind.BIT_NOT*/) { | 13368 if (node.op.kind == 18/*TokenKind.BIT_NOT*/) { |
11984 return value.invoke$4(this, '\$bit_not', node, Arguments.get$EMPTY()); | 13369 return value.invoke$4(this, '\$bit_not', node, Arguments.get$EMPTY()); |
11985 } | 13370 } |
11986 else if (node.op.kind == 43/*TokenKind.SUB*/) { | 13371 else if (node.op.kind == 43/*TokenKind.SUB*/) { |
11987 return value.invoke$4(this, '\$negate', node, Arguments.get$EMPTY()); | 13372 return value.invoke$4(this, '\$negate', node, Arguments.get$EMPTY()); |
11988 } | 13373 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12027 } | 13412 } |
12028 MethodGenerator.prototype.visitNewExpression = function(node) { | 13413 MethodGenerator.prototype.visitNewExpression = function(node) { |
12029 var $0; | 13414 var $0; |
12030 var typeRef = node.type; | 13415 var typeRef = node.type; |
12031 var constructorName = ''; | 13416 var constructorName = ''; |
12032 if (node.name != null) { | 13417 if (node.name != null) { |
12033 constructorName = node.name.name; | 13418 constructorName = node.name.name; |
12034 } | 13419 } |
12035 if ($notnull_bool($eq(constructorName, '') && !(typeRef instanceof GenericType
Reference)) && typeRef.names != null) { | 13420 if ($notnull_bool($eq(constructorName, '') && !(typeRef instanceof GenericType
Reference)) && typeRef.names != null) { |
12036 var names = ListFactory.ListFactory$from$factory(typeRef.names); | 13421 var names = ListFactory.ListFactory$from$factory(typeRef.names); |
12037 constructorName = names.removeLast().get$name(); | 13422 constructorName = names.removeLast$0().get$name(); |
12038 if (names.length == 0) names = null; | 13423 if (names.length == 0) names = null; |
12039 typeRef = new NameTypeReference(typeRef.isFinal, typeRef.get$name(), names,
typeRef.get$span()); | 13424 typeRef = new NameTypeReference(typeRef.isFinal, typeRef.get$name(), names,
typeRef.get$span()); |
12040 } | 13425 } |
12041 var type = this.method.resolveType(typeRef, true); | 13426 var type = this.method.resolveType(typeRef, true); |
12042 if ($notnull_bool(type.get$isTop())) { | 13427 if ($notnull_bool(type.get$isTop())) { |
12043 type = type.get$library().findTypeByName($assert_String(constructorName)); | 13428 type = type.get$library().findTypeByName($assert_String(constructorName)); |
12044 constructorName = ''; | 13429 constructorName = ''; |
12045 } | 13430 } |
12046 var m = type.getConstructor(constructorName); | 13431 var m = type.getConstructor$1(constructorName); |
12047 if ($notnull_bool(m == null)) { | 13432 if ($notnull_bool(m == null)) { |
12048 var name = type.get$jsname(); | 13433 var name = type.get$jsname(); |
12049 if ($notnull_bool(type.get$isVar())) { | 13434 if ($notnull_bool(type.get$isVar())) { |
12050 name = typeRef.get$name().get$name(); | 13435 name = typeRef.get$name().get$name(); |
12051 } | 13436 } |
12052 world.error(('no matching constructor for ' + name + ''), node.span); | 13437 world.error(('no matching constructor for ' + name + ''), node.span); |
12053 return this._makeMissingValue($assert_String(name)); | 13438 return this._makeMissingValue($assert_String(name)); |
12054 } | 13439 } |
12055 if ($notnull_bool(node.isConst)) { | 13440 if ($notnull_bool(node.isConst)) { |
12056 if (!$notnull_bool(m.get$isConst())) { | 13441 if (!$notnull_bool(m.get$isConst())) { |
12057 world.error('can\'t use const on a non-const constructor', node.span); | 13442 world.error('can\'t use const on a non-const constructor', node.span); |
12058 } | 13443 } |
12059 var $list = node.arguments; | 13444 var $list = node.arguments; |
12060 for (var $i = 0;$i < $list.length; $i++) { | 13445 for (var $i = 0;$i < $list.length; $i++) { |
12061 var arg = $list.$index($i); | 13446 var arg = $list.$index($i); |
12062 if (!$notnull_bool(this.visitValue((($0 = arg.get$value()) && $0.is$lang_E
xpression())).get$isConst())) { | 13447 if (!$notnull_bool(this.visitValue((($0 = arg.get$value()) && $0.is$lang_E
xpression())).get$isConst())) { |
12063 world.error('const constructor expects const arguments', arg.get$span())
; | 13448 world.error('const constructor expects const arguments', arg.get$span())
; |
12064 } | 13449 } |
12065 } | 13450 } |
12066 } | 13451 } |
12067 return m.invoke$4(this, node, null, this._makeArgs(node.arguments)); | 13452 return m.invoke$4(this, node, null, this._makeArgs(node.arguments)); |
12068 } | 13453 } |
12069 MethodGenerator.prototype.visitListExpression = function(node) { | 13454 MethodGenerator.prototype.visitListExpression = function(node) { |
12070 var argsCode = []; | 13455 var argsCode = []; |
12071 var argValues = []; | 13456 var argValues = []; |
12072 var $list = node.values; | 13457 var $list = node.values; |
12073 for (var $i = 0;$i < $list.length; $i++) { | 13458 for (var $i = 0;$i < $list.length; $i++) { |
12074 var item = $list.$index($i); | 13459 var item = $list.$index($i); |
12075 var arg = this.visitValue((item && item.is$lang_Expression())); | 13460 var arg = this.visitValue((item && item.is$lang_Expression())); |
12076 argValues.add(arg); | 13461 argValues.add$1(arg); |
12077 if ($notnull_bool(node.isConst)) { | 13462 if ($notnull_bool(node.isConst)) { |
12078 if (!$notnull_bool(arg.get$isConst())) { | 13463 if (!$notnull_bool(arg.get$isConst())) { |
12079 world.error('const list can only contain const values', item.get$span())
; | 13464 world.error('const list can only contain const values', item.get$span())
; |
12080 argsCode.add(arg.code); | 13465 argsCode.add$1(arg.code); |
12081 } | 13466 } |
12082 else { | 13467 else { |
12083 argsCode.add(arg.get$canonicalCode()); | 13468 argsCode.add$1(arg.get$canonicalCode()); |
12084 } | 13469 } |
12085 } | 13470 } |
12086 else { | 13471 else { |
12087 argsCode.add(arg.code); | 13472 argsCode.add$1(arg.code); |
12088 } | 13473 } |
12089 } | 13474 } |
12090 world.get$coreimpl().types.$index('ListFactory').markUsed(); | 13475 world.get$coreimpl().types.$index('ListFactory').markUsed$0(); |
12091 var code = ('[' + Strings.join((argsCode && argsCode.is$List$String()), ", ")
+ ']'); | 13476 var code = ('[' + Strings.join((argsCode && argsCode.is$List$String()), ", ")
+ ']'); |
12092 var value = new Value(world.listType, code, node.span, true); | 13477 var value = new Value(world.listType, code, node.span, true); |
12093 if ($notnull_bool(node.isConst)) { | 13478 if ($notnull_bool(node.isConst)) { |
12094 var immutableList = world.get$coreimpl().types.$index('ImmutableList'); | 13479 var immutableList = world.get$coreimpl().types.$index('ImmutableList'); |
12095 var immutableListCtor = immutableList.getConstructor('from'); | 13480 var immutableListCtor = immutableList.getConstructor$1('from'); |
12096 var result = immutableListCtor.invoke$4(this, node, null, new Arguments(null
, [value])); | 13481 var result = immutableListCtor.invoke$4(this, node, null, new Arguments(null
, [value])); |
12097 value = world.gen.globalForConst(ConstListValue.ConstListValue$factory((immu
tableList && immutableList.is$lang_Type()), (argValues && argValues.is$List$Eval
uatedValue()), ('const ' + code + ''), result.code, node.span), (argValues && ar
gValues.is$List$Value())); | 13482 value = world.gen.globalForConst(ConstListValue.ConstListValue$factory((immu
tableList && immutableList.is$lang_Type()), (argValues && argValues.is$List$Eval
uatedValue()), ('const ' + code + ''), result.code, node.span), (argValues && ar
gValues.is$List$Value())); |
12098 } | 13483 } |
12099 return value; | 13484 return value; |
12100 } | 13485 } |
12101 MethodGenerator.prototype.visitMapExpression = function(node) { | 13486 MethodGenerator.prototype.visitMapExpression = function(node) { |
12102 var $0; | 13487 var $0; |
12103 var mapImplType = world.gen.useMapFactory(); | 13488 var mapImplType = world.gen.useMapFactory(); |
12104 var argValues = []; | 13489 var argValues = []; |
12105 var argsCode = []; | 13490 var argsCode = []; |
12106 for (var i = 0; | 13491 for (var i = 0; |
12107 i < node.items.length; i += 2) { | 13492 i < node.items.length; i += 2) { |
12108 var key = this.visitTypedValue((($0 = node.items.$index(i)) && $0.is$lang_Ex
pression()), world.stringType); | 13493 var key = this.visitTypedValue((($0 = node.items.$index(i)) && $0.is$lang_Ex
pression()), world.stringType); |
12109 var valueItem = node.items.$index(i + 1); | 13494 var valueItem = node.items.$index(i + 1); |
12110 var value = this.visitValue((valueItem && valueItem.is$lang_Expression())); | 13495 var value = this.visitValue((valueItem && valueItem.is$lang_Expression())); |
12111 argValues.add(key); | 13496 argValues.add$1(key); |
12112 argValues.add(value); | 13497 argValues.add$1(value); |
12113 if ($notnull_bool(node.isConst)) { | 13498 if ($notnull_bool(node.isConst)) { |
12114 if (!$notnull_bool(key.get$isConst()) || !$notnull_bool(value.get$isConst(
))) { | 13499 if (!$notnull_bool(key.get$isConst()) || !$notnull_bool(value.get$isConst(
))) { |
12115 world.error('const map can only contain const values', valueItem.get$spa
n()); | 13500 world.error('const map can only contain const values', valueItem.get$spa
n()); |
12116 argsCode.add(key.code); | 13501 argsCode.add$1(key.code); |
12117 argsCode.add(value.code); | 13502 argsCode.add$1(value.code); |
12118 } | 13503 } |
12119 else { | 13504 else { |
12120 argsCode.add(key.get$canonicalCode()); | 13505 argsCode.add$1(key.get$canonicalCode()); |
12121 argsCode.add(value.get$canonicalCode()); | 13506 argsCode.add$1(value.get$canonicalCode()); |
12122 } | 13507 } |
12123 } | 13508 } |
12124 else { | 13509 else { |
12125 argsCode.add(key.code); | 13510 argsCode.add$1(key.code); |
12126 argsCode.add(value.code); | 13511 argsCode.add$1(value.code); |
12127 } | 13512 } |
12128 } | 13513 } |
12129 var argList = ('[' + Strings.join((argsCode && argsCode.is$List$String()), ",
") + ']'); | 13514 var argList = ('[' + Strings.join((argsCode && argsCode.is$List$String()), ",
") + ']'); |
12130 var code = ('\$map(' + argList + ')'); | 13515 var code = ('\$map(' + argList + ')'); |
12131 if ($notnull_bool(node.isConst)) { | 13516 if ($notnull_bool(node.isConst)) { |
12132 var immutableMap = world.get$coreimpl().types.$index('ImmutableMap'); | 13517 var immutableMap = world.get$coreimpl().types.$index('ImmutableMap'); |
12133 var immutableMapCtor = immutableMap.getConstructor(''); | 13518 var immutableMapCtor = immutableMap.getConstructor$1(''); |
12134 var argsValue = new Value(world.listType, argList, node.span, true); | 13519 var argsValue = new Value(world.listType, argList, node.span, true); |
12135 var result = immutableMapCtor.invoke$4(this, node, null, new Arguments(null,
[argsValue])); | 13520 var result = immutableMapCtor.invoke$4(this, node, null, new Arguments(null,
[argsValue])); |
12136 var value = ConstMapValue.ConstMapValue$factory((immutableMap && immutableMa
p.is$lang_Type()), (argValues && argValues.is$List$EvaluatedValue()), code, resu
lt.code, node.span); | 13521 var value = ConstMapValue.ConstMapValue$factory((immutableMap && immutableMa
p.is$lang_Type()), (argValues && argValues.is$List$EvaluatedValue()), code, resu
lt.code, node.span); |
12137 return world.gen.globalForConst(value, (argValues && argValues.is$List$Value
())); | 13522 return world.gen.globalForConst(value, (argValues && argValues.is$List$Value
())); |
12138 } | 13523 } |
12139 return new Value(mapImplType, code, node.span, true); | 13524 return new Value(mapImplType, code, node.span, true); |
12140 } | 13525 } |
12141 MethodGenerator.prototype.visitConditionalExpression = function(node) { | 13526 MethodGenerator.prototype.visitConditionalExpression = function(node) { |
12142 var $0; | 13527 var $0; |
12143 var test = this.visitBool(node.test); | 13528 var test = this.visitBool(node.test); |
12144 var trueBranch = this.visitValue(node.trueBranch); | 13529 var trueBranch = this.visitValue(node.trueBranch); |
12145 var falseBranch = this.visitValue(node.falseBranch); | 13530 var falseBranch = this.visitValue(node.falseBranch); |
12146 var code = ('' + test.code + ' ? ' + trueBranch.code + ' : ' + falseBranch.cod
e + ''); | 13531 var code = ('' + test.code + ' ? ' + trueBranch.code + ' : ' + falseBranch.cod
e + ''); |
12147 return new Value(lang_Type.union((($0 = trueBranch.type) && $0.is$lang_Type())
, (($0 = falseBranch.type) && $0.is$lang_Type())), code, node.span, true); | 13532 return new Value(lang_Type.union((($0 = trueBranch.type) && $0.is$lang_Type())
, (($0 = falseBranch.type) && $0.is$lang_Type())), code, node.span, true); |
12148 } | 13533 } |
12149 MethodGenerator.prototype.visitIsExpression = function(node) { | 13534 MethodGenerator.prototype.visitIsExpression = function(node) { |
12150 var value = this.visitValue(node.x); | 13535 var value = this.visitValue(node.x); |
12151 var type = this.method.resolveType(node.type, false); | 13536 var type = this.method.resolveType(node.type, false); |
12152 return value.instanceOf(this, (type && type.is$lang_Type()), node.span, node.i
sTrue, false); | 13537 return value.instanceOf$4(this, type, node.span, node.isTrue); |
12153 } | 13538 } |
12154 MethodGenerator.prototype.visitParenExpression = function(node) { | 13539 MethodGenerator.prototype.visitParenExpression = function(node) { |
12155 var $0; | 13540 var $0; |
12156 var body = this.visitValue(node.body); | 13541 var body = this.visitValue(node.body); |
12157 if ($notnull_bool(body.get$isConst())) { | 13542 if ($notnull_bool(body.get$isConst())) { |
12158 return EvaluatedValue.EvaluatedValue$factory((($0 = body.type) && $0.is$lang
_Type()), body.get$actualValue(), ('(' + body.get$canonicalCode() + ')'), node.s
pan); | 13543 return EvaluatedValue.EvaluatedValue$factory((($0 = body.type) && $0.is$lang
_Type()), body.get$actualValue(), ('(' + body.get$canonicalCode() + ')'), node.s
pan); |
12159 } | 13544 } |
12160 return new Value(body.type, ('(' + body.code + ')'), node.span, true); | 13545 return new Value(body.type, ('(' + body.code + ')'), node.span, true); |
12161 } | 13546 } |
12162 MethodGenerator.prototype.visitDotExpression = function(node) { | 13547 MethodGenerator.prototype.visitDotExpression = function(node) { |
12163 var target = node.self.visit(this); | 13548 var target = node.self.visit(this); |
12164 return target.get_(this, node.name.name, node.name); | 13549 return target.get_$3(this, node.name.name, node.name); |
12165 } | 13550 } |
12166 MethodGenerator.prototype.visitVarExpression = function(node) { | 13551 MethodGenerator.prototype.visitVarExpression = function(node) { |
12167 var name = node.name.name; | 13552 var name = node.name.name; |
12168 var ret = this._scope.lookup(name); | 13553 var ret = this._scope.lookup(name); |
12169 if ($notnull_bool($ne(ret, null))) return ret; | 13554 if ($notnull_bool($ne(ret, null))) return ret; |
12170 return this._makeThisOrType(node.span).get_(this, name, node); | 13555 return this._makeThisOrType(node.span).get_$3(this, name, node); |
12171 } | 13556 } |
12172 MethodGenerator.prototype._makeMissingValue = function(name) { | 13557 MethodGenerator.prototype._makeMissingValue = function(name) { |
12173 return new Value(world.varType, ('' + name + '()/*NotFound*/'), null, true); | 13558 return new Value(world.varType, ('' + name + '()/*NotFound*/'), null, true); |
12174 } | 13559 } |
12175 MethodGenerator.prototype._makeThisOrType = function(span) { | 13560 MethodGenerator.prototype._makeThisOrType = function(span) { |
12176 var $0; | 13561 var $0; |
12177 return new BareValue(this, (($0 = this._getOutermostMethod()) && $0.is$MethodG
enerator()), span); | 13562 return new BareValue(this, (($0 = this._getOutermostMethod()) && $0.is$MethodG
enerator()), span); |
12178 } | 13563 } |
12179 MethodGenerator.prototype.visitThisExpression = function(node) { | 13564 MethodGenerator.prototype.visitThisExpression = function(node) { |
12180 return this._makeThisValue(node); | 13565 return this._makeThisValue(node); |
12181 } | 13566 } |
12182 MethodGenerator.prototype.visitSuperExpression = function(node) { | 13567 MethodGenerator.prototype.visitSuperExpression = function(node) { |
12183 return this._makeSuperValue(node); | 13568 return this._makeSuperValue(node); |
12184 } | 13569 } |
12185 MethodGenerator.prototype.visitNullExpression = function(node) { | 13570 MethodGenerator.prototype.visitNullExpression = function(node) { |
12186 return EvaluatedValue.EvaluatedValue$factory(world.varType, null, 'null', null
); | 13571 return EvaluatedValue.EvaluatedValue$factory(world.varType, null, 'null', null
); |
12187 } | 13572 } |
12188 MethodGenerator.prototype.visitLiteralExpression = function(node) { | 13573 MethodGenerator.prototype.visitLiteralExpression = function(node) { |
12189 var $0; | 13574 var $0; |
12190 var type = node.type.type; | 13575 var type = node.type.type; |
12191 $assert($ne(type, null), "type != null", "gen.dart", 2083, 12); | 13576 $assert($ne(type, null), "type != null", "gen.dart", 2083, 12); |
12192 if (!!(($0 = node.value) && $0.is$List)) { | 13577 if (!!(($0 = node.value) && $0.is$List)) { |
12193 var items = []; | 13578 var items = []; |
12194 var $list = node.value; | 13579 var $list = node.value; |
12195 for (var $i = node.value.iterator(); $i.hasNext(); ) { | 13580 for (var $i = node.value.iterator$0(); $i.hasNext$0(); ) { |
12196 var item = $i.next(); | 13581 var item = $i.next$0(); |
12197 var val = this.visitValue((item && item.is$lang_Expression())); | 13582 var val = this.visitValue((item && item.is$lang_Expression())); |
12198 val.invoke$4(this, 'toString', item, Arguments.get$EMPTY()); | 13583 val.invoke$4(this, 'toString', item, Arguments.get$EMPTY()); |
12199 var code = val.code; | 13584 var code = val.code; |
12200 if ((item instanceof BinaryExpression) || (item instanceof ConditionalExpr
ession)) { | 13585 if ((item instanceof BinaryExpression) || (item instanceof ConditionalExpr
ession)) { |
12201 code = ('(' + code + ')'); | 13586 code = ('(' + code + ')'); |
12202 } | 13587 } |
12203 items.add(code); | 13588 items.add$1(code); |
12204 } | 13589 } |
12205 return new Value(type, ('(' + Strings.join((items && items.is$List$String())
, " + ") + ')'), node.span, true); | 13590 return new Value(type, ('(' + Strings.join((items && items.is$List$String())
, " + ") + ')'), node.span, true); |
12206 } | 13591 } |
12207 var text = node.text; | 13592 var text = node.text; |
12208 if ($notnull_bool(type.get$isString())) { | 13593 if ($notnull_bool(type.get$isString())) { |
12209 if (text.startsWith('@')) { | 13594 if ($notnull_bool(text.startsWith$1('@'))) { |
12210 text = MethodGenerator._escapeString(parseStringLiteral($assert_String(tex
t))); | 13595 text = MethodGenerator._escapeString(parseStringLiteral($assert_String(tex
t))); |
12211 text = ('"' + text + '"'); | 13596 text = ('"' + text + '"'); |
12212 } | 13597 } |
12213 else if ($notnull_bool(isMultilineString($assert_String(text)))) { | 13598 else if ($notnull_bool(isMultilineString($assert_String(text)))) { |
12214 text = parseStringLiteral($assert_String(text)); | 13599 text = parseStringLiteral($assert_String(text)); |
12215 text = text.replaceAll('\n', '\\n'); | 13600 text = text.replaceAll$2('\n', '\\n'); |
12216 text = text.replaceAll('"', '\\"'); | 13601 text = text.replaceAll$2('"', '\\"'); |
12217 text = ('"' + text + '"'); | 13602 text = ('"' + text + '"'); |
12218 } | 13603 } |
12219 if (text !== node.text) { | 13604 if (text !== node.text) { |
12220 node.value = text; | 13605 node.value = text; |
12221 node.text = $assert_String(text); | 13606 node.text = $assert_String(text); |
12222 } | 13607 } |
12223 } | 13608 } |
12224 return EvaluatedValue.EvaluatedValue$factory((type && type.is$lang_Type()), no
de.value, node.text, null); | 13609 return EvaluatedValue.EvaluatedValue$factory((type && type.is$lang_Type()), no
de.value, node.text, null); |
12225 } | 13610 } |
12226 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) { | 13611 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) { |
12227 return this.visitPostfixExpression(($0 && $0.is$PostfixExpression()), false); | 13612 return this.visitPostfixExpression(($0 && $0.is$PostfixExpression()), false); |
12228 } | 13613 }; |
12229 ; | 13614 MethodGenerator.prototype.writeDefinition$2 = function($0, $1) { |
| 13615 return this.writeDefinition(($0 && $0.is$CodeWriter()), ($1 && $1.is$LambdaExp
ression())); |
| 13616 }; |
12230 // ********** Code for Arguments ************** | 13617 // ********** Code for Arguments ************** |
12231 function Arguments(nodes, values) { | 13618 function Arguments(nodes, values) { |
12232 this.nodes = nodes; | 13619 this.nodes = nodes; |
12233 this.values = values; | 13620 this.values = values; |
12234 // Initializers done | 13621 // Initializers done |
12235 } | 13622 } |
12236 Arguments.prototype.is$Arguments = function(){return this;}; | 13623 Arguments.prototype.is$Arguments = function(){return this;}; |
12237 Arguments.Arguments$bare$factory = function(arity) { | 13624 Arguments.Arguments$bare$factory = function(arity) { |
12238 var values = []; | 13625 var values = []; |
12239 for (var i = 0; | 13626 for (var i = 0; |
12240 i < arity; i++) { | 13627 i < arity; i++) { |
12241 values.add(new Value(world.varType, ('\$' + i + ''), null, false)); | 13628 values.add$1(new Value(world.varType, ('\$' + i + ''), null, false)); |
12242 } | 13629 } |
12243 return new Arguments(null, values); | 13630 return new Arguments(null, values); |
12244 } | 13631 } |
12245 Arguments.get$EMPTY = function() { | 13632 Arguments.get$EMPTY = function() { |
12246 if (Arguments._empty == null) { | 13633 if (Arguments._empty == null) { |
12247 Arguments._empty = new Arguments(null, []); | 13634 Arguments._empty = new Arguments(null, []); |
12248 } | 13635 } |
12249 return Arguments._empty; | 13636 return Arguments._empty; |
12250 } | 13637 } |
12251 Arguments.prototype.get$nameCount = function() { | 13638 Arguments.prototype.get$nameCount = function() { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12289 } | 13676 } |
12290 } | 13677 } |
12291 } | 13678 } |
12292 } | 13679 } |
12293 return this._bareCount; | 13680 return this._bareCount; |
12294 } | 13681 } |
12295 Arguments.prototype.getCode = function() { | 13682 Arguments.prototype.getCode = function() { |
12296 var argsCode = []; | 13683 var argsCode = []; |
12297 for (var i = 0; | 13684 for (var i = 0; |
12298 i < this.get$length(); i++) { | 13685 i < this.get$length(); i++) { |
12299 argsCode.add(this.values.$index(i).code); | 13686 argsCode.add$1(this.values.$index(i).code); |
12300 } | 13687 } |
12301 Arguments.removeTrailingNulls((argsCode && argsCode.is$List$Value())); | 13688 Arguments.removeTrailingNulls((argsCode && argsCode.is$List$Value())); |
12302 return Strings.join((argsCode && argsCode.is$List$String()), ", "); | 13689 return Strings.join((argsCode && argsCode.is$List$String()), ", "); |
12303 } | 13690 } |
12304 Arguments.removeTrailingNulls = function(argsCode) { | 13691 Arguments.removeTrailingNulls = function(argsCode) { |
12305 while ($notnull_bool(argsCode.length > 0 && $eq(argsCode.last(), 'null'))) { | 13692 while ($notnull_bool(argsCode.length > 0 && $eq(argsCode.last(), 'null'))) { |
12306 argsCode.removeLast(); | 13693 argsCode.removeLast(); |
12307 } | 13694 } |
12308 } | 13695 } |
12309 Arguments.prototype.getNames = function() { | 13696 Arguments.prototype.getNames = function() { |
12310 var names = []; | 13697 var names = []; |
12311 for (var i = this.get$bareCount(); | 13698 for (var i = this.get$bareCount(); |
12312 i < this.get$length(); i++) { | 13699 i < this.get$length(); i++) { |
12313 names.add(this.getName(i)); | 13700 names.add$1(this.getName(i)); |
12314 } | 13701 } |
12315 return (names && names.is$List$String()); | 13702 return (names && names.is$List$String()); |
12316 } | 13703 } |
12317 Arguments.prototype.toCallStubArgs = function() { | 13704 Arguments.prototype.toCallStubArgs = function() { |
12318 var result = []; | 13705 var result = []; |
12319 for (var i = 0; | 13706 for (var i = 0; |
12320 i < this.get$bareCount(); i++) { | 13707 i < this.get$bareCount(); i++) { |
12321 result.add(new Value(world.varType, ('\$' + i + ''), null, false)); | 13708 result.add$1(new Value(world.varType, ('\$' + i + ''), null, false)); |
12322 } | 13709 } |
12323 for (var i = this.get$bareCount(); | 13710 for (var i = this.get$bareCount(); |
12324 i < this.get$length(); i++) { | 13711 i < this.get$length(); i++) { |
12325 var name = this.getName(i); | 13712 var name = this.getName(i); |
12326 if ($notnull_bool(name == null)) name = ('\$' + i + ''); | 13713 if ($notnull_bool(name == null)) name = ('\$' + i + ''); |
12327 result.add(new Value(world.varType, name, null, false)); | 13714 result.add$1(new Value(world.varType, name, null, false)); |
12328 } | 13715 } |
12329 return new Arguments(this.nodes, result); | 13716 return new Arguments(this.nodes, result); |
12330 } | 13717 } |
12331 // ********** Code for LibraryImport ************** | 13718 // ********** Code for LibraryImport ************** |
12332 function LibraryImport(library, prefix) { | 13719 function LibraryImport(library, prefix) { |
12333 this.library = library; | 13720 this.library = library; |
12334 this.prefix = prefix; | 13721 this.prefix = prefix; |
12335 // Initializers done | 13722 // Initializers done |
12336 } | 13723 } |
12337 LibraryImport.prototype.get$library = function() { return this.library; }; | 13724 LibraryImport.prototype.get$library = function() { return this.library; }; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12395 if ($notnull_bool(member.get$isPrivate())) { | 13782 if ($notnull_bool(member.get$isPrivate())) { |
12396 if ($notnull_bool(member.get$isStatic())) { | 13783 if ($notnull_bool(member.get$isStatic())) { |
12397 if ($notnull_bool(member.declaringType.get$isTop())) { | 13784 if ($notnull_bool(member.declaringType.get$isTop())) { |
12398 world._addTopName(member); | 13785 world._addTopName(member); |
12399 } | 13786 } |
12400 return; | 13787 return; |
12401 } | 13788 } |
12402 var mset = this._privateMembers.$index(member.name); | 13789 var mset = this._privateMembers.$index(member.name); |
12403 if ($notnull_bool(mset == null)) { | 13790 if ($notnull_bool(mset == null)) { |
12404 var $list = world.libraries.getValues(); | 13791 var $list = world.libraries.getValues(); |
12405 for (var $i = world.libraries.getValues().iterator(); $i.hasNext(); ) { | 13792 for (var $i = world.libraries.getValues().iterator$0(); $i.hasNext$0(); )
{ |
12406 var lib = $i.next(); | 13793 var lib = $i.next$0(); |
12407 if (lib._privateMembers.containsKey(member.name)) { | 13794 if (lib._privateMembers.containsKey(member.name)) { |
12408 member.set$jsname(('_' + this.get$jsname() + '' + member.name + '')); | 13795 member.set$jsname(('_' + this.get$jsname() + '' + member.name + '')); |
12409 break; | 13796 break; |
12410 } | 13797 } |
12411 } | 13798 } |
12412 mset = new MemberSet(member); | 13799 mset = new MemberSet(member, false); |
12413 this._privateMembers.$setindex(member.name, mset); | 13800 this._privateMembers.$setindex(member.name, mset); |
12414 } | 13801 } |
12415 else { | 13802 else { |
12416 mset.get$members().add(member); | 13803 mset.get$members().add$1(member); |
12417 } | 13804 } |
12418 } | 13805 } |
12419 else { | 13806 else { |
12420 world._addMember(member); | 13807 world._addMember(member); |
12421 } | 13808 } |
12422 } | 13809 } |
12423 Library.prototype.getOrAddFunctionType = function(name, func, inType) { | 13810 Library.prototype.getOrAddFunctionType = function(name, func, inType) { |
12424 var def = new FunctionTypeDefinition(func, null, func.span); | 13811 var def = new FunctionTypeDefinition(func, null, func.span); |
12425 var type = new DefinedType(name, this, def, false); | 13812 var type = new DefinedType(name, this, def, false); |
12426 type.addMethod('\$call', func); | 13813 type.addMethod('\$call', func); |
12427 type.members.$index('\$call').resolve(inType); | 13814 type.members.$index('\$call').resolve$1(inType); |
12428 type.interfaces = [world.functionType]; | 13815 type.interfaces = [world.functionType]; |
12429 return type; | 13816 return type; |
12430 } | 13817 } |
12431 Library.prototype.addType = function(name, definition, isClass) { | 13818 Library.prototype.addType = function(name, definition, isClass) { |
12432 var $0; | 13819 var $0; |
12433 if (this.types.containsKey(name)) { | 13820 if (this.types.containsKey(name)) { |
12434 var existingType = this.types.$index(name); | 13821 var existingType = this.types.$index(name); |
12435 if ($notnull_bool(this.get$isCore() && existingType.get$definition() == null
)) { | 13822 if ($notnull_bool(this.get$isCore() && existingType.get$definition() == null
)) { |
12436 existingType.setDefinition((definition && definition.is$Definition())); | 13823 existingType.setDefinition$1(definition); |
12437 } | 13824 } |
12438 else { | 13825 else { |
12439 world.warning(('duplicate definition of ' + name + ''), definition.span); | 13826 world.warning(('duplicate definition of ' + name + ''), definition.span); |
12440 } | 13827 } |
12441 } | 13828 } |
12442 else { | 13829 else { |
12443 this.types.$setindex(name, new DefinedType(name, this, (definition && defini
tion.is$Definition()), isClass)); | 13830 this.types.$setindex(name, new DefinedType(name, this, (definition && defini
tion.is$Definition()), isClass)); |
12444 } | 13831 } |
12445 return (($0 = this.types.$index(name)) && $0.is$DefinedType()); | 13832 return (($0 = this.types.$index(name)) && $0.is$DefinedType()); |
12446 } | 13833 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12519 var index = this.name.lastIndexOf('/', this.name.length); | 13906 var index = this.name.lastIndexOf('/', this.name.length); |
12520 if (index >= 0) { | 13907 if (index >= 0) { |
12521 this.name = this.name.substring(index + 1); | 13908 this.name = this.name.substring(index + 1); |
12522 } | 13909 } |
12523 index = this.name.indexOf('.', 0); | 13910 index = this.name.indexOf('.', 0); |
12524 if (index > 0) { | 13911 if (index > 0) { |
12525 this.name = this.name.substring(0, index); | 13912 this.name = this.name.substring(0, index); |
12526 } | 13913 } |
12527 } | 13914 } |
12528 var $list = this.types.getValues(); | 13915 var $list = this.types.getValues(); |
12529 for (var $i = this.types.getValues().iterator(); $i.hasNext(); ) { | 13916 for (var $i = this.types.getValues().iterator$0(); $i.hasNext$0(); ) { |
12530 var type = $i.next(); | 13917 var type = $i.next$0(); |
12531 type.resolve(); | 13918 type.resolve$0(); |
12532 } | 13919 } |
12533 } | 13920 } |
12534 Library.prototype.visitSources = function() { | 13921 Library.prototype.visitSources = function() { |
12535 var visitor = new _LibraryVisitor(this); | 13922 var visitor = new _LibraryVisitor(this); |
12536 visitor.addSource(this.baseSource); | 13923 visitor.addSource$1(this.baseSource); |
12537 } | 13924 } |
12538 Library.prototype.toString = function() { | 13925 Library.prototype.toString = function() { |
12539 return this.baseSource.filename; | 13926 return this.baseSource.filename; |
12540 } | 13927 } |
| 13928 Library.prototype.resolve$0 = function() { |
| 13929 return this.resolve(); |
| 13930 }; |
| 13931 Library.prototype.toString$0 = function() { |
| 13932 return this.toString(); |
| 13933 }; |
| 13934 Library.prototype.visitSources$0 = function() { |
| 13935 return this.visitSources(); |
| 13936 }; |
12541 // ********** Code for _LibraryVisitor ************** | 13937 // ********** Code for _LibraryVisitor ************** |
12542 function _LibraryVisitor(library) { | 13938 function _LibraryVisitor(library) { |
12543 this.seenImport = false | 13939 this.seenImport = false |
12544 this.seenSource = false | 13940 this.seenSource = false |
12545 this.seenResource = false | 13941 this.seenResource = false |
12546 this.isTop = true | 13942 this.isTop = true |
12547 this.library = library; | 13943 this.library = library; |
12548 // Initializers done | 13944 // Initializers done |
12549 this.currentType = this.library.topType; | 13945 this.currentType = this.library.topType; |
12550 this.sources = []; | 13946 this.sources = []; |
12551 } | 13947 } |
| 13948 _LibraryVisitor.prototype.is$TreeVisitor = function(){return this;}; |
12552 _LibraryVisitor.prototype.get$library = function() { return this.library; }; | 13949 _LibraryVisitor.prototype.get$library = function() { return this.library; }; |
12553 _LibraryVisitor.prototype.get$isTop = function() { return this.isTop; }; | 13950 _LibraryVisitor.prototype.get$isTop = function() { return this.isTop; }; |
12554 _LibraryVisitor.prototype.set$isTop = function(value) { return this.isTop = valu
e; }; | 13951 _LibraryVisitor.prototype.set$isTop = function(value) { return this.isTop = valu
e; }; |
12555 _LibraryVisitor.prototype.addSourceFromName = function(name, span) { | 13952 _LibraryVisitor.prototype.addSourceFromName = function(name, span) { |
12556 var filename = this.library.makeFullPath(name); | 13953 var filename = this.library.makeFullPath(name); |
12557 if ($notnull_bool($eq(filename, this.library.baseSource.filename))) { | 13954 if ($notnull_bool($eq(filename, this.library.baseSource.filename))) { |
12558 world.error('library can not source itself', span); | 13955 world.error('library can not source itself', span); |
12559 return; | 13956 return; |
12560 } | 13957 } |
12561 else if (this.sources.some((function (s) { | 13958 else if (this.sources.some((function (s) { |
(...skipping 12 matching lines...) Expand all Loading... |
12574 return s.filename == source.filename; | 13971 return s.filename == source.filename; |
12575 }) | 13972 }) |
12576 )) { | 13973 )) { |
12577 world.error(('duplicate source file "' + source.filename + '"')); | 13974 world.error(('duplicate source file "' + source.filename + '"')); |
12578 return; | 13975 return; |
12579 } | 13976 } |
12580 this.library.sources.add(source); | 13977 this.library.sources.add(source); |
12581 var parser = new lang_Parser(source, options.dietParse, false, false, 0); | 13978 var parser = new lang_Parser(source, options.dietParse, false, false, 0); |
12582 var unit = parser.compilationUnit(); | 13979 var unit = parser.compilationUnit(); |
12583 unit.forEach((function (def) { | 13980 unit.forEach((function (def) { |
12584 return def.visit($this); | 13981 return def.visit$1($this); |
12585 }) | 13982 }) |
12586 ); | 13983 ); |
12587 $assert($notnull_bool(this.sources.length == 0 || this.isTop), "sources.length
== 0 || isTop", "library.dart", 293, 12); | 13984 $assert($notnull_bool(this.sources.length == 0 || this.isTop), "sources.length
== 0 || isTop", "library.dart", 293, 12); |
12588 this.isTop = false; | 13985 this.isTop = false; |
12589 var newSources = this.sources; | 13986 var newSources = this.sources; |
12590 this.sources = []; | 13987 this.sources = []; |
12591 for (var $i = newSources.iterator(); $i.hasNext(); ) { | 13988 for (var $i = newSources.iterator$0(); $i.hasNext$0(); ) { |
12592 var source0 = $i.next(); | 13989 var source0 = $i.next$0(); |
12593 this.addSource((source0 && source0.is$SourceFile())); | 13990 this.addSource((source0 && source0.is$SourceFile())); |
12594 } | 13991 } |
12595 } | 13992 } |
12596 _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { | 13993 _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
12597 if (!$notnull_bool(this.isTop)) { | 13994 if (!$notnull_bool(this.isTop)) { |
12598 world.error('directives not allowed in sourced file', node.span); | 13995 world.error('directives not allowed in sourced file', node.span); |
12599 return; | 13996 return; |
12600 } | 13997 } |
12601 var name; | 13998 var name; |
12602 switch (node.name.name) { | 13999 switch (node.name.name) { |
(...skipping 15 matching lines...) Expand all Loading... |
12618 break; | 14015 break; |
12619 | 14016 |
12620 case "import": | 14017 case "import": |
12621 | 14018 |
12622 this.seenImport = true; | 14019 this.seenImport = true; |
12623 name = this.getFirstStringArg(node); | 14020 name = this.getFirstStringArg(node); |
12624 var prefix = this.tryGetNamedStringArg(node, 'prefix'); | 14021 var prefix = this.tryGetNamedStringArg(node, 'prefix'); |
12625 if (node.arguments.length > 2 || $notnull_bool(node.arguments.length == 2
&& prefix == null)) { | 14022 if (node.arguments.length > 2 || $notnull_bool(node.arguments.length == 2
&& prefix == null)) { |
12626 world.error('expected at most one "name" argument and one optional "pref
ix"' + (' but found ' + node.arguments.length + ''), node.span); | 14023 world.error('expected at most one "name" argument and one optional "pref
ix"' + (' but found ' + node.arguments.length + ''), node.span); |
12627 } | 14024 } |
12628 else if ($notnull_bool($ne(prefix, null) && prefix.indexOf('.', 0) >= 0))
{ | 14025 else if ($notnull_bool($ne(prefix, null) && prefix.indexOf$2('.', 0) >= 0)
) { |
12629 world.error('library prefix canot contain "."', node.span); | 14026 world.error('library prefix canot contain "."', node.span); |
12630 } | 14027 } |
12631 else if ($notnull_bool(this.seenSource || this.seenResource)) { | 14028 else if ($notnull_bool(this.seenSource || this.seenResource)) { |
12632 world.error('#imports must come before any #source or #resource', node.s
pan); | 14029 world.error('#imports must come before any #source or #resource', node.s
pan); |
12633 } | 14030 } |
12634 if ($notnull_bool($eq(prefix, ''))) prefix = null; | 14031 if ($notnull_bool($eq(prefix, ''))) prefix = null; |
12635 var filename = this.library.makeFullPath($assert_String(name)); | 14032 var filename = this.library.makeFullPath($assert_String(name)); |
12636 if (this.library.imports.some((function (li) { | 14033 if (this.library.imports.some((function (li) { |
12637 return $eq(li.get$library().baseSource, filename); | 14034 return $eq(li.get$library().baseSource, filename); |
12638 }) | 14035 }) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12691 var args = node.arguments.filter((function (a) { | 14088 var args = node.arguments.filter((function (a) { |
12692 return a.label != null && a.label.name == argName; | 14089 return a.label != null && a.label.name == argName; |
12693 }) | 14090 }) |
12694 ); | 14091 ); |
12695 if (args.length == 0) { | 14092 if (args.length == 0) { |
12696 return null; | 14093 return null; |
12697 } | 14094 } |
12698 if (args.length > 1) { | 14095 if (args.length > 1) { |
12699 world.error(('expected at most one "' + argName + '" argument but found ') +
node.arguments.length, node.span); | 14096 world.error(('expected at most one "' + argName + '" argument but found ') +
node.arguments.length, node.span); |
12700 } | 14097 } |
12701 for (var $i = args.iterator(); $i.hasNext(); ) { | 14098 for (var $i = args.iterator$0(); $i.hasNext$0(); ) { |
12702 var arg = $i.next(); | 14099 var arg = $i.next$0(); |
12703 return this._parseStringArgument((arg && arg.is$ArgumentNode())); | 14100 return this._parseStringArgument((arg && arg.is$ArgumentNode())); |
12704 } | 14101 } |
12705 } | 14102 } |
12706 _LibraryVisitor.prototype._parseStringArgument = function(arg) { | 14103 _LibraryVisitor.prototype._parseStringArgument = function(arg) { |
12707 var expr = arg.value; | 14104 var expr = arg.value; |
12708 if (!(expr instanceof LiteralExpression) || !$notnull_bool(expr.type.type.get$
isString())) { | 14105 if (!(expr instanceof LiteralExpression) || !$notnull_bool(expr.type.type.get$
isString())) { |
12709 world.error('expected string', expr.get$span()); | 14106 world.error('expected string', expr.get$span()); |
12710 } | 14107 } |
12711 return parseStringLiteral($assert_String(expr.get$value())); | 14108 return parseStringLiteral($assert_String(expr.get$value())); |
12712 } | 14109 } |
12713 _LibraryVisitor.prototype.visitTypeDefinition = function(node) { | 14110 _LibraryVisitor.prototype.visitTypeDefinition = function(node) { |
12714 var oldType = this.currentType; | 14111 var oldType = this.currentType; |
12715 this.currentType = this.library.addType(node.name.name, node, node.isClass); | 14112 this.currentType = this.library.addType(node.name.name, node, node.isClass); |
12716 var $list = node.body; | 14113 var $list = node.body; |
12717 for (var $i = 0;$i < $list.length; $i++) { | 14114 for (var $i = 0;$i < $list.length; $i++) { |
12718 var member = $list.$index($i); | 14115 var member = $list.$index($i); |
12719 member.visit(this); | 14116 member.visit$1(this); |
12720 } | 14117 } |
12721 this.currentType = (oldType && oldType.is$DefinedType()); | 14118 this.currentType = (oldType && oldType.is$DefinedType()); |
12722 } | 14119 } |
12723 _LibraryVisitor.prototype.visitVariableDefinition = function(node) { | 14120 _LibraryVisitor.prototype.visitVariableDefinition = function(node) { |
12724 this.currentType.addField(node); | 14121 this.currentType.addField(node); |
12725 } | 14122 } |
12726 _LibraryVisitor.prototype.visitFunctionDefinition = function(node) { | 14123 _LibraryVisitor.prototype.visitFunctionDefinition = function(node) { |
12727 this.currentType.addMethod(node.name.name, node); | 14124 this.currentType.addMethod(node.name.name, node); |
12728 } | 14125 } |
12729 _LibraryVisitor.prototype.visitFunctionTypeDefinition = function(node) { | 14126 _LibraryVisitor.prototype.visitFunctionTypeDefinition = function(node) { |
12730 var type = this.library.addType(node.func.name.name, node, false); | 14127 var type = this.library.addType(node.func.name.name, node, false); |
12731 type.addMethod('\$call', node.func); | 14128 type.addMethod$2('\$call', node.func); |
12732 } | 14129 } |
| 14130 _LibraryVisitor.prototype.addSource$1 = function($0) { |
| 14131 return this.addSource(($0 && $0.is$SourceFile())); |
| 14132 }; |
12733 // ********** Code for Parameter ************** | 14133 // ********** Code for Parameter ************** |
12734 function Parameter(definition) { | 14134 function Parameter(definition) { |
12735 this.isInitializer = false | 14135 this.isInitializer = false |
12736 this.definition = definition; | 14136 this.definition = definition; |
12737 // Initializers done | 14137 // Initializers done |
12738 } | 14138 } |
12739 Parameter.prototype.is$Parameter = function(){return this;}; | 14139 Parameter.prototype.is$Parameter = function(){return this;}; |
12740 Parameter.prototype.get$definition = function() { return this.definition; }; | 14140 Parameter.prototype.get$definition = function() { return this.definition; }; |
12741 Parameter.prototype.set$definition = function(value) { return this.definition =
value; }; | 14141 Parameter.prototype.set$definition = function(value) { return this.definition =
value; }; |
12742 Parameter.prototype.get$name = function() { return this.name; }; | 14142 Parameter.prototype.get$name = function() { return this.name; }; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12780 Parameter.prototype.copyWithNewType = function(newType) { | 14180 Parameter.prototype.copyWithNewType = function(newType) { |
12781 var ret = new Parameter(this.definition); | 14181 var ret = new Parameter(this.definition); |
12782 ret.type = newType; | 14182 ret.type = newType; |
12783 ret.name = this.name; | 14183 ret.name = this.name; |
12784 ret.isInitializer = this.isInitializer; | 14184 ret.isInitializer = this.isInitializer; |
12785 return (ret && ret.is$Parameter()); | 14185 return (ret && ret.is$Parameter()); |
12786 } | 14186 } |
12787 Parameter.prototype.get$isOptional = function() { | 14187 Parameter.prototype.get$isOptional = function() { |
12788 return this.definition != null && this.definition.value != null; | 14188 return this.definition != null && this.definition.value != null; |
12789 } | 14189 } |
| 14190 Parameter.prototype.copyWithNewType$1 = function($0) { |
| 14191 return this.copyWithNewType(($0 && $0.is$lang_Type())); |
| 14192 }; |
| 14193 Parameter.prototype.genValue$2 = function($0, $1) { |
| 14194 return this.genValue(($0 && $0.is$MethodMember()), ($1 && $1.is$MethodGenerato
r())); |
| 14195 }; |
| 14196 Parameter.prototype.resolve$2 = function($0, $1) { |
| 14197 return this.resolve(($0 && $0.is$Member()), ($1 && $1.is$lang_Type())); |
| 14198 }; |
12790 // ********** Code for Member ************** | 14199 // ********** Code for Member ************** |
12791 function Member(name, declaringType) { | 14200 function Member(name, declaringType) { |
12792 this.name = name; | 14201 this.name = name; |
12793 this.declaringType = declaringType; | 14202 this.declaringType = declaringType; |
12794 this.isGenerated = false; | 14203 this.isGenerated = false; |
12795 // Initializers done | 14204 // Initializers done |
12796 } | 14205 } |
12797 Member.prototype.is$Member = function(){return this;}; | 14206 Member.prototype.is$Member = function(){return this;}; |
12798 Member.prototype.is$Named = function(){return this;}; | 14207 Member.prototype.is$Named = function(){return this;}; |
12799 Member.prototype.get$name = function() { return this.name; }; | 14208 Member.prototype.get$name = function() { return this.name; }; |
(...skipping 23 matching lines...) Expand all Loading... |
12823 } | 14232 } |
12824 Member.prototype.get$isAbstract = function() { | 14233 Member.prototype.get$isAbstract = function() { |
12825 return false; | 14234 return false; |
12826 } | 14235 } |
12827 Member.prototype.get$isConst = function() { | 14236 Member.prototype.get$isConst = function() { |
12828 return false; | 14237 return false; |
12829 } | 14238 } |
12830 Member.prototype.get$isFactory = function() { | 14239 Member.prototype.get$isFactory = function() { |
12831 return false; | 14240 return false; |
12832 } | 14241 } |
| 14242 Member.prototype.get$isOperator = function() { |
| 14243 return this.name.startsWith('\$'); |
| 14244 } |
| 14245 Member.prototype.get$isCallMethod = function() { |
| 14246 return this.name == '\$call'; |
| 14247 } |
12833 Member.prototype.get$prefersPropertySyntax = function() { | 14248 Member.prototype.get$prefersPropertySyntax = function() { |
12834 return true; | 14249 return true; |
12835 } | 14250 } |
12836 Member.prototype.get$requiresFieldSyntax = function() { | 14251 Member.prototype.get$requiresFieldSyntax = function() { |
12837 return false; | 14252 return false; |
12838 } | 14253 } |
12839 Member.prototype.get$isNative = function() { | 14254 Member.prototype.get$isNative = function() { |
12840 return false; | 14255 return false; |
12841 } | 14256 } |
12842 Member.prototype.get$constructorName = function() { | 14257 Member.prototype.get$constructorName = function() { |
(...skipping 22 matching lines...) Expand all Loading... |
12865 return null; | 14280 return null; |
12866 } | 14281 } |
12867 Member.prototype.get$parameters = function() { | 14282 Member.prototype.get$parameters = function() { |
12868 return []; | 14283 return []; |
12869 } | 14284 } |
12870 Member.prototype.canInvoke = function(context, args) { | 14285 Member.prototype.canInvoke = function(context, args) { |
12871 return $notnull_bool(this.get$canGet() && new Value(this.get$returnType(), nul
l, null, true).canInvoke(context, '\$call', args)); | 14286 return $notnull_bool(this.get$canGet() && new Value(this.get$returnType(), nul
l, null, true).canInvoke(context, '\$call', args)); |
12872 } | 14287 } |
12873 Member.prototype.invoke = function(context, node, target, args, isDynamic) { | 14288 Member.prototype.invoke = function(context, node, target, args, isDynamic) { |
12874 var newTarget = this._get(context, node, target, isDynamic); | 14289 var newTarget = this._get(context, node, target, isDynamic); |
12875 return newTarget.invoke(context, '\$call', node, args, isDynamic); | 14290 return newTarget.invoke$5(context, '\$call', node, args, isDynamic); |
12876 } | 14291 } |
12877 Member.prototype.override = function(other) { | 14292 Member.prototype.override = function(other) { |
12878 if ($notnull_bool(this.get$isStatic())) { | 14293 if ($notnull_bool(this.get$isStatic())) { |
12879 world.error('static members can not hide parent members', this.get$span(), o
ther.get$span()); | 14294 world.error('static members can not hide parent members', this.get$span(), o
ther.get$span()); |
12880 return false; | 14295 return false; |
12881 } | 14296 } |
12882 else if ($notnull_bool(other.get$isStatic())) { | 14297 else if ($notnull_bool(other.get$isStatic())) { |
12883 world.error('can not override static member', this.get$span(), other.get$spa
n()); | 14298 world.error('can not override static member', this.get$span(), other.get$spa
n()); |
12884 return false; | 14299 return false; |
12885 } | 14300 } |
12886 return true; | 14301 return true; |
12887 } | 14302 } |
12888 Member.prototype.get$generatedFactoryName = function() { | 14303 Member.prototype.get$generatedFactoryName = function() { |
12889 $assert(this.get$isFactory(), "this.isFactory", "member.dart", 192, 12); | 14304 $assert(this.get$isFactory(), "this.isFactory", "member.dart", 195, 12); |
12890 var prefix = ('' + this.declaringType.get$jsname() + '.' + this.get$constructo
rName() + '\$'); | 14305 var prefix = ('' + this.declaringType.get$jsname() + '.' + this.get$constructo
rName() + '\$'); |
12891 if (this.name == '') { | 14306 if (this.name == '') { |
12892 return ('' + prefix + 'factory'); | 14307 return ('' + prefix + 'factory'); |
12893 } | 14308 } |
12894 else { | 14309 else { |
12895 return ('' + prefix + '' + this.name + '\$factory'); | 14310 return ('' + prefix + '' + this.name + '\$factory'); |
12896 } | 14311 } |
12897 } | 14312 } |
12898 Member.prototype.resolveType = function(node, isRequired) { | 14313 Member.prototype.resolveType = function(node, isRequired) { |
12899 var type = this.declaringType.resolveType(node, isRequired); | 14314 var type = this.declaringType.resolveType(node, isRequired); |
12900 if ($notnull_bool(this.get$isStatic() && type.get$hasTypeParams())) { | 14315 if ($notnull_bool(this.get$isStatic() && type.get$hasTypeParams())) { |
12901 world.error('using type parameter in static context', node.span); | 14316 world.error('using type parameter in static context', node.span); |
12902 } | 14317 } |
12903 return (type && type.is$lang_Type()); | 14318 return (type && type.is$lang_Type()); |
12904 } | 14319 } |
12905 Member.prototype._get$3 = function($0, $1, $2) { | 14320 Member.prototype._get$3 = function($0, $1, $2) { |
12906 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value())); | 14321 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value())); |
12907 } | 14322 }; |
12908 ; | |
12909 Member.prototype._set$4 = function($0, $1, $2, $3) { | 14323 Member.prototype._set$4 = function($0, $1, $2, $3) { |
12910 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value())); | 14324 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value())); |
12911 } | 14325 }; |
12912 ; | 14326 Member.prototype.canInvoke$2 = function($0, $1) { |
| 14327 return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments(
))); |
| 14328 }; |
12913 Member.prototype.invoke$4 = function($0, $1, $2, $3) { | 14329 Member.prototype.invoke$4 = function($0, $1, $2, $3) { |
12914 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); | 14330 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
12915 } | 14331 }; |
12916 ; | 14332 Member.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
| 14333 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
| 14334 }; |
| 14335 Member.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
| 14336 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
| 14337 }; |
| 14338 Member.prototype.provideFieldSyntax$0 = function() { |
| 14339 return this.provideFieldSyntax(); |
| 14340 }; |
| 14341 Member.prototype.providePropertySyntax$0 = function() { |
| 14342 return this.providePropertySyntax(); |
| 14343 }; |
| 14344 Member.prototype.resolve$1 = function($0) { |
| 14345 return this.resolve(($0 && $0.is$lang_Type())); |
| 14346 }; |
12917 // ********** Code for TypeMember ************** | 14347 // ********** Code for TypeMember ************** |
12918 function TypeMember(type) { | 14348 function TypeMember(type) { |
12919 this.type = type; | 14349 this.type = type; |
12920 Member.call(this, type.name, type.library.topType); | 14350 Member.call(this, type.name, type.library.topType); |
12921 // Initializers done | 14351 // Initializers done |
12922 } | 14352 } |
12923 $inherits(TypeMember, Member); | 14353 $inherits(TypeMember, Member); |
12924 TypeMember.prototype.is$TypeMember = function(){return this;}; | 14354 TypeMember.prototype.is$TypeMember = function(){return this;}; |
12925 TypeMember.prototype.get$span = function() { | 14355 TypeMember.prototype.get$span = function() { |
12926 return this.type.definition.span; | 14356 return this.type.definition.span; |
(...skipping 22 matching lines...) Expand all Loading... |
12949 return (ret && ret.is$Value()); | 14379 return (ret && ret.is$Value()); |
12950 } | 14380 } |
12951 TypeMember.prototype._set = function(context, node, target, value, isDynamic) { | 14381 TypeMember.prototype._set = function(context, node, target, value, isDynamic) { |
12952 world.error('can not set type', this.type.definition.span); | 14382 world.error('can not set type', this.type.definition.span); |
12953 } | 14383 } |
12954 TypeMember.prototype.invoke = function(context, node, target, args, isDynamic) { | 14384 TypeMember.prototype.invoke = function(context, node, target, args, isDynamic) { |
12955 world.error('can not invoke type', this.type.definition.span); | 14385 world.error('can not invoke type', this.type.definition.span); |
12956 } | 14386 } |
12957 TypeMember.prototype._get$3 = function($0, $1, $2) { | 14387 TypeMember.prototype._get$3 = function($0, $1, $2) { |
12958 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); | 14388 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); |
12959 } | 14389 }; |
12960 ; | |
12961 TypeMember.prototype._set$4 = function($0, $1, $2, $3) { | 14390 TypeMember.prototype._set$4 = function($0, $1, $2, $3) { |
12962 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); | 14391 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
12963 } | 14392 }; |
12964 ; | 14393 TypeMember.prototype.canInvoke$2 = function($0, $1) { |
| 14394 return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments(
))); |
| 14395 }; |
12965 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) { | 14396 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
12966 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); | 14397 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
12967 } | 14398 }; |
12968 ; | 14399 TypeMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
| 14400 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
| 14401 }; |
| 14402 TypeMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
| 14403 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
| 14404 }; |
| 14405 TypeMember.prototype.resolve$1 = function($0) { |
| 14406 return this.resolve(($0 && $0.is$lang_Type())); |
| 14407 }; |
12969 // ********** Code for FieldMember ************** | 14408 // ********** Code for FieldMember ************** |
12970 function FieldMember(name, declaringType, definition, value) { | 14409 function FieldMember(name, declaringType, definition, value) { |
12971 this._providePropertySyntax = false | 14410 this._providePropertySyntax = false |
12972 this._computing = false | 14411 this._computing = false |
12973 this.definition = definition; | 14412 this.definition = definition; |
12974 this.value = value; | 14413 this.value = value; |
12975 this.isNative = false; | 14414 this.isNative = false; |
12976 Member.call(this, name, declaringType); | 14415 Member.call(this, name, declaringType); |
12977 // Initializers done | 14416 // Initializers done |
12978 } | 14417 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13111 } | 14550 } |
13112 return new Value(this.type, ('' + target.code + '.' + this.get$jsname() + ''),
node.span, true); | 14551 return new Value(this.type, ('' + target.code + '.' + this.get$jsname() + ''),
node.span, true); |
13113 } | 14552 } |
13114 FieldMember.prototype._set = function(context, node, target, value, isDynamic) { | 14553 FieldMember.prototype._set = function(context, node, target, value, isDynamic) { |
13115 var lhs = this._get(context, node, target, isDynamic); | 14554 var lhs = this._get(context, node, target, isDynamic); |
13116 value = value.convertTo(context, this.type, node, isDynamic); | 14555 value = value.convertTo(context, this.type, node, isDynamic); |
13117 return new Value(this.type, ('' + lhs.code + ' = ' + value.code + ''), node.sp
an, true); | 14556 return new Value(this.type, ('' + lhs.code + ' = ' + value.code + ''), node.sp
an, true); |
13118 } | 14557 } |
13119 FieldMember.prototype._get$3 = function($0, $1, $2) { | 14558 FieldMember.prototype._get$3 = function($0, $1, $2) { |
13120 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); | 14559 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); |
13121 } | 14560 }; |
13122 ; | |
13123 FieldMember.prototype._set$4 = function($0, $1, $2, $3) { | 14561 FieldMember.prototype._set$4 = function($0, $1, $2, $3) { |
13124 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); | 14562 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
13125 } | 14563 }; |
13126 ; | 14564 FieldMember.prototype.computeValue$0 = function() { |
| 14565 return this.computeValue(); |
| 14566 }; |
| 14567 FieldMember.prototype.provideFieldSyntax$0 = function() { |
| 14568 return this.provideFieldSyntax(); |
| 14569 }; |
| 14570 FieldMember.prototype.providePropertySyntax$0 = function() { |
| 14571 return this.providePropertySyntax(); |
| 14572 }; |
| 14573 FieldMember.prototype.resolve$1 = function($0) { |
| 14574 return this.resolve(($0 && $0.is$lang_Type())); |
| 14575 }; |
13127 // ********** Code for PropertyMember ************** | 14576 // ********** Code for PropertyMember ************** |
13128 function PropertyMember(name, declaringType) { | 14577 function PropertyMember(name, declaringType) { |
13129 this._provideFieldSyntax = false | 14578 this._provideFieldSyntax = false |
13130 Member.call(this, name, declaringType); | 14579 Member.call(this, name, declaringType); |
13131 // Initializers done | 14580 // Initializers done |
13132 } | 14581 } |
13133 $inherits(PropertyMember, Member); | 14582 $inherits(PropertyMember, Member); |
13134 PropertyMember.prototype.is$PropertyMember = function(){return this;}; | 14583 PropertyMember.prototype.is$PropertyMember = function(){return this;}; |
13135 PropertyMember.prototype.get$span = function() { | 14584 PropertyMember.prototype.get$span = function() { |
13136 var $0; | 14585 var $0; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13206 if (this.getter == null) this.getter = parent.getter; | 14655 if (this.getter == null) this.getter = parent.getter; |
13207 if (this.setter == null) this.setter = parent.setter; | 14656 if (this.setter == null) this.setter = parent.setter; |
13208 } | 14657 } |
13209 PropertyMember.prototype.resolve = function(inType) { | 14658 PropertyMember.prototype.resolve = function(inType) { |
13210 if (this.getter != null) this.getter.resolve(inType); | 14659 if (this.getter != null) this.getter.resolve(inType); |
13211 if (this.setter != null) this.setter.resolve(inType); | 14660 if (this.setter != null) this.setter.resolve(inType); |
13212 this.get$library()._addMember(this); | 14661 this.get$library()._addMember(this); |
13213 } | 14662 } |
13214 PropertyMember.prototype._get$3 = function($0, $1, $2) { | 14663 PropertyMember.prototype._get$3 = function($0, $1, $2) { |
13215 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); | 14664 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); |
13216 } | 14665 }; |
13217 ; | |
13218 PropertyMember.prototype._set$4 = function($0, $1, $2, $3) { | 14666 PropertyMember.prototype._set$4 = function($0, $1, $2, $3) { |
13219 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); | 14667 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
13220 } | 14668 }; |
13221 ; | 14669 PropertyMember.prototype.provideFieldSyntax$0 = function() { |
| 14670 return this.provideFieldSyntax(); |
| 14671 }; |
| 14672 PropertyMember.prototype.providePropertySyntax$0 = function() { |
| 14673 return this.providePropertySyntax(); |
| 14674 }; |
| 14675 PropertyMember.prototype.resolve$1 = function($0) { |
| 14676 return this.resolve(($0 && $0.is$lang_Type())); |
| 14677 }; |
13222 // ********** Code for ConcreteMember ************** | 14678 // ********** Code for ConcreteMember ************** |
13223 function ConcreteMember(name, declaringType, baseMember) { | 14679 function ConcreteMember(name, declaringType, baseMember) { |
13224 this.baseMember = baseMember; | 14680 this.baseMember = baseMember; |
13225 Member.call(this, name, declaringType); | 14681 Member.call(this, name, declaringType); |
13226 // Initializers done | 14682 // Initializers done |
13227 this.parameters = []; | 14683 this.parameters = []; |
13228 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring
Type); | 14684 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring
Type); |
13229 var $list = this.baseMember.get$parameters(); | 14685 var $list = this.baseMember.get$parameters(); |
13230 for (var $i = 0;$i < $list.length; $i++) { | 14686 for (var $i = 0;$i < $list.length; $i++) { |
13231 var p = $list.$index($i); | 14687 var p = $list.$index($i); |
13232 var newType = p.type.resolveTypeParams(declaringType); | 14688 var newType = p.type.resolveTypeParams$1(declaringType); |
13233 if ($notnull_bool($ne(newType, p.type))) { | 14689 if ($notnull_bool($ne(newType, p.type))) { |
13234 this.parameters.add(p.copyWithNewType((newType && newType.is$lang_Type()))
); | 14690 this.parameters.add(p.copyWithNewType$1(newType)); |
13235 } | 14691 } |
13236 else { | 14692 else { |
13237 this.parameters.add(p); | 14693 this.parameters.add(p); |
13238 } | 14694 } |
13239 } | 14695 } |
13240 } | 14696 } |
13241 $inherits(ConcreteMember, Member); | 14697 $inherits(ConcreteMember, Member); |
13242 ConcreteMember.prototype.is$ConcreteMember = function(){return this;}; | 14698 ConcreteMember.prototype.is$ConcreteMember = function(){return this;}; |
13243 ConcreteMember.prototype.get$returnType = function() { return this.returnType; }
; | 14699 ConcreteMember.prototype.get$returnType = function() { return this.returnType; }
; |
13244 ConcreteMember.prototype.set$returnType = function(value) { return this.returnTy
pe = value; }; | 14700 ConcreteMember.prototype.set$returnType = function(value) { return this.returnTy
pe = value; }; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13306 return (($0 = this.baseMember.get$definition()) && $0.is$Definition()); | 14762 return (($0 = this.baseMember.get$definition()) && $0.is$Definition()); |
13307 } | 14763 } |
13308 ConcreteMember.prototype.get$initDelegate = function() { | 14764 ConcreteMember.prototype.get$initDelegate = function() { |
13309 var $0; | 14765 var $0; |
13310 return (($0 = this.baseMember.get$initDelegate()) && $0.is$Definition()); | 14766 return (($0 = this.baseMember.get$initDelegate()) && $0.is$Definition()); |
13311 } | 14767 } |
13312 ConcreteMember.prototype.set$initDelegate = function(ctor) { | 14768 ConcreteMember.prototype.set$initDelegate = function(ctor) { |
13313 this.baseMember.set$initDelegate(ctor); | 14769 this.baseMember.set$initDelegate(ctor); |
13314 } | 14770 } |
13315 ConcreteMember.prototype.resolveType = function(node, isRequired) { | 14771 ConcreteMember.prototype.resolveType = function(node, isRequired) { |
| 14772 var $0; |
13316 var type = this.baseMember.resolveType(node, isRequired); | 14773 var type = this.baseMember.resolveType(node, isRequired); |
13317 return type.resolveTypeParams(this.declaringType); | 14774 return (($0 = type.resolveTypeParams$1(this.declaringType)) && $0.is$lang_Type
()); |
13318 } | 14775 } |
13319 ConcreteMember.prototype.override = function(other) { | 14776 ConcreteMember.prototype.override = function(other) { |
13320 return this.baseMember.override(other); | 14777 return this.baseMember.override(other); |
13321 } | 14778 } |
13322 ConcreteMember.prototype._get = function(context, node, target, isDynamic) { | 14779 ConcreteMember.prototype._get = function(context, node, target, isDynamic) { |
13323 var ret = this.baseMember._get(context, node, target, isDynamic); | 14780 var ret = this.baseMember._get(context, node, target, isDynamic); |
13324 return new Value(this.get$inferredResult(), ret.code, node.span, true); | 14781 return new Value(this.get$inferredResult(), ret.code, node.span, true); |
13325 } | 14782 } |
13326 ConcreteMember.prototype._set = function(context, node, target, value, isDynamic
) { | 14783 ConcreteMember.prototype._set = function(context, node, target, value, isDynamic
) { |
13327 var ret = this.baseMember._set(context, node, target, value, isDynamic); | 14784 var ret = this.baseMember._set(context, node, target, value, isDynamic); |
13328 return new Value(this.returnType, ret.code, node.span, true); | 14785 return new Value(this.returnType, ret.code, node.span, true); |
13329 } | 14786 } |
13330 ConcreteMember.prototype.invoke = function(context, node, target, args, isDynami
c) { | 14787 ConcreteMember.prototype.invoke = function(context, node, target, args, isDynami
c) { |
13331 var ret = this.baseMember.invoke(context, node, target, args, isDynamic); | 14788 var ret = this.baseMember.invoke(context, node, target, args, isDynamic); |
13332 var code = ret.code; | 14789 var code = ret.code; |
13333 if ($notnull_bool(this.get$isConstructor())) { | 14790 if ($notnull_bool(this.get$isConstructor())) { |
13334 code = code.replaceFirst(this.declaringType.get$genericType().get$jsname(),
this.declaringType.get$jsname()); | 14791 code = code.replaceFirst$2(this.declaringType.get$genericType().get$jsname()
, this.declaringType.get$jsname()); |
13335 } | 14792 } |
13336 this.declaringType.genMethod(this); | 14793 this.declaringType.genMethod(this); |
13337 return new Value(this.get$inferredResult(), code, node.span, true); | 14794 return new Value(this.get$inferredResult(), code, node.span, true); |
13338 } | 14795 } |
13339 ConcreteMember.prototype._get$3 = function($0, $1, $2) { | 14796 ConcreteMember.prototype._get$3 = function($0, $1, $2) { |
13340 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); | 14797 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); |
13341 } | 14798 }; |
13342 ; | |
13343 ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) { | 14799 ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) { |
13344 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); | 14800 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
13345 } | 14801 }; |
13346 ; | 14802 ConcreteMember.prototype.canInvoke$2 = function($0, $1) { |
| 14803 return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments(
))); |
| 14804 }; |
13347 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) { | 14805 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
13348 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); | 14806 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
13349 } | 14807 }; |
13350 ; | 14808 ConcreteMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic
) { |
| 14809 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
| 14810 }; |
| 14811 ConcreteMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
| 14812 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
| 14813 }; |
| 14814 ConcreteMember.prototype.provideFieldSyntax$0 = function() { |
| 14815 return this.provideFieldSyntax(); |
| 14816 }; |
| 14817 ConcreteMember.prototype.providePropertySyntax$0 = function() { |
| 14818 return this.providePropertySyntax(); |
| 14819 }; |
13351 // ********** Code for MethodMember ************** | 14820 // ********** Code for MethodMember ************** |
13352 function MethodMember(name, declaringType, definition) { | 14821 function MethodMember(name, declaringType, definition) { |
13353 this.isStatic = false | 14822 this.isStatic = false |
13354 this.isAbstract = false | 14823 this.isAbstract = false |
13355 this.isConst = false | 14824 this.isConst = false |
13356 this.isFactory = false | 14825 this.isFactory = false |
13357 this.isLambda = false | 14826 this.isLambda = false |
13358 this._providePropertySyntax = false | 14827 this._providePropertySyntax = false |
13359 this._provideFieldSyntax = false | 14828 this._provideFieldSyntax = false |
13360 this._provideOptionalParamInfo = false | 14829 this._provideOptionalParamInfo = false |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13491 if ($notnull_bool(p >= 0 && args.values.$index(p).needsTemp)) { | 14960 if ($notnull_bool(p >= 0 && args.values.$index(p).needsTemp)) { |
13492 if (lastParameter != null && lastParameter > $assert_num(p)) { | 14961 if (lastParameter != null && lastParameter > $assert_num(p)) { |
13493 return false; | 14962 return false; |
13494 } | 14963 } |
13495 lastParameter = $assert_num(p); | 14964 lastParameter = $assert_num(p); |
13496 } | 14965 } |
13497 } | 14966 } |
13498 return true; | 14967 return true; |
13499 } | 14968 } |
13500 MethodMember.prototype.needsArgumentConversion = function(args) { | 14969 MethodMember.prototype.needsArgumentConversion = function(args) { |
13501 var $0; | |
13502 var bareCount = args.get$bareCount(); | 14970 var bareCount = args.get$bareCount(); |
13503 for (var i = 0; | 14971 for (var i = 0; |
13504 i < bareCount; i++) { | 14972 i < bareCount; i++) { |
13505 var arg = args.values.$index(i); | 14973 var arg = args.values.$index(i); |
13506 if ($notnull_bool(arg.needsConversion((($0 = this.parameters.$index(i).type)
&& $0.is$lang_Type())))) { | 14974 if ($notnull_bool(arg.needsConversion$1(this.parameters.$index(i).type))) { |
13507 return false; | 14975 return false; |
13508 } | 14976 } |
13509 } | 14977 } |
13510 if (bareCount < this.parameters.length) { | 14978 if (bareCount < this.parameters.length) { |
13511 this.genParameterValues(); | 14979 this.genParameterValues(); |
13512 for (var i = bareCount; | 14980 for (var i = bareCount; |
13513 i < this.parameters.length; i++) { | 14981 i < this.parameters.length; i++) { |
13514 var arg = args.getValue($assert_String(this.parameters.$index(i).get$name(
))); | 14982 var arg = args.getValue($assert_String(this.parameters.$index(i).get$name(
))); |
13515 if ($notnull_bool($ne(arg, null) && arg.needsConversion((($0 = this.parame
ters.$index(i).type) && $0.is$lang_Type())))) { | 14983 if ($notnull_bool($ne(arg, null) && arg.needsConversion$1(this.parameters.
$index(i).type))) { |
13516 return false; | 14984 return false; |
13517 } | 14985 } |
13518 } | 14986 } |
13519 } | 14987 } |
13520 return true; | 14988 return true; |
13521 } | 14989 } |
13522 MethodMember._argCountMsg = function(actual, expected, atLeast) { | 14990 MethodMember._argCountMsg = function(actual, expected, atLeast) { |
13523 return 'wrong number of arguments, expected ' + ('' + ($notnull_bool(atLeast)
? "at least " : "") + '' + expected + ' but found ' + actual + ''); | 14991 return 'wrong number of arguments, expected ' + ('' + ($notnull_bool(atLeast)
? "at least " : "") + '' + expected + ' but found ' + actual + ''); |
13524 } | 14992 } |
13525 MethodMember.prototype._argError = function(context, node, target, args, msg) { | 14993 MethodMember.prototype._argError = function(context, node, target, args, msg) { |
13526 if ($notnull_bool(this.isStatic || this.get$isConstructor())) { | 14994 if ($notnull_bool(this.isStatic || this.get$isConstructor())) { |
13527 world.error(msg, node.span); | 14995 world.error(msg, node.span); |
13528 } | 14996 } |
13529 else { | 14997 else { |
13530 world.warning(msg, node.span); | 14998 world.warning(msg, node.span); |
13531 } | 14999 } |
13532 return target.invokeNoSuchMethod(context, this.name, node, args); | 15000 return target.invokeNoSuchMethod(context, this.name, node, args); |
13533 } | 15001 } |
13534 MethodMember.prototype.genParameterValues = function() { | 15002 MethodMember.prototype.genParameterValues = function() { |
13535 var $list = this.parameters; | 15003 var $list = this.parameters; |
13536 for (var $i = 0;$i < $list.length; $i++) { | 15004 for (var $i = 0;$i < $list.length; $i++) { |
13537 var p = $list.$index($i); | 15005 var p = $list.$index($i); |
13538 p.genValue(this, this.generator); | 15006 p.genValue$2(this, this.generator); |
13539 } | 15007 } |
13540 } | 15008 } |
13541 MethodMember.prototype.invoke = function(context, node, target, args, isDynamic)
{ | 15009 MethodMember.prototype.invoke = function(context, node, target, args, isDynamic)
{ |
13542 var $0; | |
13543 if (this.parameters == null) { | 15010 if (this.parameters == null) { |
13544 world.info(('surprised to need to resolve: ' + this.declaringType.name + '.'
+ this.name + '')); | 15011 world.info(('surprised to need to resolve: ' + this.declaringType.name + '.'
+ this.name + '')); |
13545 this.resolve(this.declaringType); | 15012 this.resolve(this.declaringType); |
13546 } | 15013 } |
13547 this.declaringType.genMethod(this); | 15014 this.declaringType.genMethod(this); |
13548 if ($notnull_bool(this.isStatic || this.isFactory)) { | 15015 if ($notnull_bool(this.isStatic || this.isFactory)) { |
13549 this.declaringType.markUsed(); | 15016 this.declaringType.markUsed(); |
13550 } | 15017 } |
13551 if ($notnull_bool(this.get$isNative() && this.returnType != null)) this.return
Type.markUsed(); | 15018 if ($notnull_bool(this.get$isNative() && this.returnType != null)) this.return
Type.markUsed(); |
13552 if (!$notnull_bool(this.namesInOrder(args))) { | 15019 if (!$notnull_bool(this.namesInOrder(args))) { |
13553 return context.findMembers(this.name).invokeOnVar(context, node, target, arg
s); | 15020 return context.findMembers(this.name).invokeOnVar(context, node, target, arg
s); |
13554 } | 15021 } |
13555 var argsCode = []; | 15022 var argsCode = []; |
13556 if (target != null && ($notnull_bool(this.get$isConstructor() || target.isSupe
r))) { | 15023 if (target != null && ($notnull_bool(this.get$isConstructor() || target.isSupe
r))) { |
13557 argsCode.add('this'); | 15024 argsCode.add$1('this'); |
13558 } | 15025 } |
13559 var bareCount = args.get$bareCount(); | 15026 var bareCount = args.get$bareCount(); |
13560 for (var i = 0; | 15027 for (var i = 0; |
13561 i < bareCount; i++) { | 15028 i < bareCount; i++) { |
13562 var arg = args.values.$index(i); | 15029 var arg = args.values.$index(i); |
13563 if (i >= this.parameters.length) { | 15030 if (i >= this.parameters.length) { |
13564 var msg = MethodMember._argCountMsg(args.get$length(), this.parameters.len
gth, false); | 15031 var msg = MethodMember._argCountMsg(args.get$length(), this.parameters.len
gth, false); |
13565 return this._argError(context, node, target, args, $assert_String(msg)); | 15032 return this._argError(context, node, target, args, $assert_String(msg)); |
13566 } | 15033 } |
13567 arg = arg.convertTo(context, (($0 = this.parameters.$index(i).type) && $0.is
$lang_Type()), node, isDynamic); | 15034 arg = arg.convertTo$4(context, this.parameters.$index(i).type, node, isDynam
ic); |
13568 if ($notnull_bool(this.isConst && arg.get$isConst())) { | 15035 if ($notnull_bool(this.isConst && arg.get$isConst())) { |
13569 argsCode.add(arg.get$canonicalCode()); | 15036 argsCode.add$1(arg.get$canonicalCode()); |
13570 } | 15037 } |
13571 else { | 15038 else { |
13572 argsCode.add(arg.code); | 15039 argsCode.add$1(arg.code); |
13573 } | 15040 } |
13574 } | 15041 } |
13575 if (bareCount < this.parameters.length) { | 15042 if (bareCount < this.parameters.length) { |
13576 this.genParameterValues(); | 15043 this.genParameterValues(); |
13577 var namedArgsUsed = 0; | 15044 var namedArgsUsed = 0; |
13578 for (var i = bareCount; | 15045 for (var i = bareCount; |
13579 i < this.parameters.length; i++) { | 15046 i < this.parameters.length; i++) { |
13580 var arg = args.getValue($assert_String(this.parameters.$index(i).get$name(
))); | 15047 var arg = args.getValue($assert_String(this.parameters.$index(i).get$name(
))); |
13581 if ($notnull_bool(arg == null)) { | 15048 if ($notnull_bool(arg == null)) { |
13582 arg = this.parameters.$index(i).get$value(); | 15049 arg = this.parameters.$index(i).get$value(); |
13583 } | 15050 } |
13584 else { | 15051 else { |
13585 arg = arg.convertTo(context, (($0 = this.parameters.$index(i).type) && $
0.is$lang_Type()), node, isDynamic); | 15052 arg = arg.convertTo$4(context, this.parameters.$index(i).type, node, isD
ynamic); |
13586 namedArgsUsed++; | 15053 namedArgsUsed++; |
13587 } | 15054 } |
13588 if ($notnull_bool(arg == null || !$notnull_bool(this.parameters.$index(i).
get$isOptional()))) { | 15055 if ($notnull_bool(arg == null || !$notnull_bool(this.parameters.$index(i).
get$isOptional()))) { |
13589 var msg = MethodMember._argCountMsg(Math.min(i, args.get$length()), i +
1, true); | 15056 var msg = MethodMember._argCountMsg(Math.min(i, args.get$length()), i +
1, true); |
13590 return this._argError(context, node, target, args, $assert_String(msg)); | 15057 return this._argError(context, node, target, args, $assert_String(msg)); |
13591 } | 15058 } |
13592 else { | 15059 else { |
13593 argsCode.add($notnull_bool(this.isConst && arg.get$isConst()) ? arg.get$
canonicalCode() : arg.code); | 15060 argsCode.add$1($notnull_bool(this.isConst && arg.get$isConst()) ? arg.ge
t$canonicalCode() : arg.code); |
13594 } | 15061 } |
13595 } | 15062 } |
13596 if (namedArgsUsed < args.get$nameCount()) { | 15063 if (namedArgsUsed < args.get$nameCount()) { |
13597 var seen = new HashSetImplementation$String(); | 15064 var seen = new HashSetImplementation$String(); |
13598 for (var i = bareCount; | 15065 for (var i = bareCount; |
13599 i < args.get$length(); i++) { | 15066 i < args.get$length(); i++) { |
13600 var name = args.getName(i); | 15067 var name = args.getName(i); |
13601 if (seen.contains(name)) { | 15068 if ($notnull_bool(seen.contains$1(name))) { |
13602 return this._argError(context, node, target, args, ('duplicate argumen
t "' + name + '"')); | 15069 return this._argError(context, node, target, args, ('duplicate argumen
t "' + name + '"')); |
13603 } | 15070 } |
13604 seen.add(name); | 15071 seen.add$1(name); |
13605 var p = this.indexOfParameter($assert_String(name)); | 15072 var p = this.indexOfParameter($assert_String(name)); |
13606 if (p < 0) { | 15073 if (p < 0) { |
13607 return this._argError(context, node, target, args, ('method does not h
ave optional parameter "' + name + '"')); | 15074 return this._argError(context, node, target, args, ('method does not h
ave optional parameter "' + name + '"')); |
13608 } | 15075 } |
13609 else if (p < bareCount) { | 15076 else if (p < bareCount) { |
13610 return this._argError(context, node, target, args, ('argument "' + nam
e + '" passed as positional and named')); | 15077 return this._argError(context, node, target, args, ('argument "' + nam
e + '" passed as positional and named')); |
13611 } | 15078 } |
13612 } | 15079 } |
13613 world.internalError(('wrong named arguments calling ' + this.name + ''), n
ode.span); | 15080 world.internalError(('wrong named arguments calling ' + this.name + ''), n
ode.span); |
13614 } | 15081 } |
13615 Arguments.removeTrailingNulls((argsCode && argsCode.is$List$Value())); | 15082 Arguments.removeTrailingNulls((argsCode && argsCode.is$List$Value())); |
13616 } | 15083 } |
13617 var argsString = Strings.join((argsCode && argsCode.is$List$String()), ', '); | 15084 var argsString = Strings.join((argsCode && argsCode.is$List$String()), ', '); |
13618 if ($notnull_bool(this.get$isConstructor())) { | 15085 if ($notnull_bool(this.get$isConstructor())) { |
13619 return this._invokeConstructor(context, node, target, args, argsString); | 15086 return this._invokeConstructor(context, node, target, args, argsString); |
13620 } | 15087 } |
13621 if ($notnull_bool(target != null && target.isSuper)) { | 15088 if ($notnull_bool(target != null && target.isSuper)) { |
13622 return new Value(this.get$inferredResult(), ('' + this.declaringType.get$jsn
ame() + '.prototype.' + this.get$jsname() + '.call(' + argsString + ')'), node.s
pan, true); | 15089 return new Value(this.get$inferredResult(), ('' + this.declaringType.get$jsn
ame() + '.prototype.' + this.get$jsname() + '.call(' + argsString + ')'), node.s
pan, true); |
13623 } | 15090 } |
13624 if (this.name.startsWith('\$')) { | 15091 if ($notnull_bool(this.get$isOperator())) { |
13625 return this._invokeBuiltin(context, node, target, args, argsCode, isDynamic)
; | 15092 return this._invokeBuiltin(context, node, target, args, argsCode, isDynamic)
; |
13626 } | 15093 } |
13627 if ($notnull_bool(this.isFactory)) { | 15094 if ($notnull_bool(this.isFactory)) { |
13628 return new Value(this.get$inferredResult(), ('' + this.get$generatedFactoryN
ame() + '(' + argsString + ')'), node.span, true); | 15095 return new Value(this.get$inferredResult(), ('' + this.get$generatedFactoryN
ame() + '(' + argsString + ')'), node.span, true); |
13629 } | 15096 } |
13630 if ($notnull_bool(this.isStatic)) { | 15097 if ($notnull_bool(this.isStatic)) { |
13631 if ($notnull_bool(this.declaringType.get$isTop())) { | 15098 if ($notnull_bool(this.declaringType.get$isTop())) { |
13632 return new Value(this.get$inferredResult(), ('' + this.get$jsname() + '('
+ argsString + ')'), node != null ? node.span : node, true); | 15099 return new Value(this.get$inferredResult(), ('' + this.get$jsname() + '('
+ argsString + ')'), node != null ? node.span : node, true); |
13633 } | 15100 } |
13634 return new Value(this.get$inferredResult(), ('' + this.declaringType.get$jsn
ame() + '.' + this.get$jsname() + '(' + argsString + ')'), node.span, true); | 15101 return new Value(this.get$inferredResult(), ('' + this.declaringType.get$jsn
ame() + '.' + this.get$jsname() + '(' + argsString + ')'), node.span, true); |
13635 } | 15102 } |
13636 var code = ('' + target.code + '.' + this.get$jsname() + '(' + argsString + ')
'); | 15103 var code = ('' + target.code + '.' + this.get$jsname() + '(' + argsString + ')
'); |
13637 if ($notnull_bool(target.get$isConst())) { | 15104 if ($notnull_bool(target.get$isConst())) { |
13638 if ((target instanceof GlobalValue)) { | 15105 if ((target instanceof GlobalValue)) { |
13639 target = target.get$dynamic().exp; | 15106 target = target.get$dynamic().exp; |
13640 } | 15107 } |
13641 if (this.name == 'get\$length') { | 15108 if (this.name == 'get\$length') { |
13642 if ((target instanceof ConstListValue) || (target instanceof ConstMapValue
)) { | 15109 if ((target instanceof ConstListValue) || (target instanceof ConstMapValue
)) { |
13643 code = ('' + target.get$dynamic().values.length + ''); | 15110 code = ('' + target.get$dynamic().values.length + ''); |
13644 } | 15111 } |
13645 } | 15112 } |
13646 else if (this.name == 'isEmpty') { | 15113 else if (this.name == 'isEmpty') { |
13647 if ((target instanceof ConstListValue) || (target instanceof ConstMapValue
)) { | 15114 if ((target instanceof ConstListValue) || (target instanceof ConstMapValue
)) { |
13648 code = ('' + target.get$dynamic().values.isEmpty() + ''); | 15115 code = ('' + target.get$dynamic().values.isEmpty$0() + ''); |
13649 } | 15116 } |
13650 } | 15117 } |
13651 } | 15118 } |
13652 if (this.name == 'get\$typeName' && $eq(this.declaringType.get$library(), worl
d.get$dom())) { | 15119 if (this.name == 'get\$typeName' && $eq(this.declaringType.get$library(), worl
d.get$dom())) { |
13653 world.gen.corejs.useTypeNameOf = true; | 15120 world.gen.corejs.useTypeNameOf = true; |
13654 } | 15121 } |
13655 return new Value(this.get$inferredResult(), code, node.span, true); | 15122 return new Value(this.get$inferredResult(), code, node.span, true); |
13656 } | 15123 } |
13657 MethodMember.prototype._invokeConstructor = function(context, node, target, args
, argsString) { | 15124 MethodMember.prototype._invokeConstructor = function(context, node, target, args
, argsString) { |
13658 this.declaringType.markUsed(); | 15125 this.declaringType.markUsed(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13714 var delegateArgs = this.generator._makeArgs((($0 = init.get$arguments())
&& $0.is$List$ArgumentNode())); | 15181 var delegateArgs = this.generator._makeArgs((($0 = init.get$arguments())
&& $0.is$List$ArgumentNode())); |
13715 var value = this.initDelegate.invoke(this.generator, node, target, deleg
ateArgs, false); | 15182 var value = this.initDelegate.invoke(this.generator, node, target, deleg
ateArgs, false); |
13716 if ((init.target instanceof ThisExpression)) { | 15183 if ((init.target instanceof ThisExpression)) { |
13717 return (value && value.is$Value()); | 15184 return (value && value.is$Value()); |
13718 } | 15185 } |
13719 else { | 15186 else { |
13720 if ((value instanceof GlobalValue)) { | 15187 if ((value instanceof GlobalValue)) { |
13721 value = value.exp; | 15188 value = value.exp; |
13722 } | 15189 } |
13723 var $list0 = value.fields.getKeys(); | 15190 var $list0 = value.fields.getKeys(); |
13724 for (var $i0 = value.fields.getKeys().iterator(); $i0.hasNext(); ) { | 15191 for (var $i0 = value.fields.getKeys().iterator$0(); $i0.hasNext$0(); )
{ |
13725 var fname = $i0.next(); | 15192 var fname = $i0.next$0(); |
13726 fields.$setindex(fname, value.fields.$index(fname)); | 15193 fields.$setindex(fname, value.fields.$index(fname)); |
13727 } | 15194 } |
13728 } | 15195 } |
13729 } | 15196 } |
13730 else { | 15197 else { |
13731 var assign = (init && init.is$BinaryExpression()); | 15198 var assign = (init && init.is$BinaryExpression()); |
13732 var x = (($0 = assign.x) && $0.is$VarExpression()); | 15199 var x = (($0 = assign.x) && $0.is$VarExpression()); |
13733 var fname = x.name.name; | 15200 var fname = x.name.name; |
13734 var val = this.generator.visitValue(assign.y); | 15201 var val = this.generator.visitValue(assign.y); |
13735 fields.$setindex(fname, val); | 15202 fields.$setindex(fname, val); |
13736 } | 15203 } |
13737 } | 15204 } |
13738 this.generator._popBlock(); | 15205 this.generator._popBlock(); |
13739 } | 15206 } |
13740 var $list = this.declaringType.get$members().getValues(); | 15207 var $list = this.declaringType.get$members().getValues(); |
13741 for (var $i = this.declaringType.get$members().getValues().iterator(); $i.hasN
ext(); ) { | 15208 for (var $i = this.declaringType.get$members().getValues().iterator$0(); $i.ha
sNext$0(); ) { |
13742 var f = $i.next(); | 15209 var f = $i.next$0(); |
13743 if ($notnull_bool((f instanceof FieldMember) && !$notnull_bool(f.get$isStati
c()) && $ne(f.get$value(), null)) && !fields.containsKey(f.get$name())) { | 15210 if ($notnull_bool((f instanceof FieldMember) && !$notnull_bool(f.get$isStati
c()) && $ne(f.get$value(), null)) && !fields.containsKey(f.get$name())) { |
13744 fields.$setindex(f.get$name(), f.computeValue()); | 15211 fields.$setindex(f.get$name(), f.computeValue$0()); |
13745 } | 15212 } |
13746 } | 15213 } |
13747 return world.gen.globalForConst(ConstObjectValue.ConstObjectValue$factory(this
.declaringType, fields, code, node.span), args.values); | 15214 return world.gen.globalForConst(ConstObjectValue.ConstObjectValue$factory(this
.declaringType, fields, code, node.span), args.values); |
13748 } | 15215 } |
13749 MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar
gsCode, isDynamic) { | 15216 MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar
gsCode, isDynamic) { |
13750 var allConst = $notnull_bool(target.get$isConst() && args.values.every((functi
on (arg) { | 15217 var allConst = $notnull_bool(target.get$isConst() && args.values.every((functi
on (arg) { |
13751 return arg.get$isConst(); | 15218 return arg.get$isConst(); |
13752 }) | 15219 }) |
13753 )); | 15220 )); |
13754 if ($notnull_bool(this.declaringType.get$isNum())) { | 15221 if ($notnull_bool(this.declaringType.get$isNum())) { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13884 return EvaluatedValue.EvaluatedValue$factory(this.get$inferredResult(), va
lue, ("" + value + ""), node.span); | 15351 return EvaluatedValue.EvaluatedValue$factory(this.get$inferredResult(), va
lue, ("" + value + ""), node.span); |
13885 } | 15352 } |
13886 } | 15353 } |
13887 else if ($notnull_bool(this.declaringType.get$isString())) { | 15354 else if ($notnull_bool(this.declaringType.get$isString())) { |
13888 if (this.name == '\$index') { | 15355 if (this.name == '\$index') { |
13889 return new Value(this.declaringType, ('' + target.code + '[' + argsCode.$i
ndex(0) + ']'), node.span, true); | 15356 return new Value(this.declaringType, ('' + target.code + '[' + argsCode.$i
ndex(0) + ']'), node.span, true); |
13890 } | 15357 } |
13891 else if (this.name == '\$add') { | 15358 else if (this.name == '\$add') { |
13892 if ($notnull_bool(allConst)) { | 15359 if ($notnull_bool(allConst)) { |
13893 var val0 = target.get$dynamic().get$actualValue(); | 15360 var val0 = target.get$dynamic().get$actualValue(); |
13894 val0 = val0.substring(1, val0.length - 1); | 15361 val0 = val0.substring$2(1, val0.length - 1); |
13895 var val1 = args.values.$index(0).get$dynamic().get$actualValue(); | 15362 var val1 = args.values.$index(0).get$dynamic().get$actualValue(); |
13896 if ($notnull_bool(args.values.$index(0).type.get$isString())) { | 15363 if ($notnull_bool(args.values.$index(0).type.get$isString())) { |
13897 val1 = val1.substring(1, val1.length - 1); | 15364 val1 = val1.substring$2(1, val1.length - 1); |
13898 } | 15365 } |
13899 var value = ('' + val0 + '' + val1 + ''); | 15366 var value = ('' + val0 + '' + val1 + ''); |
13900 value = '"' + value.replaceAll('"', '\\"') + '"'; | 15367 value = '"' + value.replaceAll$2('"', '\\"') + '"'; |
13901 return EvaluatedValue.EvaluatedValue$factory(world.stringType, value, $a
ssert_String(value), node.span); | 15368 return EvaluatedValue.EvaluatedValue$factory(world.stringType, value, $a
ssert_String(value), node.span); |
13902 } | 15369 } |
13903 args.values.$index(0).invoke$4(context, 'toString', node, Arguments.get$EM
PTY()); | 15370 args.values.$index(0).invoke$4(context, 'toString', node, Arguments.get$EM
PTY()); |
13904 return new Value(this.declaringType, ('' + target.code + ' + ' + argsCode.
$index(0) + ''), node.span, true); | 15371 return new Value(this.declaringType, ('' + target.code + ' + ' + argsCode.
$index(0) + ''), node.span, true); |
13905 } | 15372 } |
13906 } | 15373 } |
13907 else if ($notnull_bool(this.declaringType.get$isNativeType())) { | 15374 else if ($notnull_bool(this.declaringType.get$isNativeType())) { |
13908 if (this.name == '\$index') { | 15375 if (this.name == '\$index') { |
13909 return new Value(this.returnType, ('' + target.code + '[' + argsCode.$inde
x(0) + ']'), node.span, true); | 15376 return new Value(this.returnType, ('' + target.code + '[' + argsCode.$inde
x(0) + ']'), node.span, true); |
13910 } | 15377 } |
(...skipping 14 matching lines...) Expand all Loading... |
13925 } | 15392 } |
13926 if ($notnull_bool($eq(argsCode.$index(0), 'null'))) { | 15393 if ($notnull_bool($eq(argsCode.$index(0), 'null'))) { |
13927 return new Value(this.get$inferredResult(), ('' + target.code + ' ' + op +
' null'), node.span, true); | 15394 return new Value(this.get$inferredResult(), ('' + target.code + ' ' + op +
' null'), node.span, true); |
13928 } | 15395 } |
13929 else if ($notnull_bool(target.type.get$isNum() || target.type.get$isString()
)) { | 15396 else if ($notnull_bool(target.type.get$isNum() || target.type.get$isString()
)) { |
13930 return new Value(this.get$inferredResult(), ('' + target.code + ' ' + op +
' ' + argsCode.$index(0) + ''), node.span, true); | 15397 return new Value(this.get$inferredResult(), ('' + target.code + ' ' + op +
' ' + argsCode.$index(0) + ''), node.span, true); |
13931 } | 15398 } |
13932 world.gen.corejs.useOperator(this.name); | 15399 world.gen.corejs.useOperator(this.name); |
13933 return new Value(this.get$inferredResult(), ('' + this.name + '(' + target.c
ode + ', ' + argsCode.$index(0) + ')'), node.span, true); | 15400 return new Value(this.get$inferredResult(), ('' + this.name + '(' + target.c
ode + ', ' + argsCode.$index(0) + ')'), node.span, true); |
13934 } | 15401 } |
13935 if (this.name == '\$call') { | 15402 if ($notnull_bool(this.get$isCallMethod())) { |
13936 this.declaringType.markUsed(); | 15403 this.declaringType.markUsed(); |
13937 return new Value(this.get$inferredResult(), ('' + target.code + '(' + String
s.join((argsCode && argsCode.is$List$String()), ", ") + ')'), node.span, true); | 15404 return new Value(this.get$inferredResult(), ('' + target.code + '(' + String
s.join((argsCode && argsCode.is$List$String()), ", ") + ')'), node.span, true); |
13938 } | 15405 } |
13939 if (this.name == '\$index') { | 15406 if (this.name == '\$index') { |
13940 world.gen.corejs.useIndex = true; | 15407 world.gen.corejs.useIndex = true; |
13941 } | 15408 } |
13942 else if (this.name == '\$setindex') { | 15409 else if (this.name == '\$setindex') { |
13943 world.gen.corejs.useSetIndex = true; | 15410 world.gen.corejs.useSetIndex = true; |
13944 } | 15411 } |
13945 var argsString = Strings.join((argsCode && argsCode.is$List$String()), ', '); | 15412 var argsString = Strings.join((argsCode && argsCode.is$List$String()), ', '); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13984 this.isAbstract = true; | 15451 this.isAbstract = true; |
13985 } | 15452 } |
13986 else { | 15453 else { |
13987 world.error(('' + mod + ' modifier not allowed on method'), mod.get$span
()); | 15454 world.error(('' + mod + ' modifier not allowed on method'), mod.get$span
()); |
13988 } | 15455 } |
13989 } | 15456 } |
13990 } | 15457 } |
13991 if ($notnull_bool(this.isFactory)) { | 15458 if ($notnull_bool(this.isFactory)) { |
13992 this.isStatic = true; | 15459 this.isStatic = true; |
13993 } | 15460 } |
13994 if ($notnull_bool(this.name.startsWith('\$') && !this.name.startsWith('\$call'
) && this.isStatic)) { | 15461 if ($notnull_bool(this.get$isOperator() && this.isStatic) && !$notnull_bool(th
is.get$isCallMethod())) { |
13995 world.error(('operator method may not be static "' + this.name + '"'), this.
get$span()); | 15462 world.error(('operator method may not be static "' + this.name + '"'), this.
get$span()); |
13996 } | 15463 } |
13997 if ($notnull_bool(this.isAbstract)) { | 15464 if ($notnull_bool(this.isAbstract)) { |
13998 if (this.definition.body != null && !(this.declaringType.get$definition() in
stanceof FunctionTypeDefinition)) { | 15465 if (this.definition.body != null && !(this.declaringType.get$definition() in
stanceof FunctionTypeDefinition)) { |
13999 world.error('abstract method can not have a body', this.get$span()); | 15466 world.error('abstract method can not have a body', this.get$span()); |
14000 } | 15467 } |
14001 if ($notnull_bool(this.isStatic && !(this.declaringType.get$definition() ins
tanceof FunctionTypeDefinition))) { | 15468 if ($notnull_bool(this.isStatic && !(this.declaringType.get$definition() ins
tanceof FunctionTypeDefinition))) { |
14002 world.error('static method can not be abstract', this.get$span()); | 15469 world.error('static method can not be abstract', this.get$span()); |
14003 } | 15470 } |
14004 } | 15471 } |
14005 else { | 15472 else { |
14006 if (this.definition.body == null && !$notnull_bool(this.get$isConstructor())
) { | 15473 if (this.definition.body == null && !$notnull_bool(this.get$isConstructor())
) { |
14007 world.error('method needs a body', this.get$span()); | 15474 world.error('method needs a body', this.get$span()); |
14008 } | 15475 } |
14009 } | 15476 } |
14010 if ($notnull_bool(this.get$isConstructor())) { | 15477 if ($notnull_bool(this.get$isConstructor())) { |
14011 this.returnType = this.declaringType; | 15478 this.returnType = this.declaringType; |
14012 } | 15479 } |
14013 else { | 15480 else { |
14014 this.returnType = inType.resolveType(this.definition.returnType, false); | 15481 this.returnType = inType.resolveType(this.definition.returnType, false); |
14015 if ($notnull_bool(this.isStatic && this.returnType.get$hasTypeParams())) { | 15482 if ($notnull_bool(this.isStatic && this.returnType.get$hasTypeParams())) { |
14016 world.error('using type parameter in static context', this.definition.retu
rnType.span); | 15483 world.error('using type parameter in static context', this.definition.retu
rnType.span); |
14017 } | 15484 } |
14018 } | 15485 } |
14019 this.parameters = []; | 15486 this.parameters = []; |
14020 var $list = this.definition.formals; | 15487 var $list = this.definition.formals; |
14021 for (var $i = 0;$i < $list.length; $i++) { | 15488 for (var $i = 0;$i < $list.length; $i++) { |
14022 var formal = $list.$index($i); | 15489 var formal = $list.$index($i); |
14023 var param = new Parameter(formal); | 15490 var param = new Parameter(formal); |
14024 param.resolve(this, inType); | 15491 param.resolve$2(this, inType); |
14025 this.parameters.add(param); | 15492 this.parameters.add(param); |
14026 } | 15493 } |
14027 if (!$notnull_bool(this.isLambda)) { | 15494 if (!$notnull_bool(this.isLambda)) { |
14028 this.get$library()._addMember(this); | 15495 this.get$library()._addMember(this); |
14029 } | 15496 } |
14030 } | 15497 } |
14031 MethodMember.prototype._get$3 = function($0, $1, $2) { | 15498 MethodMember.prototype._get$3 = function($0, $1, $2) { |
14032 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); | 15499 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); |
14033 } | 15500 }; |
14034 ; | |
14035 MethodMember.prototype._set$4 = function($0, $1, $2, $3) { | 15501 MethodMember.prototype._set$4 = function($0, $1, $2, $3) { |
14036 return this._set(($0 && $0.is$MethodGenerator()), $1, ($2 && $2.is$Value()), (
$3 && $3.is$Value()), false); | 15502 return this._set(($0 && $0.is$MethodGenerator()), $1, ($2 && $2.is$Value()), (
$3 && $3.is$Value()), false); |
14037 } | 15503 }; |
14038 ; | 15504 MethodMember.prototype.canInvoke$2 = function($0, $1) { |
| 15505 return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments(
))); |
| 15506 }; |
14039 MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) { | 15507 MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
14040 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); | 15508 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
14041 } | 15509 }; |
14042 ; | 15510 MethodMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic)
{ |
| 15511 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
| 15512 }; |
| 15513 MethodMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
| 15514 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
| 15515 }; |
| 15516 MethodMember.prototype.namesInOrder$1 = function($0) { |
| 15517 return this.namesInOrder(($0 && $0.is$Arguments())); |
| 15518 }; |
| 15519 MethodMember.prototype.provideFieldSyntax$0 = function() { |
| 15520 return this.provideFieldSyntax(); |
| 15521 }; |
| 15522 MethodMember.prototype.providePropertySyntax$0 = function() { |
| 15523 return this.providePropertySyntax(); |
| 15524 }; |
| 15525 MethodMember.prototype.resolve$1 = function($0) { |
| 15526 return this.resolve(($0 && $0.is$lang_Type())); |
| 15527 }; |
14043 // ********** Code for MemberSet ************** | 15528 // ********** Code for MemberSet ************** |
14044 function MemberSet(member) { | 15529 function MemberSet(member, isVar) { |
14045 this.name = member.name; | 15530 this.name = member.name; |
14046 this.members = [member]; | 15531 this.members = [member]; |
14047 this.jsname = member.get$jsname(); | 15532 this.jsname = member.get$jsname(); |
| 15533 this.isVar = isVar; |
14048 // Initializers done | 15534 // Initializers done |
14049 } | 15535 } |
14050 MemberSet.prototype.is$MemberSet = function(){return this;}; | 15536 MemberSet.prototype.is$MemberSet = function(){return this;}; |
14051 MemberSet.prototype.get$name = function() { return this.name; }; | 15537 MemberSet.prototype.get$name = function() { return this.name; }; |
14052 MemberSet.prototype.get$members = function() { return this.members; }; | 15538 MemberSet.prototype.get$members = function() { return this.members; }; |
14053 MemberSet.prototype.get$jsname = function() { return this.jsname; }; | 15539 MemberSet.prototype.get$jsname = function() { return this.jsname; }; |
| 15540 MemberSet.prototype.get$isVar = function() { return this.isVar; }; |
14054 MemberSet.prototype.toString = function() { | 15541 MemberSet.prototype.toString = function() { |
14055 return ('' + this.name + ':' + this.members.length + ''); | 15542 return ('' + this.name + ':' + this.members.length + ''); |
14056 } | 15543 } |
14057 MemberSet.prototype.get$containsMethods = function() { | 15544 MemberSet.prototype.get$containsMethods = function() { |
14058 return this.members.some((function (m) { | 15545 return this.members.some((function (m) { |
14059 return (m instanceof MethodMember); | 15546 return (m instanceof MethodMember); |
14060 }) | 15547 }) |
14061 ); | 15548 ); |
14062 } | 15549 } |
14063 MemberSet.prototype.add = function(member) { | 15550 MemberSet.prototype.add = function(member) { |
14064 return this.members.add(member); | 15551 return this.members.add(member); |
14065 } | 15552 } |
14066 MemberSet.prototype.get$isStatic = function() { | 15553 MemberSet.prototype.get$isStatic = function() { |
14067 return $notnull_bool(this.members.length == 1 && this.members.$index(0).get$is
Static()); | 15554 return $notnull_bool(this.members.length == 1 && this.members.$index(0).get$is
Static()); |
14068 } | 15555 } |
| 15556 MemberSet.prototype.get$isOperator = function() { |
| 15557 return this.members.$index(0).get$isOperator(); |
| 15558 } |
14069 MemberSet.prototype.canInvoke = function(context, args) { | 15559 MemberSet.prototype.canInvoke = function(context, args) { |
14070 return this.members.some((function (m) { | 15560 return this.members.some((function (m) { |
14071 return m.canInvoke(context, args); | 15561 return m.canInvoke$2(context, args); |
14072 }) | 15562 }) |
14073 ); | 15563 ); |
14074 } | 15564 } |
14075 MemberSet.prototype._makeError = function(node, target, action) { | 15565 MemberSet.prototype._makeError = function(node, target, action) { |
14076 if (!$notnull_bool(target.type.get$isVar())) { | 15566 if (!$notnull_bool(target.type.get$isVar())) { |
14077 world.warning(('could not find applicable ' + action + ' for "' + this.name
+ '"'), node.span); | 15567 world.warning(('could not find applicable ' + action + ' for "' + this.name
+ '"'), node.span); |
14078 } | 15568 } |
14079 return new Value(world.varType, ('' + target.code + '.' + this.jsname + '() /*
no applicable ' + action + '*/'), node.span, true); | 15569 return new Value(world.varType, ('' + target.code + '.' + this.jsname + '() /*
no applicable ' + action + '*/'), node.span, true); |
14080 } | 15570 } |
14081 MemberSet.prototype.get$treatAsField = function() { | 15571 MemberSet.prototype.get$treatAsField = function() { |
14082 if (this._treatAsField == null) { | 15572 if (this._treatAsField == null) { |
14083 this._treatAsField = true; | 15573 this._treatAsField = true; |
14084 var $list = this.members; | 15574 var $list = this.members; |
14085 for (var $i = 0;$i < $list.length; $i++) { | 15575 for (var $i = 0;$i < $list.length; $i++) { |
14086 var member = $list.$index($i); | 15576 var member = $list.$index($i); |
14087 if ($notnull_bool(member.get$requiresFieldSyntax())) { | 15577 if ($notnull_bool(member.get$requiresFieldSyntax())) { |
14088 this._treatAsField = true; | 15578 this._treatAsField = true; |
14089 break; | 15579 break; |
14090 } | 15580 } |
14091 if ($notnull_bool(member.get$prefersPropertySyntax())) { | 15581 if ($notnull_bool(member.get$prefersPropertySyntax())) { |
14092 this._treatAsField = false; | 15582 this._treatAsField = false; |
14093 } | 15583 } |
14094 } | 15584 } |
14095 var $list = this.members; | 15585 var $list = this.members; |
14096 for (var $i = 0;$i < $list.length; $i++) { | 15586 for (var $i = 0;$i < $list.length; $i++) { |
14097 var member = $list.$index($i); | 15587 var member = $list.$index($i); |
14098 if ($notnull_bool(this._treatAsField)) { | 15588 if ($notnull_bool(this._treatAsField)) { |
14099 member.provideFieldSyntax(); | 15589 member.provideFieldSyntax$0(); |
14100 } | 15590 } |
14101 else { | 15591 else { |
14102 member.providePropertySyntax(); | 15592 member.providePropertySyntax$0(); |
14103 } | 15593 } |
14104 } | 15594 } |
14105 } | 15595 } |
14106 return this._treatAsField; | 15596 return this._treatAsField; |
14107 } | 15597 } |
14108 MemberSet.prototype._get = function(context, node, target, isDynamic) { | 15598 MemberSet.prototype._get = function(context, node, target, isDynamic) { |
14109 if (this.members.length == 1) { | 15599 if (this.members.length == 1) { |
14110 return this.members.$index(0)._get(context, node, target, isDynamic); | 15600 return this.members.$index(0)._get(context, node, target, isDynamic); |
14111 } | 15601 } |
14112 var targets = this.members.filter((function (m) { | 15602 var targets = this.members.filter((function (m) { |
14113 return m.get$canGet(); | 15603 return m.get$canGet(); |
14114 }) | 15604 }) |
14115 ); | 15605 ); |
14116 if (targets.length == 1) { | 15606 if (targets.length == 1) { |
14117 return targets.$index(0)._get(context, node, target, isDynamic); | 15607 return targets.$index(0)._get(context, node, target, isDynamic); |
14118 } | 15608 } |
14119 var returnValue = null; | 15609 var returnValue = null; |
14120 for (var $i = targets.iterator(); $i.hasNext(); ) { | 15610 for (var $i = targets.iterator$0(); $i.hasNext$0(); ) { |
14121 var member = $i.next(); | 15611 var member = $i.next$0(); |
14122 var value = member._get(context, node, target, true); | 15612 var value = member._get(context, node, target, true); |
14123 returnValue = this._tryUnion(returnValue, value, node); | 15613 returnValue = this._tryUnion(returnValue, value, node); |
14124 } | 15614 } |
14125 if (returnValue == null) { | 15615 if (returnValue == null) { |
14126 return this._makeError(node, target, 'getter'); | 15616 return this._makeError(node, target, 'getter'); |
14127 } | 15617 } |
14128 if (returnValue.code == null) { | 15618 if (returnValue.code == null) { |
14129 if ($notnull_bool(this.get$treatAsField())) { | 15619 if ($notnull_bool(this.get$treatAsField())) { |
14130 return new Value(returnValue.type, ('' + target.code + '.' + this.jsname +
''), node.span, true); | 15620 return new Value(returnValue.type, ('' + target.code + '.' + this.jsname +
''), node.span, true); |
14131 } | 15621 } |
14132 else { | 15622 else { |
14133 return new Value(returnValue.type, ('' + target.code + '.get\$' + this.jsn
ame + '()'), node.span, true); | 15623 return new Value(returnValue.type, ('' + target.code + '.get\$' + this.jsn
ame + '()'), node.span, true); |
14134 } | 15624 } |
14135 } | 15625 } |
14136 return returnValue; | 15626 return returnValue; |
14137 } | 15627 } |
14138 MemberSet.prototype._set = function(context, node, target, value, isDynamic) { | 15628 MemberSet.prototype._set = function(context, node, target, value, isDynamic) { |
14139 if (this.members.length == 1) { | 15629 if (this.members.length == 1) { |
14140 return this.members.$index(0)._set(context, node, target, value, isDynamic); | 15630 return this.members.$index(0)._set(context, node, target, value, isDynamic); |
14141 } | 15631 } |
14142 var targets = this.members.filter((function (m) { | 15632 var targets = this.members.filter((function (m) { |
14143 return m.get$canSet(); | 15633 return m.get$canSet(); |
14144 }) | 15634 }) |
14145 ); | 15635 ); |
14146 if (targets.length == 1) { | 15636 if (targets.length == 1) { |
14147 return targets.$index(0)._set(context, node, target, value, isDynamic); | 15637 return targets.$index(0)._set(context, node, target, value, isDynamic); |
14148 } | 15638 } |
14149 var returnValue = null; | 15639 var returnValue = null; |
14150 for (var $i = targets.iterator(); $i.hasNext(); ) { | 15640 for (var $i = targets.iterator$0(); $i.hasNext$0(); ) { |
14151 var member = $i.next(); | 15641 var member = $i.next$0(); |
14152 var res = member._set(context, node, target, value, true); | 15642 var res = member._set(context, node, target, value, true); |
14153 returnValue = this._tryUnion(returnValue, res, node); | 15643 returnValue = this._tryUnion(returnValue, res, node); |
14154 } | 15644 } |
14155 if (returnValue == null) { | 15645 if (returnValue == null) { |
14156 return this._makeError(node, target, 'setter'); | 15646 return this._makeError(node, target, 'setter'); |
14157 } | 15647 } |
14158 if (returnValue.code == null) { | 15648 if (returnValue.code == null) { |
14159 if ($notnull_bool(this.get$treatAsField())) { | 15649 if ($notnull_bool(this.get$treatAsField())) { |
14160 return new Value(returnValue.type, ('' + target.code + '.' + this.jsname +
' = ' + value.code + ''), node.span, true); | 15650 return new Value(returnValue.type, ('' + target.code + '.' + this.jsname +
' = ' + value.code + ''), node.span, true); |
14161 } | 15651 } |
14162 else { | 15652 else { |
14163 return new Value(returnValue.type, ('' + target.code + '.set\$' + this.jsn
ame + '(' + value.code + ')'), node.span, true); | 15653 return new Value(returnValue.type, ('' + target.code + '.set\$' + this.jsn
ame + '(' + value.code + ')'), node.span, true); |
14164 } | 15654 } |
14165 } | 15655 } |
14166 return returnValue; | 15656 return returnValue; |
14167 } | 15657 } |
14168 MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) { | 15658 MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) { |
| 15659 var $0; |
| 15660 if ($notnull_bool(this.isVar && !$notnull_bool(this.get$isOperator()))) { |
| 15661 return this.invokeOnVar(context, node, target, args); |
| 15662 } |
14169 if (this.members.length == 1) { | 15663 if (this.members.length == 1) { |
14170 return this.members.$index(0).invoke(context, node, target, args, isDynamic)
; | 15664 return this.members.$index(0).invoke$5(context, node, target, args, isDynami
c); |
14171 } | 15665 } |
14172 var targets = this.members.filter((function (m) { | 15666 var targets = this.members.filter((function (m) { |
14173 return m.canInvoke(context, args); | 15667 return m.canInvoke$2(context, args); |
14174 }) | 15668 }) |
14175 ); | 15669 ); |
14176 if (targets.length == 1) { | 15670 if (targets.length == 1) { |
14177 return targets.$index(0).invoke(context, node, target, args, isDynamic); | 15671 return (($0 = targets.$index(0).invoke$5(context, node, target, args, isDyna
mic)) && $0.is$Value()); |
14178 } | 15672 } |
14179 var returnValue = null; | 15673 var returnValue = null; |
14180 for (var $i = targets.iterator(); $i.hasNext(); ) { | 15674 for (var $i = targets.iterator$0(); $i.hasNext$0(); ) { |
14181 var member = $i.next(); | 15675 var member = $i.next$0(); |
14182 var res = member.invoke(context, node, target, args, true); | 15676 var res = member.invoke$4$isDynamic(context, node, target, args, true); |
14183 returnValue = this._tryUnion(returnValue, res, node); | 15677 returnValue = this._tryUnion(returnValue, res, node); |
14184 } | 15678 } |
14185 if (returnValue == null) { | 15679 if (returnValue == null) { |
14186 return this._makeError(node, target, 'method'); | 15680 return this._makeError(node, target, 'method'); |
14187 } | 15681 } |
14188 if (returnValue.code == null) { | 15682 if (returnValue.code == null) { |
14189 if (this.name.startsWith('\$')) { | 15683 if ($notnull_bool(this.get$isOperator())) { |
14190 return target.invokeSpecial(this.name, args, returnValue.type); | 15684 return target.invokeSpecial(this.name, args, returnValue.type); |
14191 } | 15685 } |
14192 else { | 15686 else { |
14193 return this.invokeOnVar(context, node, target, args); | 15687 return this.invokeOnVar(context, node, target, args); |
14194 } | 15688 } |
14195 } | 15689 } |
14196 return returnValue; | 15690 return returnValue; |
14197 } | 15691 } |
14198 MemberSet.prototype.invokeOnVar = function(context, node, target, args) { | 15692 MemberSet.prototype.invokeOnVar = function(context, node, target, args) { |
14199 return this.getVarMember(context, node, args).invoke(context, node, target, ar
gs); | 15693 var member = this.getVarMember(context, node, args); |
| 15694 return member.invoke$4(context, node, target, args); |
14200 } | 15695 } |
14201 MemberSet.prototype._tryUnion = function(x, y, node) { | 15696 MemberSet.prototype._tryUnion = function(x, y, node) { |
14202 if (x == null) return y; | 15697 if (x == null) return y; |
14203 var type = lang_Type.union(x.type, y.type); | 15698 var type = lang_Type.union(x.type, y.type); |
14204 if (x.code == y.code) { | 15699 if (x.code == y.code) { |
14205 if ($notnull_bool($eq(type, x.type))) { | 15700 if ($notnull_bool($eq(type, x.type))) { |
14206 return x; | 15701 return x; |
14207 } | 15702 } |
14208 else if ($notnull_bool(x.get$isConst() || y.get$isConst())) { | 15703 else if ($notnull_bool(x.get$isConst() || y.get$isConst())) { |
14209 world.internalError("unexpected: union of const values "); | 15704 world.internalError("unexpected: union of const values "); |
(...skipping 12 matching lines...) Expand all Loading... |
14222 } | 15717 } |
14223 MemberSet.prototype.getVarMember = function(context, node, args) { | 15718 MemberSet.prototype.getVarMember = function(context, node, args) { |
14224 if (world.objectType.varStubs == null) { | 15719 if (world.objectType.varStubs == null) { |
14225 world.objectType.varStubs = $map([]); | 15720 world.objectType.varStubs = $map([]); |
14226 } | 15721 } |
14227 var stubName = _getCallStubName(this.name, args); | 15722 var stubName = _getCallStubName(this.name, args); |
14228 var stub = world.objectType.varStubs.$index(stubName); | 15723 var stub = world.objectType.varStubs.$index(stubName); |
14229 if ($notnull_bool(stub == null)) { | 15724 if ($notnull_bool(stub == null)) { |
14230 var mset = context.findMembers(this.name).members; | 15725 var mset = context.findMembers(this.name).members; |
14231 var targets = mset.filter((function (m) { | 15726 var targets = mset.filter((function (m) { |
14232 return m.canInvoke(context, args); | 15727 return m.canInvoke$2(context, args); |
14233 }) | 15728 }) |
14234 ); | 15729 ); |
14235 var returnType = reduce(map((targets && targets.is$Iterable()), (function (t
) { | 15730 var returnType = reduce(map((targets && targets.is$Iterable()), (function (t
) { |
14236 return t.get$returnType(); | 15731 return t.get$returnType(); |
14237 }) | 15732 }) |
14238 ), lang_Type.union); | 15733 ), lang_Type.union); |
14239 stub = new VarMethodSet($assert_String(stubName), targets, args, returnType)
; | 15734 stub = new VarMethodSet($assert_String(stubName), targets, args, returnType)
; |
14240 world.objectType.varStubs.$setindex(stubName, stub); | 15735 world.objectType.varStubs.$setindex(stubName, stub); |
14241 } | 15736 } |
14242 return (stub && stub.is$VarMember()); | 15737 return (stub && stub.is$VarMember()); |
14243 } | 15738 } |
14244 MemberSet.prototype._get$3 = function($0, $1, $2) { | 15739 MemberSet.prototype._get$3 = function($0, $1, $2) { |
14245 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); | 15740 return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), false); |
14246 } | 15741 }; |
14247 ; | |
14248 MemberSet.prototype._set$4 = function($0, $1, $2, $3) { | 15742 MemberSet.prototype._set$4 = function($0, $1, $2, $3) { |
14249 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); | 15743 return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), (
$2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
14250 } | 15744 }; |
14251 ; | 15745 MemberSet.prototype.add$1 = function($0) { |
| 15746 return this.add(($0 && $0.is$Member())); |
| 15747 }; |
| 15748 MemberSet.prototype.canInvoke$2 = function($0, $1) { |
| 15749 return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments(
))); |
| 15750 }; |
14252 MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) { | 15751 MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) { |
14253 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); | 15752 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
14254 } | 15753 }; |
14255 ; | 15754 MemberSet.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
| 15755 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
| 15756 }; |
| 15757 MemberSet.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
| 15758 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
| 15759 }; |
| 15760 MemberSet.prototype.toString$0 = function() { |
| 15761 return this.toString(); |
| 15762 }; |
14256 // ********** Code for FactoryMap ************** | 15763 // ********** Code for FactoryMap ************** |
14257 function FactoryMap() { | 15764 function FactoryMap() { |
14258 this.factories = $map([]); | 15765 this.factories = $map([]); |
14259 // Initializers done | 15766 // Initializers done |
14260 } | 15767 } |
14261 FactoryMap.prototype.getFactoriesFor = function(typeName) { | 15768 FactoryMap.prototype.getFactoriesFor = function(typeName) { |
14262 var ret = this.factories.$index(typeName); | 15769 var ret = this.factories.$index(typeName); |
14263 if ($notnull_bool(ret == null)) { | 15770 if ($notnull_bool(ret == null)) { |
14264 ret = $map([]); | 15771 ret = $map([]); |
14265 this.factories.$setindex(typeName, ret); | 15772 this.factories.$setindex(typeName, ret); |
(...skipping 25 matching lines...) Expand all Loading... |
14291 // Initializers done | 15798 // Initializers done |
14292 } | 15799 } |
14293 lang_Token.prototype.get$text = function() { | 15800 lang_Token.prototype.get$text = function() { |
14294 return this.source.get$text().substring(this.start, this.end); | 15801 return this.source.get$text().substring(this.start, this.end); |
14295 } | 15802 } |
14296 lang_Token.prototype.toString = function() { | 15803 lang_Token.prototype.toString = function() { |
14297 var kindText = TokenKind.kindToString(this.kind); | 15804 var kindText = TokenKind.kindToString(this.kind); |
14298 var actualText = this.get$text(); | 15805 var actualText = this.get$text(); |
14299 if ($notnull_bool($ne(kindText, actualText))) { | 15806 if ($notnull_bool($ne(kindText, actualText))) { |
14300 if (actualText.length > 10) { | 15807 if (actualText.length > 10) { |
14301 actualText = actualText.substring(0, 8) + '...'; | 15808 actualText = actualText.substring$2(0, 8) + '...'; |
14302 } | 15809 } |
14303 return ('' + kindText + '(' + actualText + ')'); | 15810 return ('' + kindText + '(' + actualText + ')'); |
14304 } | 15811 } |
14305 else { | 15812 else { |
14306 return $assert_String(kindText); | 15813 return $assert_String(kindText); |
14307 } | 15814 } |
14308 } | 15815 } |
14309 lang_Token.prototype.get$span = function() { | 15816 lang_Token.prototype.get$span = function() { |
14310 return new SourceSpan(this.source, this.start, this.end); | 15817 return new SourceSpan(this.source, this.start, this.end); |
14311 } | 15818 } |
| 15819 lang_Token.prototype.toString$0 = function() { |
| 15820 return this.toString(); |
| 15821 }; |
14312 // ********** Code for SourceFile ************** | 15822 // ********** Code for SourceFile ************** |
14313 function SourceFile(filename, _text) { | 15823 function SourceFile(filename, _text) { |
14314 this.filename = filename; | 15824 this.filename = filename; |
14315 this._text = _text; | 15825 this._text = _text; |
14316 // Initializers done | 15826 // Initializers done |
14317 } | 15827 } |
14318 SourceFile.prototype.is$SourceFile = function(){return this;}; | 15828 SourceFile.prototype.is$SourceFile = function(){return this;}; |
| 15829 SourceFile.prototype.is$Comparable = function(){return this;}; |
14319 SourceFile.prototype.get$text = function() { | 15830 SourceFile.prototype.get$text = function() { |
14320 return this._text; | 15831 return this._text; |
14321 } | 15832 } |
14322 SourceFile.prototype.get$lineStarts = function() { | 15833 SourceFile.prototype.get$lineStarts = function() { |
14323 if (this._lineStarts == null) { | 15834 if (this._lineStarts == null) { |
14324 var starts = [0]; | 15835 var starts = [0]; |
14325 var index = 0; | 15836 var index = 0; |
14326 while (index < this.get$text().length) { | 15837 while (index < this.get$text().length) { |
14327 index = this.get$text().indexOf('\n', index) + 1; | 15838 index = this.get$text().indexOf('\n', index) + 1; |
14328 if (index <= 0) break; | 15839 if (index <= 0) break; |
14329 starts.add(index); | 15840 starts.add$1(index); |
14330 } | 15841 } |
14331 starts.add(this.get$text().length + 1); | 15842 starts.add$1(this.get$text().length + 1); |
14332 this._lineStarts = (starts && starts.is$List$int()); | 15843 this._lineStarts = (starts && starts.is$List$int()); |
14333 } | 15844 } |
14334 return this._lineStarts; | 15845 return this._lineStarts; |
14335 } | 15846 } |
14336 SourceFile.prototype.getLine = function(position) { | 15847 SourceFile.prototype.getLine = function(position) { |
14337 var starts = this.get$lineStarts(); | 15848 var starts = this.get$lineStarts(); |
14338 for (var i = 0; | 15849 for (var i = 0; |
14339 i < starts.length; i++) { | 15850 i < starts.length; i++) { |
14340 if (starts.$index(i) > position) return i - 1; | 15851 if (starts.$index(i) > position) return i - 1; |
14341 } | 15852 } |
14342 world.internalError('bad position'); | 15853 world.internalError('bad position'); |
14343 } | 15854 } |
14344 SourceFile.prototype.getColumn = function(line, position) { | 15855 SourceFile.prototype.getColumn = function(line, position) { |
14345 return position - $assert_num(this.get$lineStarts().$index(line)); | 15856 return position - $assert_num(this.get$lineStarts().$index(line)); |
14346 } | 15857 } |
14347 SourceFile.prototype.getLocationMessage = function(message, start, end, includeT
ext) { | 15858 SourceFile.prototype.getLocationMessage = function(message, start, end, includeT
ext) { |
14348 var line = this.getLine(start); | 15859 var line = this.getLine(start); |
14349 var column = this.getColumn($assert_num(line), start); | 15860 var column = this.getColumn($assert_num(line), start); |
14350 var buf = new StringBufferImpl(('' + this.filename + ':' + (line + 1) + ':' +
(column + 1) + ': ' + message + '')); | 15861 var buf = new StringBufferImpl(('' + this.filename + ':' + (line + 1) + ':' +
(column + 1) + ': ' + message + '')); |
14351 if ($notnull_bool(includeText)) { | 15862 if ($notnull_bool(includeText)) { |
14352 buf.add('\n'); | 15863 buf.add$1('\n'); |
14353 var textLine; | 15864 var textLine; |
14354 if ((line + 2) < this._lineStarts.length) { | 15865 if ((line + 2) < this._lineStarts.length) { |
14355 textLine = this.get$text().substring(this._lineStarts.$index(line), this._
lineStarts.$index(line + 1)); | 15866 textLine = this.get$text().substring(this._lineStarts.$index(line), this._
lineStarts.$index(line + 1)); |
14356 } | 15867 } |
14357 else { | 15868 else { |
14358 textLine = this.get$text().substring(this._lineStarts.$index(line)) + '\n'
; | 15869 textLine = this.get$text().substring(this._lineStarts.$index(line)) + '\n'
; |
14359 } | 15870 } |
14360 buf.add(textLine); | 15871 buf.add$1(textLine); |
14361 var i = 0; | 15872 var i = 0; |
14362 for (; i < $assert_num(column); i++) { | 15873 for (; i < $assert_num(column); i++) { |
14363 buf.add(' '); | 15874 buf.add$1(' '); |
14364 } | 15875 } |
14365 var toColumn = Math.min($assert_num(column + (end - start)), textLine.length
); | 15876 var toColumn = Math.min($assert_num(column + (end - start)), textLine.length
); |
14366 for (; i < toColumn; i++) { | 15877 for (; i < toColumn; i++) { |
14367 buf.add('^'); | 15878 buf.add$1('^'); |
14368 } | 15879 } |
14369 } | 15880 } |
14370 return $assert_String(buf.toString()); | 15881 return buf.toString$0(); |
14371 } | 15882 } |
14372 SourceFile.prototype.compareTo = function(other) { | 15883 SourceFile.prototype.compareTo = function(other) { |
14373 if (this.orderInLibrary != null && other.orderInLibrary != null) { | 15884 if (this.orderInLibrary != null && other.orderInLibrary != null) { |
14374 return this.orderInLibrary - other.orderInLibrary; | 15885 return this.orderInLibrary - other.orderInLibrary; |
14375 } | 15886 } |
14376 else { | 15887 else { |
14377 return this.filename.compareTo(other.filename); | 15888 return this.filename.compareTo(other.filename); |
14378 } | 15889 } |
14379 } | 15890 } |
| 15891 SourceFile.prototype.compareTo$1 = function($0) { |
| 15892 return this.compareTo(($0 && $0.is$SourceFile())); |
| 15893 }; |
14380 // ********** Code for SourceSpan ************** | 15894 // ********** Code for SourceSpan ************** |
14381 function SourceSpan(file, start, end) { | 15895 function SourceSpan(file, start, end) { |
14382 this.file = file; | 15896 this.file = file; |
14383 this.start = start; | 15897 this.start = start; |
14384 this.end = end; | 15898 this.end = end; |
14385 // Initializers done | 15899 // Initializers done |
14386 } | 15900 } |
14387 SourceSpan.prototype.is$SourceSpan = function(){return this;}; | 15901 SourceSpan.prototype.is$SourceSpan = function(){return this;}; |
| 15902 SourceSpan.prototype.is$Comparable = function(){return this;}; |
14388 SourceSpan.prototype.get$text = function() { | 15903 SourceSpan.prototype.get$text = function() { |
14389 return this.file.get$text().substring(this.start, this.end); | 15904 return this.file.get$text().substring(this.start, this.end); |
14390 } | 15905 } |
14391 SourceSpan.prototype.toMessageString = function(message) { | 15906 SourceSpan.prototype.toMessageString = function(message) { |
14392 return this.file.getLocationMessage(message, this.start, this.end, true); | 15907 return this.file.getLocationMessage(message, this.start, this.end, true); |
14393 } | 15908 } |
14394 SourceSpan.prototype.get$locationText = function() { | 15909 SourceSpan.prototype.get$locationText = function() { |
14395 var line = this.file.getLine(this.start); | 15910 var line = this.file.getLine(this.start); |
14396 var column = this.file.getColumn($assert_num(line), this.start); | 15911 var column = this.file.getColumn($assert_num(line), this.start); |
14397 return ('' + this.file.filename + ':' + (line + 1) + ':' + (column + 1) + ''); | 15912 return ('' + this.file.filename + ':' + (line + 1) + ':' + (column + 1) + ''); |
14398 } | 15913 } |
14399 SourceSpan.prototype.compareTo = function(other) { | 15914 SourceSpan.prototype.compareTo = function(other) { |
14400 if ($eq(this.file, other.file)) { | 15915 if ($eq(this.file, other.file)) { |
14401 var d = this.start - other.start; | 15916 var d = this.start - other.start; |
14402 return d == 0 ? (this.end - other.end) : d; | 15917 return d == 0 ? (this.end - other.end) : d; |
14403 } | 15918 } |
14404 return this.file.compareTo(other.file); | 15919 return this.file.compareTo(other.file); |
14405 } | 15920 } |
| 15921 SourceSpan.prototype.compareTo$1 = function($0) { |
| 15922 return this.compareTo(($0 && $0.is$SourceSpan())); |
| 15923 }; |
14406 // ********** Code for InterpStack ************** | 15924 // ********** Code for InterpStack ************** |
14407 function InterpStack(previous, quote, isMultiline) { | 15925 function InterpStack(previous, quote, isMultiline) { |
14408 this.previous = previous; | 15926 this.previous = previous; |
14409 this.quote = quote; | 15927 this.quote = quote; |
14410 this.isMultiline = isMultiline; | 15928 this.isMultiline = isMultiline; |
14411 this.depth = -1; | 15929 this.depth = -1; |
14412 // Initializers done | 15930 // Initializers done |
14413 } | 15931 } |
14414 InterpStack.prototype.is$InterpStack = function(){return this;}; | 15932 InterpStack.prototype.is$InterpStack = function(){return this;}; |
14415 InterpStack.prototype.pop = function() { | 15933 InterpStack.prototype.pop = function() { |
14416 return this.previous; | 15934 return this.previous; |
14417 } | 15935 } |
14418 InterpStack.push = function(stack, quote, isMultiline) { | 15936 InterpStack.push = function(stack, quote, isMultiline) { |
14419 var newStack = new InterpStack(stack, quote, isMultiline); | 15937 var newStack = new InterpStack(stack, quote, isMultiline); |
14420 if (stack != null) newStack.previous = stack; | 15938 if (stack != null) newStack.previous = stack; |
14421 return (newStack && newStack.is$InterpStack()); | 15939 return (newStack && newStack.is$InterpStack()); |
14422 } | 15940 } |
| 15941 InterpStack.prototype.next$0 = function() { |
| 15942 return this.next(); |
| 15943 }; |
14423 // ********** Code for TokenizerBase ************** | 15944 // ********** Code for TokenizerBase ************** |
14424 function TokenizerBase(_source, _skipWhitespace, _index) { | 15945 function TokenizerBase(_source, _skipWhitespace, _index) { |
14425 this._source = _source; | 15946 this._source = _source; |
14426 this._skipWhitespace = _skipWhitespace; | 15947 this._skipWhitespace = _skipWhitespace; |
14427 this._lang_index = _index; | 15948 this._lang_index = _index; |
14428 // Initializers done | 15949 // Initializers done |
14429 this._text = this._source.get$text(); | 15950 this._text = this._source.get$text(); |
14430 } | 15951 } |
14431 $inherits(TokenizerBase, TokenizerHelpers); | 15952 $inherits(TokenizerBase, TokenizerHelpers); |
14432 TokenizerBase.prototype._nextChar = function() { | 15953 TokenizerBase.prototype._nextChar = function() { |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14744 if (this._interpStack != null && this._interpStack.depth == -1) { | 16265 if (this._interpStack != null && this._interpStack.depth == -1) { |
14745 this._interpStack.depth = 0; | 16266 this._interpStack.depth = 0; |
14746 } | 16267 } |
14747 if (kind == 70/*TokenKind.IDENTIFIER*/) { | 16268 if (kind == 70/*TokenKind.IDENTIFIER*/) { |
14748 return this._finishToken(70/*TokenKind.IDENTIFIER*/); | 16269 return this._finishToken(70/*TokenKind.IDENTIFIER*/); |
14749 } | 16270 } |
14750 else { | 16271 else { |
14751 return this._finishToken(kind); | 16272 return this._finishToken(kind); |
14752 } | 16273 } |
14753 } | 16274 } |
| 16275 TokenizerBase.prototype.next$0 = function() { |
| 16276 return this.next(); |
| 16277 }; |
14754 // ********** Code for Tokenizer ************** | 16278 // ********** Code for Tokenizer ************** |
14755 function Tokenizer(source, skipWhitespace, index) { | 16279 function Tokenizer(source, skipWhitespace, index) { |
14756 TokenizerBase.call(this, source, skipWhitespace, index); | 16280 TokenizerBase.call(this, source, skipWhitespace, index); |
14757 // Initializers done | 16281 // Initializers done |
14758 } | 16282 } |
14759 $inherits(Tokenizer, TokenizerBase); | 16283 $inherits(Tokenizer, TokenizerBase); |
14760 Tokenizer.prototype.next = function() { | 16284 Tokenizer.prototype.next = function() { |
14761 this._startIndex = this._lang_index; | 16285 this._startIndex = this._lang_index; |
14762 if (this._interpStack != null && this._interpStack.depth == 0) { | 16286 if (this._interpStack != null && this._interpStack.depth == 0) { |
14763 var istack = this._interpStack; | 16287 var istack = this._interpStack; |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15271 | 16795 |
15272 if (this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 1
09 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 1
08 && this._text.charCodeAt(i0 + 4) == 101 && this._text.charCodeAt(i0 + 5) == 1
09 && this._text.charCodeAt(i0 + 6) == 101 && this._text.charCodeAt(i0 + 7) == 1
10 && this._text.charCodeAt(i0 + 8) == 116 && this._text.charCodeAt(i0 + 9) == 1
15) return 77/*TokenKind.IMPLEMENTS*/; | 16796 if (this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 1
09 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 1
08 && this._text.charCodeAt(i0 + 4) == 101 && this._text.charCodeAt(i0 + 5) == 1
09 && this._text.charCodeAt(i0 + 6) == 101 && this._text.charCodeAt(i0 + 7) == 1
10 && this._text.charCodeAt(i0 + 8) == 116 && this._text.charCodeAt(i0 + 9) == 1
15) return 77/*TokenKind.IMPLEMENTS*/; |
15273 return 70/*TokenKind.IDENTIFIER*/; | 16797 return 70/*TokenKind.IDENTIFIER*/; |
15274 | 16798 |
15275 default: | 16799 default: |
15276 | 16800 |
15277 return 70/*TokenKind.IDENTIFIER*/; | 16801 return 70/*TokenKind.IDENTIFIER*/; |
15278 | 16802 |
15279 } | 16803 } |
15280 } | 16804 } |
| 16805 Tokenizer.prototype.next$0 = function() { |
| 16806 return this.next(); |
| 16807 }; |
15281 // ********** Code for TokenizerHelpers ************** | 16808 // ********** Code for TokenizerHelpers ************** |
15282 function TokenizerHelpers() {} | 16809 function TokenizerHelpers() {} |
15283 TokenizerHelpers.isIdentifierStart = function(c) { | 16810 TokenizerHelpers.isIdentifierStart = function(c) { |
15284 return ((c >= 97 && c <= 122) || (c >= 65 && c <= 90) || c == 95); | 16811 return ((c >= 97 && c <= 122) || (c >= 65 && c <= 90) || c == 95); |
15285 } | 16812 } |
15286 TokenizerHelpers.isDigit = function(c) { | 16813 TokenizerHelpers.isDigit = function(c) { |
15287 return (c >= 48 && c <= 57); | 16814 return (c >= 48 && c <= 57); |
15288 } | 16815 } |
15289 TokenizerHelpers.isHexDigit = function(c) { | 16816 TokenizerHelpers.isHexDigit = function(c) { |
15290 return ($notnull_bool(TokenizerHelpers.isDigit(c) || (c >= 97 && c <= 102)) ||
(c >= 65 && c <= 70)); | 16817 return ($notnull_bool(TokenizerHelpers.isDigit(c) || (c >= 97 && c <= 102)) ||
(c >= 65 && c <= 70)); |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16186 } | 17713 } |
16187 } | 17714 } |
16188 } | 17715 } |
16189 lang_Parser.prototype._makeSpan = function(start) { | 17716 lang_Parser.prototype._makeSpan = function(start) { |
16190 return new SourceSpan(this.source, start, this._previousToken.end); | 17717 return new SourceSpan(this.source, start, this._previousToken.end); |
16191 } | 17718 } |
16192 lang_Parser.prototype.compilationUnit = function() { | 17719 lang_Parser.prototype.compilationUnit = function() { |
16193 var ret = []; | 17720 var ret = []; |
16194 this._maybeEat(13/*TokenKind.HASHBANG*/); | 17721 this._maybeEat(13/*TokenKind.HASHBANG*/); |
16195 while ($notnull_bool(this._peekKind(12/*TokenKind.HASH*/))) { | 17722 while ($notnull_bool(this._peekKind(12/*TokenKind.HASH*/))) { |
16196 ret.add(this.directive()); | 17723 ret.add$1(this.directive()); |
16197 } | 17724 } |
16198 while (!$notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/))) { | 17725 while (!$notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/))) { |
16199 ret.add(this.topLevelDefinition()); | 17726 ret.add$1(this.topLevelDefinition()); |
16200 } | 17727 } |
16201 return (ret && ret.is$List$Definition()); | 17728 return (ret && ret.is$List$Definition()); |
16202 } | 17729 } |
16203 lang_Parser.prototype.directive = function() { | 17730 lang_Parser.prototype.directive = function() { |
16204 var start = this._peekToken.start; | 17731 var start = this._peekToken.start; |
16205 this._eat(12/*TokenKind.HASH*/); | 17732 this._eat(12/*TokenKind.HASH*/); |
16206 var name = this.identifier(); | 17733 var name = this.identifier(); |
16207 var args = this.arguments(); | 17734 var args = this.arguments(); |
16208 this._eatSemicolon(); | 17735 this._eatSemicolon(); |
16209 return new DirectiveDefinition(name, args, this._makeSpan(start)); | 17736 return new DirectiveDefinition(name, args, this._makeSpan(start)); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16249 _native = this.maybeStringLiteral(); | 17776 _native = this.maybeStringLiteral(); |
16250 } | 17777 } |
16251 var _factory = null; | 17778 var _factory = null; |
16252 if ($notnull_bool(this._maybeEat(75/*TokenKind.FACTORY*/))) { | 17779 if ($notnull_bool(this._maybeEat(75/*TokenKind.FACTORY*/))) { |
16253 _factory = this.type(0); | 17780 _factory = this.type(0); |
16254 } | 17781 } |
16255 var body = []; | 17782 var body = []; |
16256 if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) { | 17783 if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) { |
16257 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { | 17784 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
16258 if ($notnull_bool(this.isPrematureEndOfFile())) break; | 17785 if ($notnull_bool(this.isPrematureEndOfFile())) break; |
16259 body.add(this.declaration(true)); | 17786 body.add$1(this.declaration(true)); |
16260 } | 17787 } |
16261 } | 17788 } |
16262 else { | 17789 else { |
16263 this._errorExpected('block starting with "{" or ";"'); | 17790 this._errorExpected('block starting with "{" or ";"'); |
16264 } | 17791 } |
16265 return new TypeDefinition(kind == 73/*TokenKind.CLASS*/, name, typeParams, _ex
tends, _implements, _native, _factory, body, this._makeSpan(start)); | 17792 return new TypeDefinition(kind == 73/*TokenKind.CLASS*/, name, typeParams, _ex
tends, _implements, _native, _factory, body, this._makeSpan(start)); |
16266 } | 17793 } |
16267 lang_Parser.prototype.functionTypeAlias = function() { | 17794 lang_Parser.prototype.functionTypeAlias = function() { |
16268 var start = this._peekToken.start; | 17795 var start = this._peekToken.start; |
16269 this._eat(87/*TokenKind.TYPEDEF*/); | 17796 this._eat(87/*TokenKind.TYPEDEF*/); |
16270 var di = this.declaredIdentifier(false); | 17797 var di = this.declaredIdentifier(false); |
16271 var typeParams = null; | 17798 var typeParams = null; |
16272 if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { | 17799 if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
16273 typeParams = this.typeParameters(); | 17800 typeParams = this.typeParameters(); |
16274 } | 17801 } |
16275 var formals = this.formalParameterList(); | 17802 var formals = this.formalParameterList(); |
16276 this._eatSemicolon(); | 17803 this._eatSemicolon(); |
16277 var func = new FunctionDefinition(null, di.type, di.get$name(), formals, null,
null, this._makeSpan(start)); | 17804 var func = new FunctionDefinition(null, di.type, di.get$name(), formals, null,
null, this._makeSpan(start)); |
16278 return new FunctionTypeDefinition(func, typeParams, this._makeSpan(start)); | 17805 return new FunctionTypeDefinition(func, typeParams, this._makeSpan(start)); |
16279 } | 17806 } |
16280 lang_Parser.prototype.initializers = function() { | 17807 lang_Parser.prototype.initializers = function() { |
16281 this._inInitializers = true; | 17808 this._inInitializers = true; |
16282 var ret = []; | 17809 var ret = []; |
16283 do { | 17810 do { |
16284 ret.add(this.expression()); | 17811 ret.add$1(this.expression()); |
16285 } | 17812 } |
16286 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) | 17813 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
16287 this._inInitializers = false; | 17814 this._inInitializers = false; |
16288 return ret; | 17815 return ret; |
16289 } | 17816 } |
16290 lang_Parser.prototype.functionBody = function(inExpression) { | 17817 lang_Parser.prototype.functionBody = function(inExpression) { |
16291 var start = this._peekToken.start; | 17818 var start = this._peekToken.start; |
16292 if ($notnull_bool(this._maybeEat(9/*TokenKind.ARROW*/))) { | 17819 if ($notnull_bool(this._maybeEat(9/*TokenKind.ARROW*/))) { |
16293 var expr = this.expression(); | 17820 var expr = this.expression(); |
16294 if (!$notnull_bool(inExpression)) { | 17821 if (!$notnull_bool(inExpression)) { |
(...skipping 24 matching lines...) Expand all Loading... |
16319 return this.functionBody(inExpression); | 17846 return this.functionBody(inExpression); |
16320 } | 17847 } |
16321 } | 17848 } |
16322 } | 17849 } |
16323 this._lang_error('Expected function body (neither { nor => found)'); | 17850 this._lang_error('Expected function body (neither { nor => found)'); |
16324 } | 17851 } |
16325 lang_Parser.prototype.finishField = function(start, modifiers, type, name, value
) { | 17852 lang_Parser.prototype.finishField = function(start, modifiers, type, name, value
) { |
16326 var names = [name]; | 17853 var names = [name]; |
16327 var values = [value]; | 17854 var values = [value]; |
16328 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { | 17855 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
16329 names.add(this.identifier()); | 17856 names.add$1(this.identifier()); |
16330 if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { | 17857 if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { |
16331 values.add(this.expression()); | 17858 values.add$1(this.expression()); |
16332 } | 17859 } |
16333 else { | 17860 else { |
16334 values.add(null); | 17861 values.add$1(); |
16335 } | 17862 } |
16336 } | 17863 } |
16337 this._eatSemicolon(); | 17864 this._eatSemicolon(); |
16338 return new VariableDefinition(modifiers, type, names, values, this._makeSpan($
assert_num(start))); | 17865 return new VariableDefinition(modifiers, type, names, values, this._makeSpan($
assert_num(start))); |
16339 } | 17866 } |
16340 lang_Parser.prototype.finishDefinition = function(start, modifiers, di) { | 17867 lang_Parser.prototype.finishDefinition = function(start, modifiers, di) { |
16341 switch (this._peek()) { | 17868 switch (this._peek()) { |
16342 case 2/*TokenKind.LPAREN*/: | 17869 case 2/*TokenKind.LPAREN*/: |
16343 | 17870 |
16344 var formals = this.formalParameterList(); | 17871 var formals = this.formalParameterList(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16376 return this.factoryConstructorDeclaration(); | 17903 return this.factoryConstructorDeclaration(); |
16377 } | 17904 } |
16378 var modifiers = this._readModifiers(); | 17905 var modifiers = this._readModifiers(); |
16379 return this.finishDefinition(start, modifiers, this.declaredIdentifier(include
Operators)); | 17906 return this.finishDefinition(start, modifiers, this.declaredIdentifier(include
Operators)); |
16380 } | 17907 } |
16381 lang_Parser.prototype.factoryConstructorDeclaration = function() { | 17908 lang_Parser.prototype.factoryConstructorDeclaration = function() { |
16382 var start = this._peekToken.start; | 17909 var start = this._peekToken.start; |
16383 var factoryToken = this._lang_next(); | 17910 var factoryToken = this._lang_next(); |
16384 var names = [this.identifier()]; | 17911 var names = [this.identifier()]; |
16385 while ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { | 17912 while ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
16386 names.add(this.identifier()); | 17913 names.add$1(this.identifier()); |
16387 } | 17914 } |
16388 var typeParams = null; | 17915 var typeParams = null; |
16389 if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { | 17916 if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
16390 typeParams = this.typeParameters(); | 17917 typeParams = this.typeParameters(); |
16391 } | 17918 } |
16392 var name = null; | 17919 var name = null; |
16393 var type = null; | 17920 var type = null; |
16394 if ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { | 17921 if ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
16395 name = this.identifier(); | 17922 name = this.identifier(); |
16396 } | 17923 } |
16397 else if ($notnull_bool(typeParams == null)) { | 17924 else if ($notnull_bool(typeParams == null)) { |
16398 if (names.length > 1) { | 17925 if (names.length > 1) { |
16399 name = names.removeLast(); | 17926 name = names.removeLast$0(); |
16400 } | 17927 } |
16401 else { | 17928 else { |
16402 name = new lang_Identifier('', names.$index(0).get$span()); | 17929 name = new lang_Identifier('', names.$index(0).get$span()); |
16403 } | 17930 } |
16404 } | 17931 } |
16405 else { | 17932 else { |
16406 name = new lang_Identifier('', names.$index(0).get$span()); | 17933 name = new lang_Identifier('', names.$index(0).get$span()); |
16407 } | 17934 } |
16408 if (names.length > 1) { | 17935 if (names.length > 1) { |
16409 this._lang_error('unsupported qualified name for factory', names.$index(0).g
et$span()); | 17936 this._lang_error('unsupported qualified name for factory', names.$index(0).g
et$span()); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16527 var ret = this.expression(); | 18054 var ret = this.expression(); |
16528 this._eat(3/*TokenKind.RPAREN*/); | 18055 this._eat(3/*TokenKind.RPAREN*/); |
16529 return (ret && ret.is$lang_Expression()); | 18056 return (ret && ret.is$lang_Expression()); |
16530 } | 18057 } |
16531 lang_Parser.prototype.block = function() { | 18058 lang_Parser.prototype.block = function() { |
16532 var start = this._peekToken.start; | 18059 var start = this._peekToken.start; |
16533 this._eat(6/*TokenKind.LBRACE*/); | 18060 this._eat(6/*TokenKind.LBRACE*/); |
16534 var stmts = []; | 18061 var stmts = []; |
16535 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { | 18062 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
16536 if ($notnull_bool(this.isPrematureEndOfFile())) break; | 18063 if ($notnull_bool(this.isPrematureEndOfFile())) break; |
16537 stmts.add(this.statement()); | 18064 stmts.add$1(this.statement()); |
16538 } | 18065 } |
16539 return new BlockStatement(stmts, this._makeSpan(start)); | 18066 return new BlockStatement(stmts, this._makeSpan(start)); |
16540 } | 18067 } |
16541 lang_Parser.prototype.emptyStatement = function() { | 18068 lang_Parser.prototype.emptyStatement = function() { |
16542 var start = this._peekToken.start; | 18069 var start = this._peekToken.start; |
16543 this._eat(10/*TokenKind.SEMICOLON*/); | 18070 this._eat(10/*TokenKind.SEMICOLON*/); |
16544 return new EmptyStatement(this._makeSpan(start)); | 18071 return new EmptyStatement(this._makeSpan(start)); |
16545 } | 18072 } |
16546 lang_Parser.prototype.ifStatement = function() { | 18073 lang_Parser.prototype.ifStatement = function() { |
16547 var start = this._peekToken.start; | 18074 var start = this._peekToken.start; |
(...skipping 30 matching lines...) Expand all Loading... |
16578 if ((init instanceof ForInStatement)) { | 18105 if ((init instanceof ForInStatement)) { |
16579 return init; | 18106 return init; |
16580 } | 18107 } |
16581 var test = null; | 18108 var test = null; |
16582 if (!$notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { | 18109 if (!$notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
16583 test = this.expression(); | 18110 test = this.expression(); |
16584 this._eatSemicolon(); | 18111 this._eatSemicolon(); |
16585 } | 18112 } |
16586 var step = []; | 18113 var step = []; |
16587 if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { | 18114 if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
16588 step.add(this.expression()); | 18115 step.add$1(this.expression()); |
16589 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { | 18116 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
16590 step.add(this.expression()); | 18117 step.add$1(this.expression()); |
16591 } | 18118 } |
16592 this._eat(3/*TokenKind.RPAREN*/); | 18119 this._eat(3/*TokenKind.RPAREN*/); |
16593 } | 18120 } |
16594 var body = this.statement(); | 18121 var body = this.statement(); |
16595 return new ForStatement(init, test, step, body, this._makeSpan(start)); | 18122 return new ForStatement(init, test, step, body, this._makeSpan(start)); |
16596 } | 18123 } |
16597 lang_Parser.prototype.forInitializerStatement = function(start) { | 18124 lang_Parser.prototype.forInitializerStatement = function(start) { |
16598 var $0; | 18125 var $0; |
16599 if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { | 18126 if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
16600 return null; | 18127 return null; |
(...skipping 21 matching lines...) Expand all Loading... |
16622 this._eat(3/*TokenKind.RPAREN*/); | 18149 this._eat(3/*TokenKind.RPAREN*/); |
16623 var body = this.statement(); | 18150 var body = this.statement(); |
16624 return new ForInStatement(di, expr, body, this._makeSpan(start)); | 18151 return new ForInStatement(di, expr, body, this._makeSpan(start)); |
16625 } | 18152 } |
16626 lang_Parser.prototype.tryStatement = function() { | 18153 lang_Parser.prototype.tryStatement = function() { |
16627 var start = this._peekToken.start; | 18154 var start = this._peekToken.start; |
16628 this._eat(111/*TokenKind.TRY*/); | 18155 this._eat(111/*TokenKind.TRY*/); |
16629 var body = this.block(); | 18156 var body = this.block(); |
16630 var catches = []; | 18157 var catches = []; |
16631 while ($notnull_bool(this._peekKind(90/*TokenKind.CATCH*/))) { | 18158 while ($notnull_bool(this._peekKind(90/*TokenKind.CATCH*/))) { |
16632 catches.add(this.catchNode()); | 18159 catches.add$1(this.catchNode()); |
16633 } | 18160 } |
16634 var finallyBlock = null; | 18161 var finallyBlock = null; |
16635 if ($notnull_bool(this._maybeEat(98/*TokenKind.FINALLY*/))) { | 18162 if ($notnull_bool(this._maybeEat(98/*TokenKind.FINALLY*/))) { |
16636 finallyBlock = this.block(); | 18163 finallyBlock = this.block(); |
16637 } | 18164 } |
16638 return new TryStatement(body, catches, finallyBlock, this._makeSpan(start)); | 18165 return new TryStatement(body, catches, finallyBlock, this._makeSpan(start)); |
16639 } | 18166 } |
16640 lang_Parser.prototype.catchNode = function() { | 18167 lang_Parser.prototype.catchNode = function() { |
16641 var start = this._peekToken.start; | 18168 var start = this._peekToken.start; |
16642 this._eat(90/*TokenKind.CATCH*/); | 18169 this._eat(90/*TokenKind.CATCH*/); |
16643 this._eat(2/*TokenKind.LPAREN*/); | 18170 this._eat(2/*TokenKind.LPAREN*/); |
16644 var exc = this.declaredIdentifier(false); | 18171 var exc = this.declaredIdentifier(false); |
16645 var trace = null; | 18172 var trace = null; |
16646 if ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { | 18173 if ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
16647 trace = this.declaredIdentifier(false); | 18174 trace = this.declaredIdentifier(false); |
16648 } | 18175 } |
16649 this._eat(3/*TokenKind.RPAREN*/); | 18176 this._eat(3/*TokenKind.RPAREN*/); |
16650 var body = this.block(); | 18177 var body = this.block(); |
16651 return new CatchNode(exc, trace, body, this._makeSpan(start)); | 18178 return new CatchNode(exc, trace, body, this._makeSpan(start)); |
16652 } | 18179 } |
16653 lang_Parser.prototype.switchStatement = function() { | 18180 lang_Parser.prototype.switchStatement = function() { |
16654 var start = this._peekToken.start; | 18181 var start = this._peekToken.start; |
16655 this._eat(107/*TokenKind.SWITCH*/); | 18182 this._eat(107/*TokenKind.SWITCH*/); |
16656 var test = this.testCondition(); | 18183 var test = this.testCondition(); |
16657 var cases = []; | 18184 var cases = []; |
16658 this._eat(6/*TokenKind.LBRACE*/); | 18185 this._eat(6/*TokenKind.LBRACE*/); |
16659 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { | 18186 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
16660 cases.add(this.caseNode()); | 18187 cases.add$1(this.caseNode()); |
16661 } | 18188 } |
16662 return new SwitchStatement(test, cases, this._makeSpan(start)); | 18189 return new SwitchStatement(test, cases, this._makeSpan(start)); |
16663 } | 18190 } |
16664 lang_Parser.prototype._peekCaseEnd = function() { | 18191 lang_Parser.prototype._peekCaseEnd = function() { |
16665 var kind = this._peek(); | 18192 var kind = this._peek(); |
16666 return $notnull_bool($notnull_bool($eq(kind, 7/*TokenKind.RBRACE*/) || $eq(kin
d, 89/*TokenKind.CASE*/)) || $eq(kind, 93/*TokenKind.DEFAULT*/)); | 18193 return $notnull_bool($notnull_bool($eq(kind, 7/*TokenKind.RBRACE*/) || $eq(kin
d, 89/*TokenKind.CASE*/)) || $eq(kind, 93/*TokenKind.DEFAULT*/)); |
16667 } | 18194 } |
16668 lang_Parser.prototype.caseNode = function() { | 18195 lang_Parser.prototype.caseNode = function() { |
16669 var start = this._peekToken.start; | 18196 var start = this._peekToken.start; |
16670 var label = null; | 18197 var label = null; |
16671 if ($notnull_bool(this._peekIdentifier())) { | 18198 if ($notnull_bool(this._peekIdentifier())) { |
16672 label = this.identifier(); | 18199 label = this.identifier(); |
16673 this._eat(8/*TokenKind.COLON*/); | 18200 this._eat(8/*TokenKind.COLON*/); |
16674 } | 18201 } |
16675 var cases = []; | 18202 var cases = []; |
16676 while (true) { | 18203 while (true) { |
16677 if ($notnull_bool(this._maybeEat(89/*TokenKind.CASE*/))) { | 18204 if ($notnull_bool(this._maybeEat(89/*TokenKind.CASE*/))) { |
16678 cases.add(this.expression()); | 18205 cases.add$1(this.expression()); |
16679 this._eat(8/*TokenKind.COLON*/); | 18206 this._eat(8/*TokenKind.COLON*/); |
16680 } | 18207 } |
16681 else if ($notnull_bool(this._maybeEat(93/*TokenKind.DEFAULT*/))) { | 18208 else if ($notnull_bool(this._maybeEat(93/*TokenKind.DEFAULT*/))) { |
16682 cases.add(null); | 18209 cases.add$1(); |
16683 this._eat(8/*TokenKind.COLON*/); | 18210 this._eat(8/*TokenKind.COLON*/); |
16684 } | 18211 } |
16685 else { | 18212 else { |
16686 break; | 18213 break; |
16687 } | 18214 } |
16688 } | 18215 } |
16689 if (cases.length == 0) { | 18216 if (cases.length == 0) { |
16690 this._lang_error('case or default'); | 18217 this._lang_error('case or default'); |
16691 } | 18218 } |
16692 var stmts = []; | 18219 var stmts = []; |
16693 while (!$notnull_bool(this._peekCaseEnd())) { | 18220 while (!$notnull_bool(this._peekCaseEnd())) { |
16694 if ($notnull_bool(this.isPrematureEndOfFile())) break; | 18221 if ($notnull_bool(this.isPrematureEndOfFile())) break; |
16695 stmts.add(this.statement()); | 18222 stmts.add$1(this.statement()); |
16696 } | 18223 } |
16697 return new CaseNode(label, cases, stmts, this._makeSpan(start)); | 18224 return new CaseNode(label, cases, stmts, this._makeSpan(start)); |
16698 } | 18225 } |
16699 lang_Parser.prototype.returnStatement = function() { | 18226 lang_Parser.prototype.returnStatement = function() { |
16700 var start = this._peekToken.start; | 18227 var start = this._peekToken.start; |
16701 this._eat(105/*TokenKind.RETURN*/); | 18228 this._eat(105/*TokenKind.RETURN*/); |
16702 var expr; | 18229 var expr; |
16703 if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { | 18230 if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
16704 expr = null; | 18231 expr = null; |
16705 } | 18232 } |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16880 label = this._makeLabel(expr); | 18407 label = this._makeLabel(expr); |
16881 expr = this.expression(); | 18408 expr = this.expression(); |
16882 } | 18409 } |
16883 return new ArgumentNode(label, expr, this._makeSpan(start)); | 18410 return new ArgumentNode(label, expr, this._makeSpan(start)); |
16884 } | 18411 } |
16885 lang_Parser.prototype.arguments = function() { | 18412 lang_Parser.prototype.arguments = function() { |
16886 var args = []; | 18413 var args = []; |
16887 this._eat(2/*TokenKind.LPAREN*/); | 18414 this._eat(2/*TokenKind.LPAREN*/); |
16888 if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { | 18415 if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
16889 do { | 18416 do { |
16890 args.add(this.argument()); | 18417 args.add$1(this.argument()); |
16891 } | 18418 } |
16892 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) | 18419 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
16893 this._eat(3/*TokenKind.RPAREN*/); | 18420 this._eat(3/*TokenKind.RPAREN*/); |
16894 } | 18421 } |
16895 return args; | 18422 return args; |
16896 } | 18423 } |
16897 lang_Parser.prototype.get$arguments = function() { | 18424 lang_Parser.prototype.get$arguments = function() { |
16898 return lang_Parser.prototype.arguments.bind(this); | 18425 return lang_Parser.prototype.arguments.bind(this); |
16899 } | 18426 } |
16900 lang_Parser.prototype.finishPostfixExpression = function(expr) { | 18427 lang_Parser.prototype.finishPostfixExpression = function(expr) { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17062 } | 18589 } |
17063 lang_Parser.prototype.stringInterpolation = function() { | 18590 lang_Parser.prototype.stringInterpolation = function() { |
17064 var start = this._peekToken.start; | 18591 var start = this._peekToken.start; |
17065 var lits = []; | 18592 var lits = []; |
17066 var startQuote = null, endQuote = null; | 18593 var startQuote = null, endQuote = null; |
17067 while ($notnull_bool(this._peekKind(66/*TokenKind.INCOMPLETE_STRING*/))) { | 18594 while ($notnull_bool(this._peekKind(66/*TokenKind.INCOMPLETE_STRING*/))) { |
17068 var token = this._lang_next(); | 18595 var token = this._lang_next(); |
17069 var text = token.get$text(); | 18596 var text = token.get$text(); |
17070 if ($notnull_bool(startQuote == null)) { | 18597 if ($notnull_bool(startQuote == null)) { |
17071 if ($notnull_bool(isMultilineString($assert_String(text)))) { | 18598 if ($notnull_bool(isMultilineString($assert_String(text)))) { |
17072 endQuote = text.substring(0, 3); | 18599 endQuote = text.substring$2(0, 3); |
17073 startQuote = endQuote + '\n'; | 18600 startQuote = endQuote + '\n'; |
17074 } | 18601 } |
17075 else { | 18602 else { |
17076 startQuote = endQuote = text.$index(0); | 18603 startQuote = endQuote = text.$index(0); |
17077 } | 18604 } |
17078 text = text.substring(0, text.length - 1) + endQuote; | 18605 text = text.substring$2(0, text.length - 1) + endQuote; |
17079 } | 18606 } |
17080 else { | 18607 else { |
17081 text = startQuote + text.substring(0, text.length - 1) + endQuote; | 18608 text = startQuote + text.substring$2(0, text.length - 1) + endQuote; |
17082 } | 18609 } |
17083 lits.add(this.makeStringLiteral($assert_String(text), token.get$span())); | 18610 lits.add$1(this.makeStringLiteral($assert_String(text), token.get$span())); |
17084 if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) { | 18611 if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) { |
17085 lits.add(this.expression()); | 18612 lits.add$1(this.expression()); |
17086 this._eat(7/*TokenKind.RBRACE*/); | 18613 this._eat(7/*TokenKind.RBRACE*/); |
17087 } | 18614 } |
17088 else { | 18615 else { |
17089 var id = this.identifier(); | 18616 var id = this.identifier(); |
17090 lits.add(new VarExpression(id, id.get$span())); | 18617 lits.add$1(new VarExpression(id, id.get$span())); |
17091 } | 18618 } |
17092 } | 18619 } |
17093 var tok = this._lang_next(); | 18620 var tok = this._lang_next(); |
17094 if ($notnull_bool($ne(tok.kind, 58/*TokenKind.STRING*/))) { | 18621 if ($notnull_bool($ne(tok.kind, 58/*TokenKind.STRING*/))) { |
17095 this._errorExpected('interpolated string'); | 18622 this._errorExpected('interpolated string'); |
17096 } | 18623 } |
17097 var text = startQuote + tok.get$text(); | 18624 var text = startQuote + tok.get$text(); |
17098 lits.add(this.makeStringLiteral($assert_String(text), tok.get$span())); | 18625 lits.add$1(this.makeStringLiteral($assert_String(text), tok.get$span())); |
17099 var span = this._makeSpan(start); | 18626 var span = this._makeSpan(start); |
17100 return new LiteralExpression(lits, this._stringTypeRef((span && span.is$Source
Span())), '\$\$\$', (span && span.is$SourceSpan())); | 18627 return new LiteralExpression(lits, this._stringTypeRef((span && span.is$Source
Span())), '\$\$\$', (span && span.is$SourceSpan())); |
17101 } | 18628 } |
17102 lang_Parser.prototype.makeStringLiteral = function(text, span) { | 18629 lang_Parser.prototype.makeStringLiteral = function(text, span) { |
17103 return new LiteralExpression(text, this._stringTypeRef(span), text, span); | 18630 return new LiteralExpression(text, this._stringTypeRef(span), text, span); |
17104 } | 18631 } |
17105 lang_Parser.prototype.stringLiteralExpr = function() { | 18632 lang_Parser.prototype.stringLiteralExpr = function() { |
17106 var token = this._lang_next(); | 18633 var token = this._lang_next(); |
17107 return this.makeStringLiteral(token.get$text(), token.get$span()); | 18634 return this.makeStringLiteral(token.get$text(), token.get$span()); |
17108 } | 18635 } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17267 return new lang_NewExpression(isConst, type, name, args, this._makeSpan(start)
); | 18794 return new lang_NewExpression(isConst, type, name, args, this._makeSpan(start)
); |
17268 } | 18795 } |
17269 lang_Parser.prototype.finishListLiteral = function(start, isConst, type) { | 18796 lang_Parser.prototype.finishListLiteral = function(start, isConst, type) { |
17270 if ($notnull_bool(this._maybeEat(56/*TokenKind.INDEX*/))) { | 18797 if ($notnull_bool(this._maybeEat(56/*TokenKind.INDEX*/))) { |
17271 return new ListExpression(isConst, type, [], this._makeSpan(start)); | 18798 return new ListExpression(isConst, type, [], this._makeSpan(start)); |
17272 } | 18799 } |
17273 var values = []; | 18800 var values = []; |
17274 this._eat(4/*TokenKind.LBRACK*/); | 18801 this._eat(4/*TokenKind.LBRACK*/); |
17275 while (!$notnull_bool(this._maybeEat(5/*TokenKind.RBRACK*/))) { | 18802 while (!$notnull_bool(this._maybeEat(5/*TokenKind.RBRACK*/))) { |
17276 if ($notnull_bool(this.isPrematureEndOfFile())) break; | 18803 if ($notnull_bool(this.isPrematureEndOfFile())) break; |
17277 values.add(this.expression()); | 18804 values.add$1(this.expression()); |
17278 if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { | 18805 if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
17279 this._eat(5/*TokenKind.RBRACK*/); | 18806 this._eat(5/*TokenKind.RBRACK*/); |
17280 break; | 18807 break; |
17281 } | 18808 } |
17282 } | 18809 } |
17283 return new ListExpression(isConst, type, values, this._makeSpan(start)); | 18810 return new ListExpression(isConst, type, values, this._makeSpan(start)); |
17284 } | 18811 } |
17285 lang_Parser.prototype.finishMapLiteral = function(start, isConst, type) { | 18812 lang_Parser.prototype.finishMapLiteral = function(start, isConst, type) { |
17286 var items = []; | 18813 var items = []; |
17287 this._eat(6/*TokenKind.LBRACE*/); | 18814 this._eat(6/*TokenKind.LBRACE*/); |
17288 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { | 18815 while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
17289 if ($notnull_bool(this.isPrematureEndOfFile())) break; | 18816 if ($notnull_bool(this.isPrematureEndOfFile())) break; |
17290 items.add(this.expression()); | 18817 items.add$1(this.expression()); |
17291 this._eat(8/*TokenKind.COLON*/); | 18818 this._eat(8/*TokenKind.COLON*/); |
17292 items.add(this.expression()); | 18819 items.add$1(this.expression()); |
17293 if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { | 18820 if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
17294 this._eat(7/*TokenKind.RBRACE*/); | 18821 this._eat(7/*TokenKind.RBRACE*/); |
17295 break; | 18822 break; |
17296 } | 18823 } |
17297 } | 18824 } |
17298 return new MapExpression(isConst, type, items, this._makeSpan(start)); | 18825 return new MapExpression(isConst, type, items, this._makeSpan(start)); |
17299 } | 18826 } |
17300 lang_Parser.prototype.finishTypedLiteral = function(start, isConst) { | 18827 lang_Parser.prototype.finishTypedLiteral = function(start, isConst) { |
17301 var span = this._makeSpan(start); | 18828 var span = this._makeSpan(start); |
17302 var typeToBeNamedLater = new NameTypeReference(false, null, null, (span && spa
n.is$SourceSpan())); | 18829 var typeToBeNamedLater = new NameTypeReference(false, null, null, (span && spa
n.is$SourceSpan())); |
(...skipping 12 matching lines...) Expand all Loading... |
17315 var modifiers = null; | 18842 var modifiers = null; |
17316 while (true) { | 18843 while (true) { |
17317 switch (this._peek()) { | 18844 switch (this._peek()) { |
17318 case 86/*TokenKind.STATIC*/: | 18845 case 86/*TokenKind.STATIC*/: |
17319 case 97/*TokenKind.FINAL*/: | 18846 case 97/*TokenKind.FINAL*/: |
17320 case 91/*TokenKind.CONST*/: | 18847 case 91/*TokenKind.CONST*/: |
17321 case 71/*TokenKind.ABSTRACT*/: | 18848 case 71/*TokenKind.ABSTRACT*/: |
17322 case 75/*TokenKind.FACTORY*/: | 18849 case 75/*TokenKind.FACTORY*/: |
17323 | 18850 |
17324 if (modifiers == null) modifiers = []; | 18851 if (modifiers == null) modifiers = []; |
17325 modifiers.add(this._lang_next()); | 18852 modifiers.add$1(this._lang_next()); |
17326 break; | 18853 break; |
17327 | 18854 |
17328 default: | 18855 default: |
17329 | 18856 |
17330 return modifiers; | 18857 return modifiers; |
17331 | 18858 |
17332 } | 18859 } |
17333 } | 18860 } |
17334 return null; | 18861 return null; |
17335 } | 18862 } |
17336 lang_Parser.prototype.typeParameter = function() { | 18863 lang_Parser.prototype.typeParameter = function() { |
17337 var start = this._peekToken.start; | 18864 var start = this._peekToken.start; |
17338 var name = this.identifier(); | 18865 var name = this.identifier(); |
17339 var myType = null; | 18866 var myType = null; |
17340 if ($notnull_bool(this._maybeEat(74/*TokenKind.EXTENDS*/))) { | 18867 if ($notnull_bool(this._maybeEat(74/*TokenKind.EXTENDS*/))) { |
17341 myType = this.type(1); | 18868 myType = this.type(1); |
17342 } | 18869 } |
17343 return new TypeParameter(name, myType, this._makeSpan(start)); | 18870 return new TypeParameter(name, myType, this._makeSpan(start)); |
17344 } | 18871 } |
17345 lang_Parser.prototype.typeParameters = function() { | 18872 lang_Parser.prototype.typeParameters = function() { |
17346 this._eat(52/*TokenKind.LT*/); | 18873 this._eat(52/*TokenKind.LT*/); |
17347 var closed = false; | 18874 var closed = false; |
17348 var ret = []; | 18875 var ret = []; |
17349 do { | 18876 do { |
17350 var tp = this.typeParameter(); | 18877 var tp = this.typeParameter(); |
17351 ret.add(tp); | 18878 ret.add$1(tp); |
17352 if ((tp.extendsType instanceof GenericTypeReference) && tp.extendsType.depth
== 0) { | 18879 if ((tp.extendsType instanceof GenericTypeReference) && tp.extendsType.depth
== 0) { |
17353 closed = true; | 18880 closed = true; |
17354 break; | 18881 break; |
17355 } | 18882 } |
17356 } | 18883 } |
17357 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) | 18884 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
17358 if (!$notnull_bool(closed)) { | 18885 if (!$notnull_bool(closed)) { |
17359 this._eat(53/*TokenKind.GT*/); | 18886 this._eat(53/*TokenKind.GT*/); |
17360 } | 18887 } |
17361 return ret; | 18888 return ret; |
(...skipping 17 matching lines...) Expand all Loading... |
17379 } | 18906 } |
17380 } | 18907 } |
17381 lang_Parser.prototype.addTypeArguments = function(baseType, depth) { | 18908 lang_Parser.prototype.addTypeArguments = function(baseType, depth) { |
17382 this._eat(52/*TokenKind.LT*/); | 18909 this._eat(52/*TokenKind.LT*/); |
17383 return this._finishTypeArguments(baseType, depth, []); | 18910 return this._finishTypeArguments(baseType, depth, []); |
17384 } | 18911 } |
17385 lang_Parser.prototype._finishTypeArguments = function(baseType, depth, types) { | 18912 lang_Parser.prototype._finishTypeArguments = function(baseType, depth, types) { |
17386 var delta = -1; | 18913 var delta = -1; |
17387 do { | 18914 do { |
17388 var myType = this.type(depth + 1); | 18915 var myType = this.type(depth + 1); |
17389 types.add(myType); | 18916 types.add$1(myType); |
17390 if ((myType instanceof GenericTypeReference) && myType.depth <= depth) { | 18917 if ((myType instanceof GenericTypeReference) && myType.depth <= depth) { |
17391 delta = depth - myType.depth; | 18918 delta = depth - myType.depth; |
17392 break; | 18919 break; |
17393 } | 18920 } |
17394 } | 18921 } |
17395 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) | 18922 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
17396 if (delta >= 0) { | 18923 if (delta >= 0) { |
17397 depth -= $assert_num(delta); | 18924 depth -= $assert_num(delta); |
17398 } | 18925 } |
17399 else { | 18926 else { |
17400 depth = this._eatClosingAngle(depth); | 18927 depth = this._eatClosingAngle(depth); |
17401 } | 18928 } |
17402 var span = this._makeSpan(baseType.span.start); | 18929 var span = this._makeSpan(baseType.span.start); |
17403 return new GenericTypeReference(baseType, types, depth, (span && span.is$Sourc
eSpan())); | 18930 return new GenericTypeReference(baseType, types, depth, (span && span.is$Sourc
eSpan())); |
17404 } | 18931 } |
17405 lang_Parser.prototype.typeList = function() { | 18932 lang_Parser.prototype.typeList = function() { |
17406 var types = []; | 18933 var types = []; |
17407 do { | 18934 do { |
17408 types.add(this.type(0)); | 18935 types.add$1(this.type(0)); |
17409 } | 18936 } |
17410 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) | 18937 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
17411 return types; | 18938 return types; |
17412 } | 18939 } |
17413 lang_Parser.prototype.type = function(depth) { | 18940 lang_Parser.prototype.type = function(depth) { |
17414 var start = this._peekToken.start; | 18941 var start = this._peekToken.start; |
17415 var name; | 18942 var name; |
17416 var names = null; | 18943 var names = null; |
17417 var typeArgs = null; | 18944 var typeArgs = null; |
17418 var isFinal = false; | 18945 var isFinal = false; |
(...skipping 14 matching lines...) Expand all Loading... |
17433 break; | 18960 break; |
17434 | 18961 |
17435 default: | 18962 default: |
17436 | 18963 |
17437 name = this.identifier(); | 18964 name = this.identifier(); |
17438 break; | 18965 break; |
17439 | 18966 |
17440 } | 18967 } |
17441 while ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { | 18968 while ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
17442 if (names == null) names = []; | 18969 if (names == null) names = []; |
17443 names.add(this.identifier()); | 18970 names.add$1(this.identifier()); |
17444 } | 18971 } |
17445 var typeRef = new NameTypeReference(isFinal, name, names, this._makeSpan(start
)); | 18972 var typeRef = new NameTypeReference(isFinal, name, names, this._makeSpan(start
)); |
17446 if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { | 18973 if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
17447 return this.addTypeArguments((typeRef && typeRef.is$TypeReference()), depth)
; | 18974 return this.addTypeArguments((typeRef && typeRef.is$TypeReference()), depth)
; |
17448 } | 18975 } |
17449 else { | 18976 else { |
17450 return typeRef; | 18977 return typeRef; |
17451 } | 18978 } |
17452 } | 18979 } |
17453 lang_Parser.prototype.formalParameter = function(inOptionalBlock) { | 18980 lang_Parser.prototype.formalParameter = function(inOptionalBlock) { |
(...skipping 21 matching lines...) Expand all Loading... |
17475 return new FormalNode(isThis, isRest, type, name, value, this._makeSpan(start)
); | 19002 return new FormalNode(isThis, isRest, type, name, value, this._makeSpan(start)
); |
17476 } | 19003 } |
17477 lang_Parser.prototype.formalParameterList = function() { | 19004 lang_Parser.prototype.formalParameterList = function() { |
17478 this._eat(2/*TokenKind.LPAREN*/); | 19005 this._eat(2/*TokenKind.LPAREN*/); |
17479 var formals = []; | 19006 var formals = []; |
17480 var inOptionalBlock = false; | 19007 var inOptionalBlock = false; |
17481 if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { | 19008 if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
17482 if ($notnull_bool(this._maybeEat(4/*TokenKind.LBRACK*/))) { | 19009 if ($notnull_bool(this._maybeEat(4/*TokenKind.LBRACK*/))) { |
17483 inOptionalBlock = true; | 19010 inOptionalBlock = true; |
17484 } | 19011 } |
17485 formals.add(this.formalParameter($assert_bool(inOptionalBlock))); | 19012 formals.add$1(this.formalParameter($assert_bool(inOptionalBlock))); |
17486 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { | 19013 while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
17487 if ($notnull_bool(this._maybeEat(4/*TokenKind.LBRACK*/))) { | 19014 if ($notnull_bool(this._maybeEat(4/*TokenKind.LBRACK*/))) { |
17488 if ($notnull_bool(inOptionalBlock)) { | 19015 if ($notnull_bool(inOptionalBlock)) { |
17489 this._lang_error('already inside an optional block', this._previousTok
en.get$span()); | 19016 this._lang_error('already inside an optional block', this._previousTok
en.get$span()); |
17490 } | 19017 } |
17491 inOptionalBlock = true; | 19018 inOptionalBlock = true; |
17492 } | 19019 } |
17493 formals.add(this.formalParameter($assert_bool(inOptionalBlock))); | 19020 formals.add$1(this.formalParameter($assert_bool(inOptionalBlock))); |
17494 } | 19021 } |
17495 if ($notnull_bool(inOptionalBlock)) { | 19022 if ($notnull_bool(inOptionalBlock)) { |
17496 this._eat(5/*TokenKind.RBRACK*/); | 19023 this._eat(5/*TokenKind.RBRACK*/); |
17497 } | 19024 } |
17498 this._eat(3/*TokenKind.RPAREN*/); | 19025 this._eat(3/*TokenKind.RPAREN*/); |
17499 } | 19026 } |
17500 return formals; | 19027 return formals; |
17501 } | 19028 } |
17502 lang_Parser.prototype.identifier = function() { | 19029 lang_Parser.prototype.identifier = function() { |
17503 var tok = this._lang_next(); | 19030 var tok = this._lang_next(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17561 return this._makeFormalsFromExpressions(expr.values, false); | 19088 return this._makeFormalsFromExpressions(expr.values, false); |
17562 } | 19089 } |
17563 lang_Parser.prototype._makeFormals = function(arguments) { | 19090 lang_Parser.prototype._makeFormals = function(arguments) { |
17564 var expressions = []; | 19091 var expressions = []; |
17565 for (var i = 0; | 19092 for (var i = 0; |
17566 i < arguments.length; i++) { | 19093 i < arguments.length; i++) { |
17567 var arg = arguments.$index(i); | 19094 var arg = arguments.$index(i); |
17568 if (arg.label != null) { | 19095 if (arg.label != null) { |
17569 this._lang_error('expected formal, but found ":"'); | 19096 this._lang_error('expected formal, but found ":"'); |
17570 } | 19097 } |
17571 expressions.add(arg.get$value()); | 19098 expressions.add$1(arg.get$value()); |
17572 } | 19099 } |
17573 return this._makeFormalsFromExpressions(expressions, true); | 19100 return this._makeFormalsFromExpressions(expressions, true); |
17574 } | 19101 } |
17575 lang_Parser.prototype._makeFormalsFromExpressions = function(expressions, allowO
ptional) { | 19102 lang_Parser.prototype._makeFormalsFromExpressions = function(expressions, allowO
ptional) { |
17576 var $0; | 19103 var $0; |
17577 var formals = []; | 19104 var formals = []; |
17578 for (var i = 0; | 19105 for (var i = 0; |
17579 i < expressions.length; i++) { | 19106 i < expressions.length; i++) { |
17580 var formal = this._makeFormal(expressions.$index(i)); | 19107 var formal = this._makeFormal(expressions.$index(i)); |
17581 if ($notnull_bool(formal == null)) { | 19108 if ($notnull_bool(formal == null)) { |
17582 var baseType = this._makeType(expressions.$index(i).x); | 19109 var baseType = this._makeType(expressions.$index(i).x); |
17583 var typeParams = [this._makeType(expressions.$index(i).y)]; | 19110 var typeParams = [this._makeType(expressions.$index(i).y)]; |
17584 i++; | 19111 i++; |
17585 while (i < expressions.length) { | 19112 while (i < expressions.length) { |
17586 var expr = expressions.$index(i++); | 19113 var expr = expressions.$index(i++); |
17587 if ($notnull_bool(this._isBin(expr, 53/*TokenKind.GT*/))) { | 19114 if ($notnull_bool(this._isBin(expr, 53/*TokenKind.GT*/))) { |
17588 typeParams.add(this._makeType(expr.x)); | 19115 typeParams.add$1(this._makeType(expr.x)); |
17589 var type = new GenericTypeReference(baseType, typeParams, 0, this._mak
eSpan(baseType.get$span().start)); | 19116 var type = new GenericTypeReference(baseType, typeParams, 0, this._mak
eSpan(baseType.get$span().start)); |
17590 var name = null; | 19117 var name = null; |
17591 if ((expr.y instanceof VarExpression)) { | 19118 if ((expr.y instanceof VarExpression)) { |
17592 var ve = (($0 = expr.y) && $0.is$VarExpression()); | 19119 var ve = (($0 = expr.y) && $0.is$VarExpression()); |
17593 name = ve.name; | 19120 name = ve.name; |
17594 } | 19121 } |
17595 else { | 19122 else { |
17596 this._lang_error('expected formal', expr.get$span()); | 19123 this._lang_error('expected formal', expr.get$span()); |
17597 } | 19124 } |
17598 formal = new FormalNode(false, false, type, name, null, this._makeSpan
(expressions.$index(0).get$span().start)); | 19125 formal = new FormalNode(false, false, type, name, null, this._makeSpan
(expressions.$index(0).get$span().start)); |
17599 break; | 19126 break; |
17600 } | 19127 } |
17601 else { | 19128 else { |
17602 typeParams.add(this._makeType(expr)); | 19129 typeParams.add$1(this._makeType(expr)); |
17603 } | 19130 } |
17604 } | 19131 } |
17605 formals.add(formal); | 19132 formals.add$1(formal); |
17606 } | 19133 } |
17607 else if (!!(formal && formal.is$List)) { | 19134 else if (!!(formal && formal.is$List)) { |
17608 formals.addAll(formal); | 19135 formals.addAll$1(formal); |
17609 if (!$notnull_bool(allowOptional)) { | 19136 if (!$notnull_bool(allowOptional)) { |
17610 this._lang_error('unexpected nested optional formal', expressions.$index
(i).get$span()); | 19137 this._lang_error('unexpected nested optional formal', expressions.$index
(i).get$span()); |
17611 } | 19138 } |
17612 } | 19139 } |
17613 else { | 19140 else { |
17614 formals.add(formal); | 19141 formals.add$1(formal); |
17615 } | 19142 } |
17616 } | 19143 } |
17617 return formals; | 19144 return formals; |
17618 } | 19145 } |
17619 lang_Parser.prototype._makeDeclaredIdentifier = function(e) { | 19146 lang_Parser.prototype._makeDeclaredIdentifier = function(e) { |
17620 if ((e instanceof VarExpression)) { | 19147 if ((e instanceof VarExpression)) { |
17621 return new DeclaredIdentifier(null, e.get$name(), e.get$span()); | 19148 return new DeclaredIdentifier(null, e.get$name(), e.get$span()); |
17622 } | 19149 } |
17623 else if ((e instanceof DeclaredIdentifier)) { | 19150 else if ((e instanceof DeclaredIdentifier)) { |
17624 return e; | 19151 return e; |
17625 } | 19152 } |
17626 else { | 19153 else { |
17627 this._lang_error('expected declared identifier'); | 19154 this._lang_error('expected declared identifier'); |
17628 return new DeclaredIdentifier(null, null, e.get$span()); | 19155 return new DeclaredIdentifier(null, null, e.get$span()); |
17629 } | 19156 } |
17630 } | 19157 } |
17631 lang_Parser.prototype._makeLabel = function(expr) { | 19158 lang_Parser.prototype._makeLabel = function(expr) { |
17632 if ((expr instanceof VarExpression)) { | 19159 if ((expr instanceof VarExpression)) { |
17633 return expr.get$name(); | 19160 return expr.get$name(); |
17634 } | 19161 } |
17635 else { | 19162 else { |
17636 this._errorExpected('label'); | 19163 this._errorExpected('label'); |
17637 return null; | 19164 return null; |
17638 } | 19165 } |
17639 } | 19166 } |
| 19167 lang_Parser.prototype.block$0 = function() { |
| 19168 return this.block(); |
| 19169 }; |
17640 // ********** Code for IncompleteSourceException ************** | 19170 // ********** Code for IncompleteSourceException ************** |
17641 function IncompleteSourceException(token) { | 19171 function IncompleteSourceException(token) { |
17642 this.token = token; | 19172 this.token = token; |
17643 // Initializers done | 19173 // Initializers done |
17644 } | 19174 } |
17645 IncompleteSourceException.prototype.toString = function() { | 19175 IncompleteSourceException.prototype.toString = function() { |
17646 if (this.token.get$span() == null) return ('Unexpected ' + this.token + ''); | 19176 if (this.token.get$span() == null) return ('Unexpected ' + this.token + ''); |
17647 return $assert_String(this.token.get$span().toMessageString(('Unexpected ' + t
his.token + ''))); | 19177 return $assert_String(this.token.get$span().toMessageString(('Unexpected ' + t
his.token + ''))); |
17648 } | 19178 } |
| 19179 IncompleteSourceException.prototype.toString$0 = function() { |
| 19180 return this.toString(); |
| 19181 }; |
17649 // ********** Code for lang_Node ************** | 19182 // ********** Code for lang_Node ************** |
17650 function lang_Node(span) { | 19183 function lang_Node(span) { |
17651 this.span = span; | 19184 this.span = span; |
17652 // Initializers done | 19185 // Initializers done |
17653 } | 19186 } |
17654 lang_Node.prototype.is$lang_Node = function(){return this;}; | 19187 lang_Node.prototype.is$lang_Node = function(){return this;}; |
17655 lang_Node.prototype.get$span = function() { return this.span; }; | 19188 lang_Node.prototype.get$span = function() { return this.span; }; |
17656 lang_Node.prototype.set$span = function(value) { return this.span = value; }; | 19189 lang_Node.prototype.set$span = function(value) { return this.span = value; }; |
| 19190 lang_Node.prototype.visit$1 = function($0) { |
| 19191 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19192 }; |
17657 // ********** Code for Definition ************** | 19193 // ********** Code for Definition ************** |
17658 function Definition(span) { | 19194 function Definition(span) { |
17659 lang_Statement.call(this, span); | 19195 lang_Statement.call(this, span); |
17660 // Initializers done | 19196 // Initializers done |
17661 } | 19197 } |
17662 $inherits(Definition, lang_Statement); | 19198 $inherits(Definition, lang_Statement); |
17663 Definition.prototype.is$Definition = function(){return this;}; | 19199 Definition.prototype.is$Definition = function(){return this;}; |
17664 Definition.prototype.get$typeParameters = function() { | 19200 Definition.prototype.get$typeParameters = function() { |
17665 return null; | 19201 return null; |
17666 } | 19202 } |
(...skipping 18 matching lines...) Expand all Loading... |
17685 function TypeReference(span, type) { | 19221 function TypeReference(span, type) { |
17686 this.type = type; | 19222 this.type = type; |
17687 lang_Node.call(this, span); | 19223 lang_Node.call(this, span); |
17688 // Initializers done | 19224 // Initializers done |
17689 } | 19225 } |
17690 $inherits(TypeReference, lang_Node); | 19226 $inherits(TypeReference, lang_Node); |
17691 TypeReference.prototype.is$TypeReference = function(){return this;}; | 19227 TypeReference.prototype.is$TypeReference = function(){return this;}; |
17692 TypeReference.prototype.visit = function(visitor) { | 19228 TypeReference.prototype.visit = function(visitor) { |
17693 return visitor.visitTypeReference(this); | 19229 return visitor.visitTypeReference(this); |
17694 } | 19230 } |
| 19231 TypeReference.prototype.visit$1 = function($0) { |
| 19232 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19233 }; |
17695 // ********** Code for DirectiveDefinition ************** | 19234 // ********** Code for DirectiveDefinition ************** |
17696 function DirectiveDefinition(name, arguments, span) { | 19235 function DirectiveDefinition(name, arguments, span) { |
17697 this.name = name; | 19236 this.name = name; |
17698 this.arguments = arguments; | 19237 this.arguments = arguments; |
17699 Definition.call(this, span); | 19238 Definition.call(this, span); |
17700 // Initializers done | 19239 // Initializers done |
17701 } | 19240 } |
17702 $inherits(DirectiveDefinition, Definition); | 19241 $inherits(DirectiveDefinition, Definition); |
17703 DirectiveDefinition.prototype.get$name = function() { return this.name; }; | 19242 DirectiveDefinition.prototype.get$name = function() { return this.name; }; |
17704 DirectiveDefinition.prototype.set$name = function(value) { return this.name = va
lue; }; | 19243 DirectiveDefinition.prototype.set$name = function(value) { return this.name = va
lue; }; |
17705 DirectiveDefinition.prototype.get$arguments = function() { return this.arguments
; }; | 19244 DirectiveDefinition.prototype.get$arguments = function() { return this.arguments
; }; |
17706 DirectiveDefinition.prototype.set$arguments = function(value) { return this.argu
ments = value; }; | 19245 DirectiveDefinition.prototype.set$arguments = function(value) { return this.argu
ments = value; }; |
17707 DirectiveDefinition.prototype.visit = function(visitor) { | 19246 DirectiveDefinition.prototype.visit = function(visitor) { |
17708 return visitor.visitDirectiveDefinition(this); | 19247 return visitor.visitDirectiveDefinition(this); |
17709 } | 19248 } |
| 19249 DirectiveDefinition.prototype.visit$1 = function($0) { |
| 19250 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19251 }; |
17710 // ********** Code for TypeDefinition ************** | 19252 // ********** Code for TypeDefinition ************** |
17711 function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT
ypes, nativeType, factoryType, body, span) { | 19253 function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT
ypes, nativeType, factoryType, body, span) { |
17712 this.isClass = isClass; | 19254 this.isClass = isClass; |
17713 this.name = name; | 19255 this.name = name; |
17714 this.typeParameters = typeParameters; | 19256 this.typeParameters = typeParameters; |
17715 this.extendsTypes = extendsTypes; | 19257 this.extendsTypes = extendsTypes; |
17716 this.implementsTypes = implementsTypes; | 19258 this.implementsTypes = implementsTypes; |
17717 this.nativeType = nativeType; | 19259 this.nativeType = nativeType; |
17718 this.factoryType = factoryType; | 19260 this.factoryType = factoryType; |
17719 this.body = body; | 19261 this.body = body; |
17720 Definition.call(this, span); | 19262 Definition.call(this, span); |
17721 // Initializers done | 19263 // Initializers done |
17722 } | 19264 } |
17723 $inherits(TypeDefinition, Definition); | 19265 $inherits(TypeDefinition, Definition); |
17724 TypeDefinition.prototype.is$TypeDefinition = function(){return this;}; | 19266 TypeDefinition.prototype.is$TypeDefinition = function(){return this;}; |
17725 TypeDefinition.prototype.get$isClass = function() { return this.isClass; }; | 19267 TypeDefinition.prototype.get$isClass = function() { return this.isClass; }; |
17726 TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = v
alue; }; | 19268 TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = v
alue; }; |
17727 TypeDefinition.prototype.get$name = function() { return this.name; }; | 19269 TypeDefinition.prototype.get$name = function() { return this.name; }; |
17728 TypeDefinition.prototype.set$name = function(value) { return this.name = value;
}; | 19270 TypeDefinition.prototype.set$name = function(value) { return this.name = value;
}; |
17729 TypeDefinition.prototype.get$typeParameters = function() { return this.typeParam
eters; }; | 19271 TypeDefinition.prototype.get$typeParameters = function() { return this.typeParam
eters; }; |
17730 TypeDefinition.prototype.set$typeParameters = function(value) { return this.type
Parameters = value; }; | 19272 TypeDefinition.prototype.set$typeParameters = function(value) { return this.type
Parameters = value; }; |
17731 TypeDefinition.prototype.get$nativeType = function() { return this.nativeType; }
; | 19273 TypeDefinition.prototype.get$nativeType = function() { return this.nativeType; }
; |
17732 TypeDefinition.prototype.set$nativeType = function(value) { return this.nativeTy
pe = value; }; | 19274 TypeDefinition.prototype.set$nativeType = function(value) { return this.nativeTy
pe = value; }; |
17733 TypeDefinition.prototype.visit = function(visitor) { | 19275 TypeDefinition.prototype.visit = function(visitor) { |
17734 return visitor.visitTypeDefinition(this); | 19276 return visitor.visitTypeDefinition(this); |
17735 } | 19277 } |
| 19278 TypeDefinition.prototype.visit$1 = function($0) { |
| 19279 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19280 }; |
17736 // ********** Code for FunctionTypeDefinition ************** | 19281 // ********** Code for FunctionTypeDefinition ************** |
17737 function FunctionTypeDefinition(func, typeParameters, span) { | 19282 function FunctionTypeDefinition(func, typeParameters, span) { |
17738 this.func = func; | 19283 this.func = func; |
17739 this.typeParameters = typeParameters; | 19284 this.typeParameters = typeParameters; |
17740 Definition.call(this, span); | 19285 Definition.call(this, span); |
17741 // Initializers done | 19286 // Initializers done |
17742 } | 19287 } |
17743 $inherits(FunctionTypeDefinition, Definition); | 19288 $inherits(FunctionTypeDefinition, Definition); |
17744 FunctionTypeDefinition.prototype.get$typeParameters = function() { return this.t
ypeParameters; }; | 19289 FunctionTypeDefinition.prototype.get$typeParameters = function() { return this.t
ypeParameters; }; |
17745 FunctionTypeDefinition.prototype.set$typeParameters = function(value) { return t
his.typeParameters = value; }; | 19290 FunctionTypeDefinition.prototype.set$typeParameters = function(value) { return t
his.typeParameters = value; }; |
17746 FunctionTypeDefinition.prototype.visit = function(visitor) { | 19291 FunctionTypeDefinition.prototype.visit = function(visitor) { |
17747 return visitor.visitFunctionTypeDefinition(this); | 19292 return visitor.visitFunctionTypeDefinition(this); |
17748 } | 19293 } |
| 19294 FunctionTypeDefinition.prototype.visit$1 = function($0) { |
| 19295 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19296 }; |
17749 // ********** Code for VariableDefinition ************** | 19297 // ********** Code for VariableDefinition ************** |
17750 function VariableDefinition(modifiers, type, names, values, span) { | 19298 function VariableDefinition(modifiers, type, names, values, span) { |
17751 this.modifiers = modifiers; | 19299 this.modifiers = modifiers; |
17752 this.type = type; | 19300 this.type = type; |
17753 this.names = names; | 19301 this.names = names; |
17754 this.values = values; | 19302 this.values = values; |
17755 Definition.call(this, span); | 19303 Definition.call(this, span); |
17756 // Initializers done | 19304 // Initializers done |
17757 } | 19305 } |
17758 $inherits(VariableDefinition, Definition); | 19306 $inherits(VariableDefinition, Definition); |
17759 VariableDefinition.prototype.visit = function(visitor) { | 19307 VariableDefinition.prototype.visit = function(visitor) { |
17760 return visitor.visitVariableDefinition(this); | 19308 return visitor.visitVariableDefinition(this); |
17761 } | 19309 } |
| 19310 VariableDefinition.prototype.visit$1 = function($0) { |
| 19311 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19312 }; |
17762 // ********** Code for FunctionDefinition ************** | 19313 // ********** Code for FunctionDefinition ************** |
17763 function FunctionDefinition(modifiers, returnType, name, formals, initializers,
body, span) { | 19314 function FunctionDefinition(modifiers, returnType, name, formals, initializers,
body, span) { |
17764 this.modifiers = modifiers; | 19315 this.modifiers = modifiers; |
17765 this.returnType = returnType; | 19316 this.returnType = returnType; |
17766 this.name = name; | 19317 this.name = name; |
17767 this.formals = formals; | 19318 this.formals = formals; |
17768 this.initializers = initializers; | 19319 this.initializers = initializers; |
17769 this.body = body; | 19320 this.body = body; |
17770 Definition.call(this, span); | 19321 Definition.call(this, span); |
17771 // Initializers done | 19322 // Initializers done |
17772 } | 19323 } |
17773 $inherits(FunctionDefinition, Definition); | 19324 $inherits(FunctionDefinition, Definition); |
17774 FunctionDefinition.prototype.is$FunctionDefinition = function(){return this;}; | 19325 FunctionDefinition.prototype.is$FunctionDefinition = function(){return this;}; |
17775 FunctionDefinition.prototype.get$returnType = function() { return this.returnTyp
e; }; | 19326 FunctionDefinition.prototype.get$returnType = function() { return this.returnTyp
e; }; |
17776 FunctionDefinition.prototype.set$returnType = function(value) { return this.retu
rnType = value; }; | 19327 FunctionDefinition.prototype.set$returnType = function(value) { return this.retu
rnType = value; }; |
17777 FunctionDefinition.prototype.get$name = function() { return this.name; }; | 19328 FunctionDefinition.prototype.get$name = function() { return this.name; }; |
17778 FunctionDefinition.prototype.set$name = function(value) { return this.name = val
ue; }; | 19329 FunctionDefinition.prototype.set$name = function(value) { return this.name = val
ue; }; |
17779 FunctionDefinition.prototype.visit = function(visitor) { | 19330 FunctionDefinition.prototype.visit = function(visitor) { |
17780 return visitor.visitFunctionDefinition(this); | 19331 return visitor.visitFunctionDefinition(this); |
17781 } | 19332 } |
| 19333 FunctionDefinition.prototype.visit$1 = function($0) { |
| 19334 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19335 }; |
17782 // ********** Code for ReturnStatement ************** | 19336 // ********** Code for ReturnStatement ************** |
17783 function ReturnStatement(value, span) { | 19337 function ReturnStatement(value, span) { |
17784 this.value = value; | 19338 this.value = value; |
17785 lang_Statement.call(this, span); | 19339 lang_Statement.call(this, span); |
17786 // Initializers done | 19340 // Initializers done |
17787 } | 19341 } |
17788 $inherits(ReturnStatement, lang_Statement); | 19342 $inherits(ReturnStatement, lang_Statement); |
17789 ReturnStatement.prototype.get$value = function() { return this.value; }; | 19343 ReturnStatement.prototype.get$value = function() { return this.value; }; |
17790 ReturnStatement.prototype.set$value = function(value) { return this.value = valu
e; }; | 19344 ReturnStatement.prototype.set$value = function(value) { return this.value = valu
e; }; |
17791 ReturnStatement.prototype.visit = function(visitor) { | 19345 ReturnStatement.prototype.visit = function(visitor) { |
17792 return visitor.visitReturnStatement(this); | 19346 return visitor.visitReturnStatement(this); |
17793 } | 19347 } |
| 19348 ReturnStatement.prototype.visit$1 = function($0) { |
| 19349 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19350 }; |
17794 // ********** Code for ThrowStatement ************** | 19351 // ********** Code for ThrowStatement ************** |
17795 function ThrowStatement(value, span) { | 19352 function ThrowStatement(value, span) { |
17796 this.value = value; | 19353 this.value = value; |
17797 lang_Statement.call(this, span); | 19354 lang_Statement.call(this, span); |
17798 // Initializers done | 19355 // Initializers done |
17799 } | 19356 } |
17800 $inherits(ThrowStatement, lang_Statement); | 19357 $inherits(ThrowStatement, lang_Statement); |
17801 ThrowStatement.prototype.get$value = function() { return this.value; }; | 19358 ThrowStatement.prototype.get$value = function() { return this.value; }; |
17802 ThrowStatement.prototype.set$value = function(value) { return this.value = value
; }; | 19359 ThrowStatement.prototype.set$value = function(value) { return this.value = value
; }; |
17803 ThrowStatement.prototype.visit = function(visitor) { | 19360 ThrowStatement.prototype.visit = function(visitor) { |
17804 return visitor.visitThrowStatement(this); | 19361 return visitor.visitThrowStatement(this); |
17805 } | 19362 } |
| 19363 ThrowStatement.prototype.visit$1 = function($0) { |
| 19364 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19365 }; |
17806 // ********** Code for AssertStatement ************** | 19366 // ********** Code for AssertStatement ************** |
17807 function AssertStatement(test, span) { | 19367 function AssertStatement(test, span) { |
17808 this.test = test; | 19368 this.test = test; |
17809 lang_Statement.call(this, span); | 19369 lang_Statement.call(this, span); |
17810 // Initializers done | 19370 // Initializers done |
17811 } | 19371 } |
17812 $inherits(AssertStatement, lang_Statement); | 19372 $inherits(AssertStatement, lang_Statement); |
17813 AssertStatement.prototype.visit = function(visitor) { | 19373 AssertStatement.prototype.visit = function(visitor) { |
17814 return visitor.visitAssertStatement(this); | 19374 return visitor.visitAssertStatement(this); |
17815 } | 19375 } |
| 19376 AssertStatement.prototype.visit$1 = function($0) { |
| 19377 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19378 }; |
17816 // ********** Code for BreakStatement ************** | 19379 // ********** Code for BreakStatement ************** |
17817 function BreakStatement(label, span) { | 19380 function BreakStatement(label, span) { |
17818 this.label = label; | 19381 this.label = label; |
17819 lang_Statement.call(this, span); | 19382 lang_Statement.call(this, span); |
17820 // Initializers done | 19383 // Initializers done |
17821 } | 19384 } |
17822 $inherits(BreakStatement, lang_Statement); | 19385 $inherits(BreakStatement, lang_Statement); |
17823 BreakStatement.prototype.visit = function(visitor) { | 19386 BreakStatement.prototype.visit = function(visitor) { |
17824 return visitor.visitBreakStatement(this); | 19387 return visitor.visitBreakStatement(this); |
17825 } | 19388 } |
| 19389 BreakStatement.prototype.visit$1 = function($0) { |
| 19390 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19391 }; |
17826 // ********** Code for ContinueStatement ************** | 19392 // ********** Code for ContinueStatement ************** |
17827 function ContinueStatement(label, span) { | 19393 function ContinueStatement(label, span) { |
17828 this.label = label; | 19394 this.label = label; |
17829 lang_Statement.call(this, span); | 19395 lang_Statement.call(this, span); |
17830 // Initializers done | 19396 // Initializers done |
17831 } | 19397 } |
17832 $inherits(ContinueStatement, lang_Statement); | 19398 $inherits(ContinueStatement, lang_Statement); |
17833 ContinueStatement.prototype.visit = function(visitor) { | 19399 ContinueStatement.prototype.visit = function(visitor) { |
17834 return visitor.visitContinueStatement(this); | 19400 return visitor.visitContinueStatement(this); |
17835 } | 19401 } |
| 19402 ContinueStatement.prototype.visit$1 = function($0) { |
| 19403 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19404 }; |
17836 // ********** Code for IfStatement ************** | 19405 // ********** Code for IfStatement ************** |
17837 function IfStatement(test, trueBranch, falseBranch, span) { | 19406 function IfStatement(test, trueBranch, falseBranch, span) { |
17838 this.test = test; | 19407 this.test = test; |
17839 this.trueBranch = trueBranch; | 19408 this.trueBranch = trueBranch; |
17840 this.falseBranch = falseBranch; | 19409 this.falseBranch = falseBranch; |
17841 lang_Statement.call(this, span); | 19410 lang_Statement.call(this, span); |
17842 // Initializers done | 19411 // Initializers done |
17843 } | 19412 } |
17844 $inherits(IfStatement, lang_Statement); | 19413 $inherits(IfStatement, lang_Statement); |
17845 IfStatement.prototype.visit = function(visitor) { | 19414 IfStatement.prototype.visit = function(visitor) { |
17846 return visitor.visitIfStatement(this); | 19415 return visitor.visitIfStatement(this); |
17847 } | 19416 } |
| 19417 IfStatement.prototype.visit$1 = function($0) { |
| 19418 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19419 }; |
17848 // ********** Code for WhileStatement ************** | 19420 // ********** Code for WhileStatement ************** |
17849 function WhileStatement(test, body, span) { | 19421 function WhileStatement(test, body, span) { |
17850 this.test = test; | 19422 this.test = test; |
17851 this.body = body; | 19423 this.body = body; |
17852 lang_Statement.call(this, span); | 19424 lang_Statement.call(this, span); |
17853 // Initializers done | 19425 // Initializers done |
17854 } | 19426 } |
17855 $inherits(WhileStatement, lang_Statement); | 19427 $inherits(WhileStatement, lang_Statement); |
17856 WhileStatement.prototype.visit = function(visitor) { | 19428 WhileStatement.prototype.visit = function(visitor) { |
17857 return visitor.visitWhileStatement(this); | 19429 return visitor.visitWhileStatement(this); |
17858 } | 19430 } |
| 19431 WhileStatement.prototype.visit$1 = function($0) { |
| 19432 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19433 }; |
17859 // ********** Code for DoStatement ************** | 19434 // ********** Code for DoStatement ************** |
17860 function DoStatement(body, test, span) { | 19435 function DoStatement(body, test, span) { |
17861 this.body = body; | 19436 this.body = body; |
17862 this.test = test; | 19437 this.test = test; |
17863 lang_Statement.call(this, span); | 19438 lang_Statement.call(this, span); |
17864 // Initializers done | 19439 // Initializers done |
17865 } | 19440 } |
17866 $inherits(DoStatement, lang_Statement); | 19441 $inherits(DoStatement, lang_Statement); |
17867 DoStatement.prototype.visit = function(visitor) { | 19442 DoStatement.prototype.visit = function(visitor) { |
17868 return visitor.visitDoStatement(this); | 19443 return visitor.visitDoStatement(this); |
17869 } | 19444 } |
| 19445 DoStatement.prototype.visit$1 = function($0) { |
| 19446 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19447 }; |
17870 // ********** Code for ForStatement ************** | 19448 // ********** Code for ForStatement ************** |
17871 function ForStatement(init, test, step, body, span) { | 19449 function ForStatement(init, test, step, body, span) { |
17872 this.init = init; | 19450 this.init = init; |
17873 this.test = test; | 19451 this.test = test; |
17874 this.step = step; | 19452 this.step = step; |
17875 this.body = body; | 19453 this.body = body; |
17876 lang_Statement.call(this, span); | 19454 lang_Statement.call(this, span); |
17877 // Initializers done | 19455 // Initializers done |
17878 } | 19456 } |
17879 $inherits(ForStatement, lang_Statement); | 19457 $inherits(ForStatement, lang_Statement); |
17880 ForStatement.prototype.visit = function(visitor) { | 19458 ForStatement.prototype.visit = function(visitor) { |
17881 return visitor.visitForStatement(this); | 19459 return visitor.visitForStatement(this); |
17882 } | 19460 } |
| 19461 ForStatement.prototype.visit$1 = function($0) { |
| 19462 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19463 }; |
17883 // ********** Code for ForInStatement ************** | 19464 // ********** Code for ForInStatement ************** |
17884 function ForInStatement(item, list, body, span) { | 19465 function ForInStatement(item, list, body, span) { |
17885 this.item = item; | 19466 this.item = item; |
17886 this.list = list; | 19467 this.list = list; |
17887 this.body = body; | 19468 this.body = body; |
17888 lang_Statement.call(this, span); | 19469 lang_Statement.call(this, span); |
17889 // Initializers done | 19470 // Initializers done |
17890 } | 19471 } |
17891 $inherits(ForInStatement, lang_Statement); | 19472 $inherits(ForInStatement, lang_Statement); |
17892 ForInStatement.prototype.visit = function(visitor) { | 19473 ForInStatement.prototype.visit = function(visitor) { |
17893 return visitor.visitForInStatement(this); | 19474 return visitor.visitForInStatement(this); |
17894 } | 19475 } |
| 19476 ForInStatement.prototype.visit$1 = function($0) { |
| 19477 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19478 }; |
17895 // ********** Code for TryStatement ************** | 19479 // ********** Code for TryStatement ************** |
17896 function TryStatement(body, catches, finallyBlock, span) { | 19480 function TryStatement(body, catches, finallyBlock, span) { |
17897 this.body = body; | 19481 this.body = body; |
17898 this.catches = catches; | 19482 this.catches = catches; |
17899 this.finallyBlock = finallyBlock; | 19483 this.finallyBlock = finallyBlock; |
17900 lang_Statement.call(this, span); | 19484 lang_Statement.call(this, span); |
17901 // Initializers done | 19485 // Initializers done |
17902 } | 19486 } |
17903 $inherits(TryStatement, lang_Statement); | 19487 $inherits(TryStatement, lang_Statement); |
17904 TryStatement.prototype.visit = function(visitor) { | 19488 TryStatement.prototype.visit = function(visitor) { |
17905 return visitor.visitTryStatement(this); | 19489 return visitor.visitTryStatement(this); |
17906 } | 19490 } |
| 19491 TryStatement.prototype.visit$1 = function($0) { |
| 19492 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19493 }; |
17907 // ********** Code for SwitchStatement ************** | 19494 // ********** Code for SwitchStatement ************** |
17908 function SwitchStatement(test, cases, span) { | 19495 function SwitchStatement(test, cases, span) { |
17909 this.test = test; | 19496 this.test = test; |
17910 this.cases = cases; | 19497 this.cases = cases; |
17911 lang_Statement.call(this, span); | 19498 lang_Statement.call(this, span); |
17912 // Initializers done | 19499 // Initializers done |
17913 } | 19500 } |
17914 $inherits(SwitchStatement, lang_Statement); | 19501 $inherits(SwitchStatement, lang_Statement); |
17915 SwitchStatement.prototype.visit = function(visitor) { | 19502 SwitchStatement.prototype.visit = function(visitor) { |
17916 return visitor.visitSwitchStatement(this); | 19503 return visitor.visitSwitchStatement(this); |
17917 } | 19504 } |
| 19505 SwitchStatement.prototype.visit$1 = function($0) { |
| 19506 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19507 }; |
17918 // ********** Code for BlockStatement ************** | 19508 // ********** Code for BlockStatement ************** |
17919 function BlockStatement(body, span) { | 19509 function BlockStatement(body, span) { |
17920 this.body = body; | 19510 this.body = body; |
17921 lang_Statement.call(this, span); | 19511 lang_Statement.call(this, span); |
17922 // Initializers done | 19512 // Initializers done |
17923 } | 19513 } |
17924 $inherits(BlockStatement, lang_Statement); | 19514 $inherits(BlockStatement, lang_Statement); |
17925 BlockStatement.prototype.is$BlockStatement = function(){return this;}; | 19515 BlockStatement.prototype.is$BlockStatement = function(){return this;}; |
17926 BlockStatement.prototype.visit = function(visitor) { | 19516 BlockStatement.prototype.visit = function(visitor) { |
17927 return visitor.visitBlockStatement(this); | 19517 return visitor.visitBlockStatement(this); |
17928 } | 19518 } |
| 19519 BlockStatement.prototype.visit$1 = function($0) { |
| 19520 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19521 }; |
17929 // ********** Code for LabeledStatement ************** | 19522 // ********** Code for LabeledStatement ************** |
17930 function LabeledStatement(name, body, span) { | 19523 function LabeledStatement(name, body, span) { |
17931 this.name = name; | 19524 this.name = name; |
17932 this.body = body; | 19525 this.body = body; |
17933 lang_Statement.call(this, span); | 19526 lang_Statement.call(this, span); |
17934 // Initializers done | 19527 // Initializers done |
17935 } | 19528 } |
17936 $inherits(LabeledStatement, lang_Statement); | 19529 $inherits(LabeledStatement, lang_Statement); |
17937 LabeledStatement.prototype.get$name = function() { return this.name; }; | 19530 LabeledStatement.prototype.get$name = function() { return this.name; }; |
17938 LabeledStatement.prototype.set$name = function(value) { return this.name = value
; }; | 19531 LabeledStatement.prototype.set$name = function(value) { return this.name = value
; }; |
17939 LabeledStatement.prototype.visit = function(visitor) { | 19532 LabeledStatement.prototype.visit = function(visitor) { |
17940 return visitor.visitLabeledStatement(this); | 19533 return visitor.visitLabeledStatement(this); |
17941 } | 19534 } |
| 19535 LabeledStatement.prototype.visit$1 = function($0) { |
| 19536 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19537 }; |
17942 // ********** Code for lang_ExpressionStatement ************** | 19538 // ********** Code for lang_ExpressionStatement ************** |
17943 function lang_ExpressionStatement(body, span) { | 19539 function lang_ExpressionStatement(body, span) { |
17944 this.body = body; | 19540 this.body = body; |
17945 lang_Statement.call(this, span); | 19541 lang_Statement.call(this, span); |
17946 // Initializers done | 19542 // Initializers done |
17947 } | 19543 } |
17948 $inherits(lang_ExpressionStatement, lang_Statement); | 19544 $inherits(lang_ExpressionStatement, lang_Statement); |
17949 lang_ExpressionStatement.prototype.visit = function(visitor) { | 19545 lang_ExpressionStatement.prototype.visit = function(visitor) { |
17950 return visitor.visitExpressionStatement(this); | 19546 return visitor.visitExpressionStatement(this); |
17951 } | 19547 } |
| 19548 lang_ExpressionStatement.prototype.visit$1 = function($0) { |
| 19549 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19550 }; |
17952 // ********** Code for EmptyStatement ************** | 19551 // ********** Code for EmptyStatement ************** |
17953 function EmptyStatement(span) { | 19552 function EmptyStatement(span) { |
17954 lang_Statement.call(this, span); | 19553 lang_Statement.call(this, span); |
17955 // Initializers done | 19554 // Initializers done |
17956 } | 19555 } |
17957 $inherits(EmptyStatement, lang_Statement); | 19556 $inherits(EmptyStatement, lang_Statement); |
17958 EmptyStatement.prototype.visit = function(visitor) { | 19557 EmptyStatement.prototype.visit = function(visitor) { |
17959 return visitor.visitEmptyStatement(this); | 19558 return visitor.visitEmptyStatement(this); |
17960 } | 19559 } |
| 19560 EmptyStatement.prototype.visit$1 = function($0) { |
| 19561 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19562 }; |
17961 // ********** Code for DietStatement ************** | 19563 // ********** Code for DietStatement ************** |
17962 function DietStatement(span) { | 19564 function DietStatement(span) { |
17963 lang_Statement.call(this, span); | 19565 lang_Statement.call(this, span); |
17964 // Initializers done | 19566 // Initializers done |
17965 } | 19567 } |
17966 $inherits(DietStatement, lang_Statement); | 19568 $inherits(DietStatement, lang_Statement); |
17967 DietStatement.prototype.visit = function(visitor) { | 19569 DietStatement.prototype.visit = function(visitor) { |
17968 return visitor.visitDietStatement(this); | 19570 return visitor.visitDietStatement(this); |
17969 } | 19571 } |
| 19572 DietStatement.prototype.visit$1 = function($0) { |
| 19573 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19574 }; |
17970 // ********** Code for NativeStatement ************** | 19575 // ********** Code for NativeStatement ************** |
17971 function NativeStatement(body, span) { | 19576 function NativeStatement(body, span) { |
17972 this.body = body; | 19577 this.body = body; |
17973 lang_Statement.call(this, span); | 19578 lang_Statement.call(this, span); |
17974 // Initializers done | 19579 // Initializers done |
17975 } | 19580 } |
17976 $inherits(NativeStatement, lang_Statement); | 19581 $inherits(NativeStatement, lang_Statement); |
17977 NativeStatement.prototype.visit = function(visitor) { | 19582 NativeStatement.prototype.visit = function(visitor) { |
17978 return visitor.visitNativeStatement(this); | 19583 return visitor.visitNativeStatement(this); |
17979 } | 19584 } |
| 19585 NativeStatement.prototype.visit$1 = function($0) { |
| 19586 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19587 }; |
17980 // ********** Code for LambdaExpression ************** | 19588 // ********** Code for LambdaExpression ************** |
17981 function LambdaExpression(func, span) { | 19589 function LambdaExpression(func, span) { |
17982 this.func = func; | 19590 this.func = func; |
17983 lang_Expression.call(this, span); | 19591 lang_Expression.call(this, span); |
17984 // Initializers done | 19592 // Initializers done |
17985 } | 19593 } |
17986 $inherits(LambdaExpression, lang_Expression); | 19594 $inherits(LambdaExpression, lang_Expression); |
| 19595 LambdaExpression.prototype.is$LambdaExpression = function(){return this;}; |
17987 LambdaExpression.prototype.visit = function(visitor) { | 19596 LambdaExpression.prototype.visit = function(visitor) { |
17988 return visitor.visitLambdaExpression(this); | 19597 return visitor.visitLambdaExpression(this); |
17989 } | 19598 } |
| 19599 LambdaExpression.prototype.visit$1 = function($0) { |
| 19600 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19601 }; |
17990 // ********** Code for CallExpression ************** | 19602 // ********** Code for CallExpression ************** |
17991 function CallExpression(target, arguments, span) { | 19603 function CallExpression(target, arguments, span) { |
17992 this.target = target; | 19604 this.target = target; |
17993 this.arguments = arguments; | 19605 this.arguments = arguments; |
17994 lang_Expression.call(this, span); | 19606 lang_Expression.call(this, span); |
17995 // Initializers done | 19607 // Initializers done |
17996 } | 19608 } |
17997 $inherits(CallExpression, lang_Expression); | 19609 $inherits(CallExpression, lang_Expression); |
17998 CallExpression.prototype.is$CallExpression = function(){return this;}; | 19610 CallExpression.prototype.is$CallExpression = function(){return this;}; |
17999 CallExpression.prototype.get$arguments = function() { return this.arguments; }; | 19611 CallExpression.prototype.get$arguments = function() { return this.arguments; }; |
18000 CallExpression.prototype.set$arguments = function(value) { return this.arguments
= value; }; | 19612 CallExpression.prototype.set$arguments = function(value) { return this.arguments
= value; }; |
18001 CallExpression.prototype.visit = function(visitor) { | 19613 CallExpression.prototype.visit = function(visitor) { |
18002 return visitor.visitCallExpression(this); | 19614 return visitor.visitCallExpression(this); |
18003 } | 19615 } |
| 19616 CallExpression.prototype.visit$1 = function($0) { |
| 19617 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19618 }; |
18004 // ********** Code for IndexExpression ************** | 19619 // ********** Code for IndexExpression ************** |
18005 function IndexExpression(target, index, span) { | 19620 function IndexExpression(target, index, span) { |
18006 this.target = target; | 19621 this.target = target; |
18007 this.index = index; | 19622 this.index = index; |
18008 lang_Expression.call(this, span); | 19623 lang_Expression.call(this, span); |
18009 // Initializers done | 19624 // Initializers done |
18010 } | 19625 } |
18011 $inherits(IndexExpression, lang_Expression); | 19626 $inherits(IndexExpression, lang_Expression); |
18012 IndexExpression.prototype.is$IndexExpression = function(){return this;}; | 19627 IndexExpression.prototype.is$IndexExpression = function(){return this;}; |
18013 IndexExpression.prototype.visit = function(visitor) { | 19628 IndexExpression.prototype.visit = function(visitor) { |
18014 return visitor.visitIndexExpression(this); | 19629 return visitor.visitIndexExpression(this); |
18015 } | 19630 } |
| 19631 IndexExpression.prototype.visit$1 = function($0) { |
| 19632 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19633 }; |
18016 // ********** Code for BinaryExpression ************** | 19634 // ********** Code for BinaryExpression ************** |
18017 function BinaryExpression(op, x, y, span) { | 19635 function BinaryExpression(op, x, y, span) { |
18018 this.op = op; | 19636 this.op = op; |
18019 this.x = x; | 19637 this.x = x; |
18020 this.y = y; | 19638 this.y = y; |
18021 lang_Expression.call(this, span); | 19639 lang_Expression.call(this, span); |
18022 // Initializers done | 19640 // Initializers done |
18023 } | 19641 } |
18024 $inherits(BinaryExpression, lang_Expression); | 19642 $inherits(BinaryExpression, lang_Expression); |
18025 BinaryExpression.prototype.is$BinaryExpression = function(){return this;}; | 19643 BinaryExpression.prototype.is$BinaryExpression = function(){return this;}; |
18026 BinaryExpression.prototype.visit = function(visitor) { | 19644 BinaryExpression.prototype.visit = function(visitor) { |
18027 return visitor.visitBinaryExpression(this); | 19645 return visitor.visitBinaryExpression(this); |
18028 } | 19646 } |
| 19647 BinaryExpression.prototype.visit$1 = function($0) { |
| 19648 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19649 }; |
18029 // ********** Code for UnaryExpression ************** | 19650 // ********** Code for UnaryExpression ************** |
18030 function UnaryExpression(op, self, span) { | 19651 function UnaryExpression(op, self, span) { |
18031 this.op = op; | 19652 this.op = op; |
18032 this.self = self; | 19653 this.self = self; |
18033 lang_Expression.call(this, span); | 19654 lang_Expression.call(this, span); |
18034 // Initializers done | 19655 // Initializers done |
18035 } | 19656 } |
18036 $inherits(UnaryExpression, lang_Expression); | 19657 $inherits(UnaryExpression, lang_Expression); |
18037 UnaryExpression.prototype.visit = function(visitor) { | 19658 UnaryExpression.prototype.visit = function(visitor) { |
18038 return visitor.visitUnaryExpression(this); | 19659 return visitor.visitUnaryExpression(this); |
18039 } | 19660 } |
| 19661 UnaryExpression.prototype.visit$1 = function($0) { |
| 19662 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19663 }; |
18040 // ********** Code for PostfixExpression ************** | 19664 // ********** Code for PostfixExpression ************** |
18041 function PostfixExpression(body, op, span) { | 19665 function PostfixExpression(body, op, span) { |
18042 this.body = body; | 19666 this.body = body; |
18043 this.op = op; | 19667 this.op = op; |
18044 lang_Expression.call(this, span); | 19668 lang_Expression.call(this, span); |
18045 // Initializers done | 19669 // Initializers done |
18046 } | 19670 } |
18047 $inherits(PostfixExpression, lang_Expression); | 19671 $inherits(PostfixExpression, lang_Expression); |
18048 PostfixExpression.prototype.is$PostfixExpression = function(){return this;}; | 19672 PostfixExpression.prototype.is$PostfixExpression = function(){return this;}; |
18049 PostfixExpression.prototype.visit = function(visitor) { | 19673 PostfixExpression.prototype.visit = function(visitor) { |
18050 return visitor.visitPostfixExpression$1(this); | 19674 return visitor.visitPostfixExpression$1(this); |
18051 } | 19675 } |
| 19676 PostfixExpression.prototype.visit$1 = function($0) { |
| 19677 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19678 }; |
18052 // ********** Code for lang_NewExpression ************** | 19679 // ********** Code for lang_NewExpression ************** |
18053 function lang_NewExpression(isConst, type, name, arguments, span) { | 19680 function lang_NewExpression(isConst, type, name, arguments, span) { |
18054 this.isConst = isConst; | 19681 this.isConst = isConst; |
18055 this.type = type; | 19682 this.type = type; |
18056 this.name = name; | 19683 this.name = name; |
18057 this.arguments = arguments; | 19684 this.arguments = arguments; |
18058 lang_Expression.call(this, span); | 19685 lang_Expression.call(this, span); |
18059 // Initializers done | 19686 // Initializers done |
18060 } | 19687 } |
18061 $inherits(lang_NewExpression, lang_Expression); | 19688 $inherits(lang_NewExpression, lang_Expression); |
18062 lang_NewExpression.prototype.get$isConst = function() { return this.isConst; }; | 19689 lang_NewExpression.prototype.get$isConst = function() { return this.isConst; }; |
18063 lang_NewExpression.prototype.set$isConst = function(value) { return this.isConst
= value; }; | 19690 lang_NewExpression.prototype.set$isConst = function(value) { return this.isConst
= value; }; |
18064 lang_NewExpression.prototype.get$name = function() { return this.name; }; | 19691 lang_NewExpression.prototype.get$name = function() { return this.name; }; |
18065 lang_NewExpression.prototype.set$name = function(value) { return this.name = val
ue; }; | 19692 lang_NewExpression.prototype.set$name = function(value) { return this.name = val
ue; }; |
18066 lang_NewExpression.prototype.get$arguments = function() { return this.arguments;
}; | 19693 lang_NewExpression.prototype.get$arguments = function() { return this.arguments;
}; |
18067 lang_NewExpression.prototype.set$arguments = function(value) { return this.argum
ents = value; }; | 19694 lang_NewExpression.prototype.set$arguments = function(value) { return this.argum
ents = value; }; |
18068 lang_NewExpression.prototype.visit = function(visitor) { | 19695 lang_NewExpression.prototype.visit = function(visitor) { |
18069 return visitor.visitNewExpression(this); | 19696 return visitor.visitNewExpression(this); |
18070 } | 19697 } |
| 19698 lang_NewExpression.prototype.visit$1 = function($0) { |
| 19699 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19700 }; |
18071 // ********** Code for ListExpression ************** | 19701 // ********** Code for ListExpression ************** |
18072 function ListExpression(isConst, type, values, span) { | 19702 function ListExpression(isConst, type, values, span) { |
18073 this.isConst = isConst; | 19703 this.isConst = isConst; |
18074 this.type = type; | 19704 this.type = type; |
18075 this.values = values; | 19705 this.values = values; |
18076 lang_Expression.call(this, span); | 19706 lang_Expression.call(this, span); |
18077 // Initializers done | 19707 // Initializers done |
18078 } | 19708 } |
18079 $inherits(ListExpression, lang_Expression); | 19709 $inherits(ListExpression, lang_Expression); |
18080 ListExpression.prototype.get$isConst = function() { return this.isConst; }; | 19710 ListExpression.prototype.get$isConst = function() { return this.isConst; }; |
18081 ListExpression.prototype.set$isConst = function(value) { return this.isConst = v
alue; }; | 19711 ListExpression.prototype.set$isConst = function(value) { return this.isConst = v
alue; }; |
18082 ListExpression.prototype.visit = function(visitor) { | 19712 ListExpression.prototype.visit = function(visitor) { |
18083 return visitor.visitListExpression(this); | 19713 return visitor.visitListExpression(this); |
18084 } | 19714 } |
| 19715 ListExpression.prototype.visit$1 = function($0) { |
| 19716 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19717 }; |
18085 // ********** Code for MapExpression ************** | 19718 // ********** Code for MapExpression ************** |
18086 function MapExpression(isConst, type, items, span) { | 19719 function MapExpression(isConst, type, items, span) { |
18087 this.isConst = isConst; | 19720 this.isConst = isConst; |
18088 this.type = type; | 19721 this.type = type; |
18089 this.items = items; | 19722 this.items = items; |
18090 lang_Expression.call(this, span); | 19723 lang_Expression.call(this, span); |
18091 // Initializers done | 19724 // Initializers done |
18092 } | 19725 } |
18093 $inherits(MapExpression, lang_Expression); | 19726 $inherits(MapExpression, lang_Expression); |
18094 MapExpression.prototype.get$isConst = function() { return this.isConst; }; | 19727 MapExpression.prototype.get$isConst = function() { return this.isConst; }; |
18095 MapExpression.prototype.set$isConst = function(value) { return this.isConst = va
lue; }; | 19728 MapExpression.prototype.set$isConst = function(value) { return this.isConst = va
lue; }; |
18096 MapExpression.prototype.visit = function(visitor) { | 19729 MapExpression.prototype.visit = function(visitor) { |
18097 return visitor.visitMapExpression(this); | 19730 return visitor.visitMapExpression(this); |
18098 } | 19731 } |
| 19732 MapExpression.prototype.visit$1 = function($0) { |
| 19733 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19734 }; |
18099 // ********** Code for ConditionalExpression ************** | 19735 // ********** Code for ConditionalExpression ************** |
18100 function ConditionalExpression(test, trueBranch, falseBranch, span) { | 19736 function ConditionalExpression(test, trueBranch, falseBranch, span) { |
18101 this.test = test; | 19737 this.test = test; |
18102 this.trueBranch = trueBranch; | 19738 this.trueBranch = trueBranch; |
18103 this.falseBranch = falseBranch; | 19739 this.falseBranch = falseBranch; |
18104 lang_Expression.call(this, span); | 19740 lang_Expression.call(this, span); |
18105 // Initializers done | 19741 // Initializers done |
18106 } | 19742 } |
18107 $inherits(ConditionalExpression, lang_Expression); | 19743 $inherits(ConditionalExpression, lang_Expression); |
18108 ConditionalExpression.prototype.visit = function(visitor) { | 19744 ConditionalExpression.prototype.visit = function(visitor) { |
18109 return visitor.visitConditionalExpression(this); | 19745 return visitor.visitConditionalExpression(this); |
18110 } | 19746 } |
| 19747 ConditionalExpression.prototype.visit$1 = function($0) { |
| 19748 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19749 }; |
18111 // ********** Code for IsExpression ************** | 19750 // ********** Code for IsExpression ************** |
18112 function IsExpression(isTrue, x, type, span) { | 19751 function IsExpression(isTrue, x, type, span) { |
18113 this.isTrue = isTrue; | 19752 this.isTrue = isTrue; |
18114 this.x = x; | 19753 this.x = x; |
18115 this.type = type; | 19754 this.type = type; |
18116 lang_Expression.call(this, span); | 19755 lang_Expression.call(this, span); |
18117 // Initializers done | 19756 // Initializers done |
18118 } | 19757 } |
18119 $inherits(IsExpression, lang_Expression); | 19758 $inherits(IsExpression, lang_Expression); |
18120 IsExpression.prototype.visit = function(visitor) { | 19759 IsExpression.prototype.visit = function(visitor) { |
18121 return visitor.visitIsExpression(this); | 19760 return visitor.visitIsExpression(this); |
18122 } | 19761 } |
| 19762 IsExpression.prototype.visit$1 = function($0) { |
| 19763 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19764 }; |
18123 // ********** Code for ParenExpression ************** | 19765 // ********** Code for ParenExpression ************** |
18124 function ParenExpression(body, span) { | 19766 function ParenExpression(body, span) { |
18125 this.body = body; | 19767 this.body = body; |
18126 lang_Expression.call(this, span); | 19768 lang_Expression.call(this, span); |
18127 // Initializers done | 19769 // Initializers done |
18128 } | 19770 } |
18129 $inherits(ParenExpression, lang_Expression); | 19771 $inherits(ParenExpression, lang_Expression); |
18130 ParenExpression.prototype.visit = function(visitor) { | 19772 ParenExpression.prototype.visit = function(visitor) { |
18131 return visitor.visitParenExpression(this); | 19773 return visitor.visitParenExpression(this); |
18132 } | 19774 } |
| 19775 ParenExpression.prototype.visit$1 = function($0) { |
| 19776 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19777 }; |
18133 // ********** Code for DotExpression ************** | 19778 // ********** Code for DotExpression ************** |
18134 function DotExpression(self, name, span) { | 19779 function DotExpression(self, name, span) { |
18135 this.self = self; | 19780 this.self = self; |
18136 this.name = name; | 19781 this.name = name; |
18137 lang_Expression.call(this, span); | 19782 lang_Expression.call(this, span); |
18138 // Initializers done | 19783 // Initializers done |
18139 } | 19784 } |
18140 $inherits(DotExpression, lang_Expression); | 19785 $inherits(DotExpression, lang_Expression); |
18141 DotExpression.prototype.is$DotExpression = function(){return this;}; | 19786 DotExpression.prototype.is$DotExpression = function(){return this;}; |
18142 DotExpression.prototype.get$name = function() { return this.name; }; | 19787 DotExpression.prototype.get$name = function() { return this.name; }; |
18143 DotExpression.prototype.set$name = function(value) { return this.name = value; }
; | 19788 DotExpression.prototype.set$name = function(value) { return this.name = value; }
; |
18144 DotExpression.prototype.visit = function(visitor) { | 19789 DotExpression.prototype.visit = function(visitor) { |
18145 return visitor.visitDotExpression(this); | 19790 return visitor.visitDotExpression(this); |
18146 } | 19791 } |
| 19792 DotExpression.prototype.visit$1 = function($0) { |
| 19793 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19794 }; |
18147 // ********** Code for VarExpression ************** | 19795 // ********** Code for VarExpression ************** |
18148 function VarExpression(name, span) { | 19796 function VarExpression(name, span) { |
18149 this.name = name; | 19797 this.name = name; |
18150 lang_Expression.call(this, span); | 19798 lang_Expression.call(this, span); |
18151 // Initializers done | 19799 // Initializers done |
18152 } | 19800 } |
18153 $inherits(VarExpression, lang_Expression); | 19801 $inherits(VarExpression, lang_Expression); |
18154 VarExpression.prototype.is$VarExpression = function(){return this;}; | 19802 VarExpression.prototype.is$VarExpression = function(){return this;}; |
18155 VarExpression.prototype.get$name = function() { return this.name; }; | 19803 VarExpression.prototype.get$name = function() { return this.name; }; |
18156 VarExpression.prototype.set$name = function(value) { return this.name = value; }
; | 19804 VarExpression.prototype.set$name = function(value) { return this.name = value; }
; |
18157 VarExpression.prototype.visit = function(visitor) { | 19805 VarExpression.prototype.visit = function(visitor) { |
18158 return visitor.visitVarExpression(this); | 19806 return visitor.visitVarExpression(this); |
18159 } | 19807 } |
| 19808 VarExpression.prototype.visit$1 = function($0) { |
| 19809 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19810 }; |
18160 // ********** Code for ThisExpression ************** | 19811 // ********** Code for ThisExpression ************** |
18161 function ThisExpression(span) { | 19812 function ThisExpression(span) { |
18162 lang_Expression.call(this, span); | 19813 lang_Expression.call(this, span); |
18163 // Initializers done | 19814 // Initializers done |
18164 } | 19815 } |
18165 $inherits(ThisExpression, lang_Expression); | 19816 $inherits(ThisExpression, lang_Expression); |
18166 ThisExpression.prototype.visit = function(visitor) { | 19817 ThisExpression.prototype.visit = function(visitor) { |
18167 return visitor.visitThisExpression(this); | 19818 return visitor.visitThisExpression(this); |
18168 } | 19819 } |
| 19820 ThisExpression.prototype.visit$1 = function($0) { |
| 19821 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19822 }; |
18169 // ********** Code for SuperExpression ************** | 19823 // ********** Code for SuperExpression ************** |
18170 function SuperExpression(span) { | 19824 function SuperExpression(span) { |
18171 lang_Expression.call(this, span); | 19825 lang_Expression.call(this, span); |
18172 // Initializers done | 19826 // Initializers done |
18173 } | 19827 } |
18174 $inherits(SuperExpression, lang_Expression); | 19828 $inherits(SuperExpression, lang_Expression); |
18175 SuperExpression.prototype.visit = function(visitor) { | 19829 SuperExpression.prototype.visit = function(visitor) { |
18176 return visitor.visitSuperExpression(this); | 19830 return visitor.visitSuperExpression(this); |
18177 } | 19831 } |
| 19832 SuperExpression.prototype.visit$1 = function($0) { |
| 19833 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19834 }; |
18178 // ********** Code for NullExpression ************** | 19835 // ********** Code for NullExpression ************** |
18179 function NullExpression(span) { | 19836 function NullExpression(span) { |
18180 lang_Expression.call(this, span); | 19837 lang_Expression.call(this, span); |
18181 // Initializers done | 19838 // Initializers done |
18182 } | 19839 } |
18183 $inherits(NullExpression, lang_Expression); | 19840 $inherits(NullExpression, lang_Expression); |
18184 NullExpression.prototype.visit = function(visitor) { | 19841 NullExpression.prototype.visit = function(visitor) { |
18185 return visitor.visitNullExpression(this); | 19842 return visitor.visitNullExpression(this); |
18186 } | 19843 } |
| 19844 NullExpression.prototype.visit$1 = function($0) { |
| 19845 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19846 }; |
18187 // ********** Code for LiteralExpression ************** | 19847 // ********** Code for LiteralExpression ************** |
18188 function LiteralExpression(value, type, text, span) { | 19848 function LiteralExpression(value, type, text, span) { |
18189 this.value = value; | 19849 this.value = value; |
18190 this.type = type; | 19850 this.type = type; |
18191 this.text = text; | 19851 this.text = text; |
18192 lang_Expression.call(this, span); | 19852 lang_Expression.call(this, span); |
18193 // Initializers done | 19853 // Initializers done |
18194 } | 19854 } |
18195 $inherits(LiteralExpression, lang_Expression); | 19855 $inherits(LiteralExpression, lang_Expression); |
18196 LiteralExpression.prototype.get$value = function() { return this.value; }; | 19856 LiteralExpression.prototype.get$value = function() { return this.value; }; |
18197 LiteralExpression.prototype.set$value = function(value) { return this.value = va
lue; }; | 19857 LiteralExpression.prototype.set$value = function(value) { return this.value = va
lue; }; |
18198 LiteralExpression.prototype.get$text = function() { return this.text; }; | 19858 LiteralExpression.prototype.get$text = function() { return this.text; }; |
18199 LiteralExpression.prototype.set$text = function(value) { return this.text = valu
e; }; | 19859 LiteralExpression.prototype.set$text = function(value) { return this.text = valu
e; }; |
18200 LiteralExpression.prototype.visit = function(visitor) { | 19860 LiteralExpression.prototype.visit = function(visitor) { |
18201 return visitor.visitLiteralExpression(this); | 19861 return visitor.visitLiteralExpression(this); |
18202 } | 19862 } |
| 19863 LiteralExpression.prototype.visit$1 = function($0) { |
| 19864 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19865 }; |
18203 // ********** Code for NameTypeReference ************** | 19866 // ********** Code for NameTypeReference ************** |
18204 function NameTypeReference(isFinal, name, names, span) { | 19867 function NameTypeReference(isFinal, name, names, span) { |
18205 this.isFinal = isFinal; | 19868 this.isFinal = isFinal; |
18206 this.name = name; | 19869 this.name = name; |
18207 this.names = names; | 19870 this.names = names; |
18208 TypeReference.call(this, span); | 19871 TypeReference.call(this, span); |
18209 // Initializers done | 19872 // Initializers done |
18210 } | 19873 } |
18211 $inherits(NameTypeReference, TypeReference); | 19874 $inherits(NameTypeReference, TypeReference); |
18212 NameTypeReference.prototype.is$NameTypeReference = function(){return this;}; | 19875 NameTypeReference.prototype.is$NameTypeReference = function(){return this;}; |
18213 NameTypeReference.prototype.get$name = function() { return this.name; }; | 19876 NameTypeReference.prototype.get$name = function() { return this.name; }; |
18214 NameTypeReference.prototype.set$name = function(value) { return this.name = valu
e; }; | 19877 NameTypeReference.prototype.set$name = function(value) { return this.name = valu
e; }; |
18215 NameTypeReference.prototype.visit = function(visitor) { | 19878 NameTypeReference.prototype.visit = function(visitor) { |
18216 return visitor.visitNameTypeReference(this); | 19879 return visitor.visitNameTypeReference(this); |
18217 } | 19880 } |
| 19881 NameTypeReference.prototype.visit$1 = function($0) { |
| 19882 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19883 }; |
18218 // ********** Code for GenericTypeReference ************** | 19884 // ********** Code for GenericTypeReference ************** |
18219 function GenericTypeReference(baseType, typeArguments, depth, span) { | 19885 function GenericTypeReference(baseType, typeArguments, depth, span) { |
18220 this.baseType = baseType; | 19886 this.baseType = baseType; |
18221 this.typeArguments = typeArguments; | 19887 this.typeArguments = typeArguments; |
18222 this.depth = depth; | 19888 this.depth = depth; |
18223 TypeReference.call(this, span); | 19889 TypeReference.call(this, span); |
18224 // Initializers done | 19890 // Initializers done |
18225 } | 19891 } |
18226 $inherits(GenericTypeReference, TypeReference); | 19892 $inherits(GenericTypeReference, TypeReference); |
18227 GenericTypeReference.prototype.is$GenericTypeReference = function(){return this;
}; | 19893 GenericTypeReference.prototype.is$GenericTypeReference = function(){return this;
}; |
18228 GenericTypeReference.prototype.visit = function(visitor) { | 19894 GenericTypeReference.prototype.visit = function(visitor) { |
18229 return visitor.visitGenericTypeReference(this); | 19895 return visitor.visitGenericTypeReference(this); |
18230 } | 19896 } |
| 19897 GenericTypeReference.prototype.visit$1 = function($0) { |
| 19898 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19899 }; |
18231 // ********** Code for FunctionTypeReference ************** | 19900 // ********** Code for FunctionTypeReference ************** |
18232 function FunctionTypeReference(isFinal, func, span) { | 19901 function FunctionTypeReference(isFinal, func, span) { |
18233 this.isFinal = isFinal; | 19902 this.isFinal = isFinal; |
18234 this.func = func; | 19903 this.func = func; |
18235 TypeReference.call(this, span); | 19904 TypeReference.call(this, span); |
18236 // Initializers done | 19905 // Initializers done |
18237 } | 19906 } |
18238 $inherits(FunctionTypeReference, TypeReference); | 19907 $inherits(FunctionTypeReference, TypeReference); |
18239 FunctionTypeReference.prototype.is$FunctionTypeReference = function(){return thi
s;}; | 19908 FunctionTypeReference.prototype.is$FunctionTypeReference = function(){return thi
s;}; |
18240 FunctionTypeReference.prototype.visit = function(visitor) { | 19909 FunctionTypeReference.prototype.visit = function(visitor) { |
18241 return visitor.visitFunctionTypeReference(this); | 19910 return visitor.visitFunctionTypeReference(this); |
18242 } | 19911 } |
| 19912 FunctionTypeReference.prototype.visit$1 = function($0) { |
| 19913 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19914 }; |
18243 // ********** Code for ArgumentNode ************** | 19915 // ********** Code for ArgumentNode ************** |
18244 function ArgumentNode(label, value, span) { | 19916 function ArgumentNode(label, value, span) { |
18245 this.label = label; | 19917 this.label = label; |
18246 this.value = value; | 19918 this.value = value; |
18247 lang_Node.call(this, span); | 19919 lang_Node.call(this, span); |
18248 // Initializers done | 19920 // Initializers done |
18249 } | 19921 } |
18250 $inherits(ArgumentNode, lang_Node); | 19922 $inherits(ArgumentNode, lang_Node); |
18251 ArgumentNode.prototype.is$ArgumentNode = function(){return this;}; | 19923 ArgumentNode.prototype.is$ArgumentNode = function(){return this;}; |
18252 ArgumentNode.prototype.get$value = function() { return this.value; }; | 19924 ArgumentNode.prototype.get$value = function() { return this.value; }; |
18253 ArgumentNode.prototype.set$value = function(value) { return this.value = value;
}; | 19925 ArgumentNode.prototype.set$value = function(value) { return this.value = value;
}; |
18254 ArgumentNode.prototype.visit = function(visitor) { | 19926 ArgumentNode.prototype.visit = function(visitor) { |
18255 return visitor.visitArgumentNode(this); | 19927 return visitor.visitArgumentNode(this); |
18256 } | 19928 } |
| 19929 ArgumentNode.prototype.visit$1 = function($0) { |
| 19930 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19931 }; |
18257 // ********** Code for FormalNode ************** | 19932 // ********** Code for FormalNode ************** |
18258 function FormalNode(isThis, isRest, type, name, value, span) { | 19933 function FormalNode(isThis, isRest, type, name, value, span) { |
18259 this.isThis = isThis; | 19934 this.isThis = isThis; |
18260 this.isRest = isRest; | 19935 this.isRest = isRest; |
18261 this.type = type; | 19936 this.type = type; |
18262 this.name = name; | 19937 this.name = name; |
18263 this.value = value; | 19938 this.value = value; |
18264 lang_Node.call(this, span); | 19939 lang_Node.call(this, span); |
18265 // Initializers done | 19940 // Initializers done |
18266 } | 19941 } |
18267 $inherits(FormalNode, lang_Node); | 19942 $inherits(FormalNode, lang_Node); |
18268 FormalNode.prototype.get$name = function() { return this.name; }; | 19943 FormalNode.prototype.get$name = function() { return this.name; }; |
18269 FormalNode.prototype.set$name = function(value) { return this.name = value; }; | 19944 FormalNode.prototype.set$name = function(value) { return this.name = value; }; |
18270 FormalNode.prototype.get$value = function() { return this.value; }; | 19945 FormalNode.prototype.get$value = function() { return this.value; }; |
18271 FormalNode.prototype.set$value = function(value) { return this.value = value; }; | 19946 FormalNode.prototype.set$value = function(value) { return this.value = value; }; |
18272 FormalNode.prototype.visit = function(visitor) { | 19947 FormalNode.prototype.visit = function(visitor) { |
18273 return visitor.visitFormalNode(this); | 19948 return visitor.visitFormalNode(this); |
18274 } | 19949 } |
| 19950 FormalNode.prototype.visit$1 = function($0) { |
| 19951 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19952 }; |
18275 // ********** Code for CatchNode ************** | 19953 // ********** Code for CatchNode ************** |
18276 function CatchNode(exception, trace, body, span) { | 19954 function CatchNode(exception, trace, body, span) { |
18277 this.exception = exception; | 19955 this.exception = exception; |
18278 this.trace = trace; | 19956 this.trace = trace; |
18279 this.body = body; | 19957 this.body = body; |
18280 lang_Node.call(this, span); | 19958 lang_Node.call(this, span); |
18281 // Initializers done | 19959 // Initializers done |
18282 } | 19960 } |
18283 $inherits(CatchNode, lang_Node); | 19961 $inherits(CatchNode, lang_Node); |
18284 CatchNode.prototype.get$exception = function() { return this.exception; }; | 19962 CatchNode.prototype.get$exception = function() { return this.exception; }; |
18285 CatchNode.prototype.set$exception = function(value) { return this.exception = va
lue; }; | 19963 CatchNode.prototype.set$exception = function(value) { return this.exception = va
lue; }; |
18286 CatchNode.prototype.visit = function(visitor) { | 19964 CatchNode.prototype.visit = function(visitor) { |
18287 return visitor.visitCatchNode(this); | 19965 return visitor.visitCatchNode(this); |
18288 } | 19966 } |
| 19967 CatchNode.prototype.visit$1 = function($0) { |
| 19968 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19969 }; |
18289 // ********** Code for CaseNode ************** | 19970 // ********** Code for CaseNode ************** |
18290 function CaseNode(label, cases, statements, span) { | 19971 function CaseNode(label, cases, statements, span) { |
18291 this.label = label; | 19972 this.label = label; |
18292 this.cases = cases; | 19973 this.cases = cases; |
18293 this.statements = statements; | 19974 this.statements = statements; |
18294 lang_Node.call(this, span); | 19975 lang_Node.call(this, span); |
18295 // Initializers done | 19976 // Initializers done |
18296 } | 19977 } |
18297 $inherits(CaseNode, lang_Node); | 19978 $inherits(CaseNode, lang_Node); |
18298 CaseNode.prototype.visit = function(visitor) { | 19979 CaseNode.prototype.visit = function(visitor) { |
18299 return visitor.visitCaseNode(this); | 19980 return visitor.visitCaseNode(this); |
18300 } | 19981 } |
| 19982 CaseNode.prototype.visit$1 = function($0) { |
| 19983 return this.visit(($0 && $0.is$TreeVisitor())); |
| 19984 }; |
18301 // ********** Code for TypeParameter ************** | 19985 // ********** Code for TypeParameter ************** |
18302 function TypeParameter(name, extendsType, span) { | 19986 function TypeParameter(name, extendsType, span) { |
18303 this.name = name; | 19987 this.name = name; |
18304 this.extendsType = extendsType; | 19988 this.extendsType = extendsType; |
18305 lang_Node.call(this, span); | 19989 lang_Node.call(this, span); |
18306 // Initializers done | 19990 // Initializers done |
18307 } | 19991 } |
18308 $inherits(TypeParameter, lang_Node); | 19992 $inherits(TypeParameter, lang_Node); |
18309 TypeParameter.prototype.get$name = function() { return this.name; }; | 19993 TypeParameter.prototype.get$name = function() { return this.name; }; |
18310 TypeParameter.prototype.set$name = function(value) { return this.name = value; }
; | 19994 TypeParameter.prototype.set$name = function(value) { return this.name = value; }
; |
18311 TypeParameter.prototype.visit = function(visitor) { | 19995 TypeParameter.prototype.visit = function(visitor) { |
18312 return visitor.visitTypeParameter(this); | 19996 return visitor.visitTypeParameter(this); |
18313 } | 19997 } |
| 19998 TypeParameter.prototype.visit$1 = function($0) { |
| 19999 return this.visit(($0 && $0.is$TreeVisitor())); |
| 20000 }; |
18314 // ********** Code for lang_Identifier ************** | 20001 // ********** Code for lang_Identifier ************** |
18315 function lang_Identifier(name, span) { | 20002 function lang_Identifier(name, span) { |
18316 this.name = name; | 20003 this.name = name; |
18317 lang_Node.call(this, span); | 20004 lang_Node.call(this, span); |
18318 // Initializers done | 20005 // Initializers done |
18319 } | 20006 } |
18320 $inherits(lang_Identifier, lang_Node); | 20007 $inherits(lang_Identifier, lang_Node); |
18321 lang_Identifier.prototype.get$name = function() { return this.name; }; | 20008 lang_Identifier.prototype.get$name = function() { return this.name; }; |
18322 lang_Identifier.prototype.set$name = function(value) { return this.name = value;
}; | 20009 lang_Identifier.prototype.set$name = function(value) { return this.name = value;
}; |
18323 lang_Identifier.prototype.visit = function(visitor) { | 20010 lang_Identifier.prototype.visit = function(visitor) { |
18324 return visitor.visitIdentifier(this); | 20011 return visitor.visitIdentifier(this); |
18325 } | 20012 } |
| 20013 lang_Identifier.prototype.visit$1 = function($0) { |
| 20014 return this.visit(($0 && $0.is$TreeVisitor())); |
| 20015 }; |
18326 // ********** Code for DeclaredIdentifier ************** | 20016 // ********** Code for DeclaredIdentifier ************** |
18327 function DeclaredIdentifier(type, name, span) { | 20017 function DeclaredIdentifier(type, name, span) { |
18328 this.type = type; | 20018 this.type = type; |
18329 this.name = name; | 20019 this.name = name; |
18330 lang_Expression.call(this, span); | 20020 lang_Expression.call(this, span); |
18331 // Initializers done | 20021 // Initializers done |
18332 } | 20022 } |
18333 $inherits(DeclaredIdentifier, lang_Expression); | 20023 $inherits(DeclaredIdentifier, lang_Expression); |
18334 DeclaredIdentifier.prototype.is$DeclaredIdentifier = function(){return this;}; | 20024 DeclaredIdentifier.prototype.is$DeclaredIdentifier = function(){return this;}; |
18335 DeclaredIdentifier.prototype.get$name = function() { return this.name; }; | 20025 DeclaredIdentifier.prototype.get$name = function() { return this.name; }; |
18336 DeclaredIdentifier.prototype.set$name = function(value) { return this.name = val
ue; }; | 20026 DeclaredIdentifier.prototype.set$name = function(value) { return this.name = val
ue; }; |
18337 DeclaredIdentifier.prototype.visit = function(visitor) { | 20027 DeclaredIdentifier.prototype.visit = function(visitor) { |
18338 return visitor.visitDeclaredIdentifier(this); | 20028 return visitor.visitDeclaredIdentifier(this); |
18339 } | 20029 } |
| 20030 DeclaredIdentifier.prototype.visit$1 = function($0) { |
| 20031 return this.visit(($0 && $0.is$TreeVisitor())); |
| 20032 }; |
18340 // ********** Code for lang_Type ************** | 20033 // ********** Code for lang_Type ************** |
18341 function lang_Type(name) { | 20034 function lang_Type(name) { |
18342 this.name = name; | 20035 this.name = name; |
18343 this.isTested = false; | 20036 this.isTested = false; |
18344 // Initializers done | 20037 // Initializers done |
18345 } | 20038 } |
18346 lang_Type.prototype.is$lang_Type = function(){return this;}; | 20039 lang_Type.prototype.is$lang_Type = function(){return this;}; |
18347 lang_Type.prototype.is$Named = function(){return this;}; | 20040 lang_Type.prototype.is$Named = function(){return this;}; |
18348 lang_Type.prototype.get$name = function() { return this.name; }; | 20041 lang_Type.prototype.get$name = function() { return this.name; }; |
18349 lang_Type.prototype.markUsed = function() { | 20042 lang_Type.prototype.markUsed = function() { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18459 world.warning($assert_String(msg), span); | 20152 world.warning($assert_String(msg), span); |
18460 } | 20153 } |
18461 } | 20154 } |
18462 } | 20155 } |
18463 lang_Type.prototype.needsVarCall = function(args) { | 20156 lang_Type.prototype.needsVarCall = function(args) { |
18464 if ($notnull_bool(this.get$isVarOrFunction())) { | 20157 if ($notnull_bool(this.get$isVarOrFunction())) { |
18465 return true; | 20158 return true; |
18466 } | 20159 } |
18467 var call = this.getCallMethod(); | 20160 var call = this.getCallMethod(); |
18468 if ($notnull_bool($ne(call, null))) { | 20161 if ($notnull_bool($ne(call, null))) { |
18469 if (args.get$length() != call.get$parameters().length || !$notnull_bool(call
.namesInOrder(args))) { | 20162 if (args.get$length() != call.get$parameters().length || !$notnull_bool(call
.namesInOrder$1(args))) { |
18470 return true; | 20163 return true; |
18471 } | 20164 } |
18472 } | 20165 } |
18473 return false; | 20166 return false; |
18474 } | 20167 } |
18475 lang_Type.union = function(x, y) { | 20168 lang_Type.union = function(x, y) { |
18476 if ($eq(x, y)) return x; | 20169 if ($eq(x, y)) return x; |
18477 if ($notnull_bool(x.get$isNum() && y.get$isNum())) return world.numType; | 20170 if ($notnull_bool(x.get$isNum() && y.get$isNum())) return world.numType; |
18478 if ($notnull_bool(x.get$isString() && y.get$isString())) return world.stringTy
pe; | 20171 if ($notnull_bool(x.get$isString() && y.get$isString())) return world.stringTy
pe; |
18479 return world.varType; | 20172 return world.varType; |
(...skipping 25 matching lines...) Expand all Loading... |
18505 if ($eq(this, other)) return true; | 20198 if ($eq(this, other)) return true; |
18506 if ($notnull_bool(this.get$isVar())) return true; | 20199 if ($notnull_bool(this.get$isVar())) return true; |
18507 if ($notnull_bool(other.get$isVar())) return true; | 20200 if ($notnull_bool(other.get$isVar())) return true; |
18508 if ($notnull_bool(other._isDirectSupertypeOf(this))) return true; | 20201 if ($notnull_bool(other._isDirectSupertypeOf(this))) return true; |
18509 var call = this.getCallMethod(); | 20202 var call = this.getCallMethod(); |
18510 var otherCall = other.getCallMethod(); | 20203 var otherCall = other.getCallMethod(); |
18511 if ($notnull_bool($ne(call, null) && $ne(otherCall, null))) { | 20204 if ($notnull_bool($ne(call, null) && $ne(otherCall, null))) { |
18512 return lang_Type._isFunctionSubtypeOf((call && call.is$MethodMember()), (oth
erCall && otherCall.is$MethodMember())); | 20205 return lang_Type._isFunctionSubtypeOf((call && call.is$MethodMember()), (oth
erCall && otherCall.is$MethodMember())); |
18513 } | 20206 } |
18514 if ($notnull_bool($notnull_bool($eq(this.get$genericType(), other.get$genericT
ype()) && $ne(this.get$typeArgsInOrder(), null)) && $ne(other.get$typeArgsInOrde
r(), null)) && this.get$typeArgsInOrder().length == other.get$typeArgsInOrder().
length) { | 20207 if ($notnull_bool($notnull_bool($eq(this.get$genericType(), other.get$genericT
ype()) && $ne(this.get$typeArgsInOrder(), null)) && $ne(other.get$typeArgsInOrde
r(), null)) && this.get$typeArgsInOrder().length == other.get$typeArgsInOrder().
length) { |
18515 var t = this.get$typeArgsInOrder().iterator(); | 20208 var t = this.get$typeArgsInOrder().iterator$0(); |
18516 var s = other.get$typeArgsInOrder().iterator(); | 20209 var s = other.get$typeArgsInOrder().iterator$0(); |
18517 while ($notnull_bool(t.hasNext())) { | 20210 while ($notnull_bool(t.hasNext$0())) { |
18518 if (!$notnull_bool(t.next().isSubtypeOf(s.next()))) return false; | 20211 if (!$notnull_bool(t.next$0().isSubtypeOf$1(s.next$0()))) return false; |
18519 } | 20212 } |
18520 return true; | 20213 return true; |
18521 } | 20214 } |
18522 if ($notnull_bool(this.get$parent() != null && this.get$parent().isSubtypeOf(o
ther))) { | 20215 if ($notnull_bool(this.get$parent() != null && this.get$parent().isSubtypeOf(o
ther))) { |
18523 return true; | 20216 return true; |
18524 } | 20217 } |
18525 if (this.get$interfaces() != null && this.get$interfaces().some((function (i)
{ | 20218 if (this.get$interfaces() != null && this.get$interfaces().some((function (i)
{ |
18526 return i.isSubtypeOf(other); | 20219 return i.isSubtypeOf$1(other); |
18527 }) | 20220 }) |
18528 )) { | 20221 )) { |
18529 return true; | 20222 return true; |
18530 } | 20223 } |
18531 return false; | 20224 return false; |
18532 } | 20225 } |
18533 lang_Type._isFunctionSubtypeOf = function(t, s) { | 20226 lang_Type._isFunctionSubtypeOf = function(t, s) { |
18534 var $0; | |
18535 if (!$notnull_bool(s.returnType.get$isVoid()) && !$notnull_bool(s.returnType.i
sAssignable(t.returnType))) { | 20227 if (!$notnull_bool(s.returnType.get$isVoid()) && !$notnull_bool(s.returnType.i
sAssignable(t.returnType))) { |
18536 return false; | 20228 return false; |
18537 } | 20229 } |
18538 var tp = t.parameters; | 20230 var tp = t.parameters; |
18539 var sp = s.parameters; | 20231 var sp = s.parameters; |
18540 if (tp.length < sp.length) return false; | 20232 if (tp.length < sp.length) return false; |
18541 for (var i = 0; | 20233 for (var i = 0; |
18542 i < sp.length; i++) { | 20234 i < sp.length; i++) { |
18543 if ($ne(tp.$index(i).get$isOptional(), sp.$index(i).get$isOptional())) retur
n false; | 20235 if ($ne(tp.$index(i).get$isOptional(), sp.$index(i).get$isOptional())) retur
n false; |
18544 if ($notnull_bool(tp.$index(i).get$isOptional() && $ne(tp.$index(i).get$name
(), sp.$index(i).get$name()))) return false; | 20236 if ($notnull_bool(tp.$index(i).get$isOptional() && $ne(tp.$index(i).get$name
(), sp.$index(i).get$name()))) return false; |
18545 if (!$notnull_bool(tp.$index(i).type.isAssignable((($0 = sp.$index(i).type)
&& $0.is$lang_Type())))) return false; | 20237 if (!$notnull_bool(tp.$index(i).type.isAssignable$1(sp.$index(i).type))) ret
urn false; |
18546 } | 20238 } |
18547 if (tp.length > sp.length && !$notnull_bool(tp.$index(sp.length).get$isOptiona
l())) return false; | 20239 if (tp.length > sp.length && !$notnull_bool(tp.$index(sp.length).get$isOptiona
l())) return false; |
18548 return true; | 20240 return true; |
18549 } | 20241 } |
| 20242 lang_Type.prototype.addDirectSubtype$1 = function($0) { |
| 20243 return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
| 20244 }; |
| 20245 lang_Type.prototype.ensureSubtypeOf$3 = function($0, $1, $2) { |
| 20246 return this.ensureSubtypeOf(($0 && $0.is$lang_Type()), ($1 && $1.is$SourceSpan
()), $assert_bool($2)); |
| 20247 }; |
| 20248 lang_Type.prototype.getConstructor$1 = function($0) { |
| 20249 return this.getConstructor($assert_String($0)); |
| 20250 }; |
| 20251 lang_Type.prototype.getMember$1 = function($0) { |
| 20252 return this.getMember($assert_String($0)); |
| 20253 }; |
| 20254 lang_Type.prototype.getOrMakeConcreteType$1 = function($0) { |
| 20255 return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
| 20256 }; |
| 20257 lang_Type.prototype.hashCode$0 = function() { |
| 20258 return this.hashCode(); |
| 20259 }; |
| 20260 lang_Type.prototype.isAssignable$1 = function($0) { |
| 20261 return this.isAssignable(($0 && $0.is$lang_Type())); |
| 20262 }; |
| 20263 lang_Type.prototype.isSubtypeOf$1 = function($0) { |
| 20264 return this.isSubtypeOf(($0 && $0.is$lang_Type())); |
| 20265 }; |
| 20266 lang_Type.prototype.markUsed$0 = function() { |
| 20267 return this.markUsed(); |
| 20268 }; |
| 20269 lang_Type.prototype.resolveMember$1 = function($0) { |
| 20270 return this.resolveMember($assert_String($0)); |
| 20271 }; |
| 20272 lang_Type.prototype.resolveTypeParams$1 = function($0) { |
| 20273 return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
| 20274 }; |
18550 // ********** Code for ParameterType ************** | 20275 // ********** Code for ParameterType ************** |
18551 function ParameterType(name, typeParameter) { | 20276 function ParameterType(name, typeParameter) { |
18552 this.typeParameter = typeParameter; | 20277 this.typeParameter = typeParameter; |
18553 lang_Type.call(this, name); | 20278 lang_Type.call(this, name); |
18554 // Initializers done | 20279 // Initializers done |
18555 } | 20280 } |
18556 $inherits(ParameterType, lang_Type); | 20281 $inherits(ParameterType, lang_Type); |
18557 ParameterType.prototype.is$ParameterType = function(){return this;}; | 20282 ParameterType.prototype.is$ParameterType = function(){return this;}; |
18558 ParameterType.prototype.get$isClass = function() { | 20283 ParameterType.prototype.get$isClass = function() { |
18559 return false; | 20284 return false; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18593 world.internalError('no subtypes of type parameters yet', this.get$span()); | 20318 world.internalError('no subtypes of type parameters yet', this.get$span()); |
18594 } | 20319 } |
18595 ParameterType.prototype.resolve = function(inType) { | 20320 ParameterType.prototype.resolve = function(inType) { |
18596 if (this.typeParameter.extendsType != null) { | 20321 if (this.typeParameter.extendsType != null) { |
18597 this.extendsType = inType.resolveType(this.typeParameter.extendsType, true); | 20322 this.extendsType = inType.resolveType(this.typeParameter.extendsType, true); |
18598 } | 20323 } |
18599 else { | 20324 else { |
18600 this.extendsType = world.objectType; | 20325 this.extendsType = world.objectType; |
18601 } | 20326 } |
18602 } | 20327 } |
| 20328 ParameterType.prototype.addDirectSubtype$1 = function($0) { |
| 20329 return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
| 20330 }; |
| 20331 ParameterType.prototype.getConstructor$1 = function($0) { |
| 20332 return this.getConstructor($assert_String($0)); |
| 20333 }; |
| 20334 ParameterType.prototype.getOrMakeConcreteType$1 = function($0) { |
| 20335 return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
| 20336 }; |
| 20337 ParameterType.prototype.isSubtypeOf$1 = function($0) { |
| 20338 return this.isSubtypeOf(($0 && $0.is$lang_Type())); |
| 20339 }; |
| 20340 ParameterType.prototype.resolve$1 = function($0) { |
| 20341 return this.resolve(($0 && $0.is$lang_Type())); |
| 20342 }; |
| 20343 ParameterType.prototype.resolveMember$1 = function($0) { |
| 20344 return this.resolveMember($assert_String($0)); |
| 20345 }; |
| 20346 ParameterType.prototype.resolveTypeParams$1 = function($0) { |
| 20347 return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
| 20348 }; |
18603 // ********** Code for NonNullableType ************** | 20349 // ********** Code for NonNullableType ************** |
18604 function NonNullableType(type) { | 20350 function NonNullableType(type) { |
18605 this.type = type; | 20351 this.type = type; |
18606 lang_Type.call(this, type.name); | 20352 lang_Type.call(this, type.name); |
18607 // Initializers done | 20353 // Initializers done |
18608 } | 20354 } |
18609 $inherits(NonNullableType, lang_Type); | 20355 $inherits(NonNullableType, lang_Type); |
18610 NonNullableType.prototype.get$isNullable = function() { | 20356 NonNullableType.prototype.get$isNullable = function() { |
18611 return false; | 20357 return false; |
18612 } | 20358 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18702 } | 20448 } |
18703 NonNullableType.prototype.get$parent = function() { | 20449 NonNullableType.prototype.get$parent = function() { |
18704 return this.type.get$parent(); | 20450 return this.type.get$parent(); |
18705 } | 20451 } |
18706 NonNullableType.prototype.getAllMembers = function() { | 20452 NonNullableType.prototype.getAllMembers = function() { |
18707 return this.type.getAllMembers(); | 20453 return this.type.getAllMembers(); |
18708 } | 20454 } |
18709 NonNullableType.prototype.get$isNativeType = function() { | 20455 NonNullableType.prototype.get$isNativeType = function() { |
18710 return this.type.get$isNativeType(); | 20456 return this.type.get$isNativeType(); |
18711 } | 20457 } |
| 20458 NonNullableType.prototype.addDirectSubtype$1 = function($0) { |
| 20459 return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
| 20460 }; |
| 20461 NonNullableType.prototype.getConstructor$1 = function($0) { |
| 20462 return this.getConstructor($assert_String($0)); |
| 20463 }; |
| 20464 NonNullableType.prototype.getMember$1 = function($0) { |
| 20465 return this.getMember($assert_String($0)); |
| 20466 }; |
| 20467 NonNullableType.prototype.getOrMakeConcreteType$1 = function($0) { |
| 20468 return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
| 20469 }; |
| 20470 NonNullableType.prototype.isSubtypeOf$1 = function($0) { |
| 20471 return this.isSubtypeOf(($0 && $0.is$lang_Type())); |
| 20472 }; |
| 20473 NonNullableType.prototype.markUsed$0 = function() { |
| 20474 return this.markUsed(); |
| 20475 }; |
| 20476 NonNullableType.prototype.resolveMember$1 = function($0) { |
| 20477 return this.resolveMember($assert_String($0)); |
| 20478 }; |
| 20479 NonNullableType.prototype.resolveTypeParams$1 = function($0) { |
| 20480 return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
| 20481 }; |
18712 // ********** Code for ConcreteType ************** | 20482 // ********** Code for ConcreteType ************** |
18713 function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { | 20483 function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { |
18714 this.genericType = genericType; | 20484 this.genericType = genericType; |
18715 this.typeArguments = typeArguments; | 20485 this.typeArguments = typeArguments; |
18716 this.typeArgsInOrder = typeArgsInOrder; | 20486 this.typeArgsInOrder = typeArgsInOrder; |
18717 this.constructors = $map([]); | 20487 this.constructors = $map([]); |
18718 this.members = $map([]); | 20488 this.members = $map([]); |
18719 this.factories = new FactoryMap(); | 20489 this.factories = new FactoryMap(); |
18720 lang_Type.call(this, name); | 20490 lang_Type.call(this, name); |
18721 // Initializers done | 20491 // Initializers done |
18722 } | 20492 } |
18723 $inherits(ConcreteType, lang_Type); | 20493 $inherits(ConcreteType, lang_Type); |
| 20494 ConcreteType.prototype.is$ConcreteType = function(){return this;}; |
18724 ConcreteType.prototype.get$genericType = function() { return this.genericType; }
; | 20495 ConcreteType.prototype.get$genericType = function() { return this.genericType; }
; |
18725 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn
Order; }; | 20496 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn
Order; }; |
18726 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA
rgsInOrder = value; }; | 20497 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA
rgsInOrder = value; }; |
18727 ConcreteType.prototype.get$isList = function() { | 20498 ConcreteType.prototype.get$isList = function() { |
18728 return this.genericType.get$isList(); | 20499 return this.genericType.get$isList(); |
18729 } | 20500 } |
18730 ConcreteType.prototype.get$isClass = function() { | 20501 ConcreteType.prototype.get$isClass = function() { |
18731 return this.genericType.isClass; | 20502 return this.genericType.isClass; |
18732 } | 20503 } |
18733 ConcreteType.prototype.get$library = function() { | 20504 ConcreteType.prototype.get$library = function() { |
18734 return this.genericType.library; | 20505 return this.genericType.library; |
18735 } | 20506 } |
18736 ConcreteType.prototype.get$span = function() { | 20507 ConcreteType.prototype.get$span = function() { |
18737 return this.genericType.get$span(); | 20508 return this.genericType.get$span(); |
18738 } | 20509 } |
18739 ConcreteType.prototype.get$hasTypeParams = function() { | 20510 ConcreteType.prototype.get$hasTypeParams = function() { |
18740 return $assert_bool(this.typeArguments.getValues().some((function (e) { | 20511 return this.typeArguments.getValues().some$1((function (e) { |
18741 return (e instanceof ParameterType); | 20512 return (e instanceof ParameterType); |
18742 }) | 20513 }) |
18743 )); | 20514 ); |
18744 } | 20515 } |
18745 ConcreteType.prototype.get$members = function() { return this.members; }; | 20516 ConcreteType.prototype.get$members = function() { return this.members; }; |
18746 ConcreteType.prototype.set$members = function(value) { return this.members = val
ue; }; | 20517 ConcreteType.prototype.set$members = function(value) { return this.members = val
ue; }; |
18747 ConcreteType.prototype.get$constructors = function() { return this.constructors;
}; | 20518 ConcreteType.prototype.get$constructors = function() { return this.constructors;
}; |
18748 ConcreteType.prototype.set$constructors = function(value) { return this.construc
tors = value; }; | 20519 ConcreteType.prototype.set$constructors = function(value) { return this.construc
tors = value; }; |
18749 ConcreteType.prototype.get$factories = function() { return this.factories; }; | 20520 ConcreteType.prototype.get$factories = function() { return this.factories; }; |
18750 ConcreteType.prototype.set$factories = function(value) { return this.factories =
value; }; | 20521 ConcreteType.prototype.set$factories = function(value) { return this.factories =
value; }; |
18751 ConcreteType.prototype.resolveTypeParams = function(inType) { | 20522 ConcreteType.prototype.resolveTypeParams = function(inType) { |
18752 var newTypeArgs = []; | 20523 var newTypeArgs = []; |
18753 var needsNewType = false; | 20524 var needsNewType = false; |
18754 var $list = this.typeArgsInOrder; | 20525 var $list = this.typeArgsInOrder; |
18755 for (var $i = 0;$i < $list.length; $i++) { | 20526 for (var $i = 0;$i < $list.length; $i++) { |
18756 var t = $list.$index($i); | 20527 var t = $list.$index($i); |
18757 var newType = t.resolveTypeParams(inType); | 20528 var newType = t.resolveTypeParams$1(inType); |
18758 if ($notnull_bool($ne(newType, t))) needsNewType = true; | 20529 if ($notnull_bool($ne(newType, t))) needsNewType = true; |
18759 newTypeArgs.add(newType); | 20530 newTypeArgs.add$1(newType); |
18760 } | 20531 } |
18761 if (!$notnull_bool(needsNewType)) return this; | 20532 if (!$notnull_bool(needsNewType)) return this; |
18762 return this.genericType.getOrMakeConcreteType((newTypeArgs && newTypeArgs.is$L
ist$Type())); | 20533 return this.genericType.getOrMakeConcreteType((newTypeArgs && newTypeArgs.is$L
ist$Type())); |
18763 } | 20534 } |
18764 ConcreteType.prototype.getOrMakeConcreteType = function(typeArgs) { | 20535 ConcreteType.prototype.getOrMakeConcreteType = function(typeArgs) { |
18765 return this.genericType.getOrMakeConcreteType(typeArgs); | 20536 return this.genericType.getOrMakeConcreteType(typeArgs); |
18766 } | 20537 } |
18767 ConcreteType.prototype.get$parent = function() { | 20538 ConcreteType.prototype.get$parent = function() { |
18768 return this.genericType.get$parent(); | 20539 return this.genericType.get$parent(); |
18769 } | 20540 } |
18770 ConcreteType.prototype.get$interfaces = function() { | 20541 ConcreteType.prototype.get$interfaces = function() { |
18771 if (this._interfaces == null && this.genericType.interfaces != null) { | 20542 if (this._interfaces == null && this.genericType.interfaces != null) { |
18772 this._interfaces = []; | 20543 this._interfaces = []; |
18773 var $list = this.genericType.interfaces; | 20544 var $list = this.genericType.interfaces; |
18774 for (var $i = 0;$i < $list.length; $i++) { | 20545 for (var $i = 0;$i < $list.length; $i++) { |
18775 var i = $list.$index($i); | 20546 var i = $list.$index($i); |
18776 this._interfaces.add(i.resolveTypeParams(this)); | 20547 this._interfaces.add(i.resolveTypeParams$1(this)); |
18777 } | 20548 } |
18778 } | 20549 } |
18779 return this._interfaces; | 20550 return this._interfaces; |
18780 } | 20551 } |
18781 ConcreteType.prototype.getCallMethod = function() { | 20552 ConcreteType.prototype.getCallMethod = function() { |
18782 return this.genericType.getCallMethod(); | 20553 return this.genericType.getCallMethod(); |
18783 } | 20554 } |
18784 ConcreteType.prototype.getAllMembers = function() { | 20555 ConcreteType.prototype.getAllMembers = function() { |
18785 var result = this.genericType.getAllMembers(); | 20556 var result = this.genericType.getAllMembers(); |
18786 var $list = result.getKeys(); | 20557 var $list = result.getKeys$0(); |
18787 for (var $i = result.getKeys().iterator(); $i.hasNext(); ) { | 20558 for (var $i = result.getKeys$0().iterator(); $i.hasNext$0(); ) { |
18788 var memberName = $i.next(); | 20559 var memberName = $i.next$0(); |
18789 var myMember = this.members.$index(memberName); | 20560 var myMember = this.members.$index(memberName); |
18790 if ($notnull_bool($ne(myMember, null))) { | 20561 if ($notnull_bool($ne(myMember, null))) { |
18791 result.$setindex(memberName, myMember); | 20562 result.$setindex(memberName, myMember); |
18792 } | 20563 } |
18793 } | 20564 } |
18794 return (result && result.is$Map$String$Member()); | 20565 return (result && result.is$Map$String$Member()); |
18795 } | 20566 } |
18796 ConcreteType.prototype.markUsed = function() { | 20567 ConcreteType.prototype.markUsed = function() { |
18797 this.genericType.markUsed(); | 20568 this.genericType.markUsed(); |
18798 } | 20569 } |
18799 ConcreteType.prototype.genMethod = function(method) { | 20570 ConcreteType.prototype.genMethod = function(method) { |
18800 this.genericType.genMethod(method); | 20571 this.genericType.genMethod(method); |
18801 } | 20572 } |
18802 ConcreteType.prototype.getFactory = function(type, constructorName) { | 20573 ConcreteType.prototype.getFactory = function(type, constructorName) { |
18803 return this.genericType.getFactory(type, constructorName); | 20574 return this.genericType.getFactory(type, constructorName); |
18804 } | 20575 } |
18805 ConcreteType.prototype.getConstructor = function(constructorName) { | 20576 ConcreteType.prototype.getConstructor = function(constructorName) { |
18806 var ret = this.constructors.$index(constructorName); | 20577 var ret = this.constructors.$index(constructorName); |
18807 if ($notnull_bool($ne(ret, null))) return ret; | 20578 if ($notnull_bool($ne(ret, null))) return ret; |
18808 ret = this.factories.getFactory(this.name, constructorName); | 20579 ret = this.factories.getFactory(this.name, constructorName); |
18809 if ($notnull_bool($ne(ret, null))) return ret; | 20580 if ($notnull_bool($ne(ret, null))) return ret; |
18810 var genericMember = this.genericType.getConstructor(constructorName); | 20581 var genericMember = this.genericType.getConstructor(constructorName); |
18811 if ($notnull_bool(genericMember == null)) return null; | 20582 if ($notnull_bool(genericMember == null)) return null; |
18812 if ($ne(genericMember.declaringType, this.genericType)) { | 20583 if ($ne(genericMember.declaringType, this.genericType)) { |
18813 if (!$notnull_bool(genericMember.declaringType.get$isGeneric())) return gene
ricMember; | 20584 if (!$notnull_bool(genericMember.declaringType.get$isGeneric())) return gene
ricMember; |
18814 var newDeclaringType = genericMember.declaringType.getOrMakeConcreteType(thi
s.typeArgsInOrder); | 20585 var newDeclaringType = genericMember.declaringType.getOrMakeConcreteType(thi
s.typeArgsInOrder); |
18815 return newDeclaringType.getConstructor(constructorName); | 20586 return newDeclaringType.getConstructor$1(constructorName); |
18816 } | 20587 } |
18817 if ($notnull_bool(genericMember.get$isFactory())) { | 20588 if ($notnull_bool(genericMember.get$isFactory())) { |
18818 ret = new ConcreteMember($assert_String(genericMember.get$name()), this, gen
ericMember); | 20589 ret = new ConcreteMember($assert_String(genericMember.get$name()), this, gen
ericMember); |
18819 this.factories.addFactory(this.name, constructorName, (ret && ret.is$Member(
))); | 20590 this.factories.addFactory(this.name, constructorName, (ret && ret.is$Member(
))); |
18820 } | 20591 } |
18821 else { | 20592 else { |
18822 ret = new ConcreteMember(this.name, this, genericMember); | 20593 ret = new ConcreteMember(this.name, this, genericMember); |
18823 this.constructors.$setindex(constructorName, ret); | 20594 this.constructors.$setindex(constructorName, ret); |
18824 } | 20595 } |
18825 return ret; | 20596 return ret; |
18826 } | 20597 } |
18827 ConcreteType.prototype.getMember = function(memberName) { | 20598 ConcreteType.prototype.getMember = function(memberName) { |
18828 var ret = this.members.$index(memberName); | 20599 var ret = this.members.$index(memberName); |
18829 if ($notnull_bool($ne(ret, null))) return (ret && ret.is$Member()); | 20600 if ($notnull_bool($ne(ret, null))) return (ret && ret.is$Member()); |
18830 var genericMember = this.genericType.getMember(memberName); | 20601 var genericMember = this.genericType.getMember(memberName); |
18831 if ($notnull_bool(genericMember == null)) return null; | 20602 if ($notnull_bool(genericMember == null)) return null; |
18832 ret = new ConcreteMember($assert_String(genericMember.get$name()), this, gener
icMember); | 20603 ret = new ConcreteMember($assert_String(genericMember.get$name()), this, gener
icMember); |
18833 this.members.$setindex(memberName, ret); | 20604 this.members.$setindex(memberName, ret); |
18834 return (ret && ret.is$Member()); | 20605 return (ret && ret.is$Member()); |
18835 } | 20606 } |
18836 ConcreteType.prototype.resolveMember = function(memberName) { | 20607 ConcreteType.prototype.resolveMember = function(memberName) { |
18837 var mem = this.getMember(memberName); | 20608 var mem = this.getMember(memberName); |
18838 if ($notnull_bool(mem == null)) return null; | 20609 if ($notnull_bool(mem == null)) return null; |
18839 var ret = new MemberSet((mem && mem.is$Member())); | 20610 var ret = new MemberSet((mem && mem.is$Member()), false); |
18840 if ($notnull_bool(mem.get$isStatic())) return (ret && ret.is$MemberSet()); | 20611 if ($notnull_bool(mem.get$isStatic())) return (ret && ret.is$MemberSet()); |
18841 var $list = this.genericType.get$subtypes(); | 20612 var $list = this.genericType.get$subtypes(); |
18842 for (var $i = this.genericType.get$subtypes().iterator(); $i.hasNext(); ) { | 20613 for (var $i = this.genericType.get$subtypes().iterator(); $i.hasNext$0(); ) { |
18843 var t = $i.next(); | 20614 var t = $i.next$0(); |
18844 var m = t.get$members().$index(memberName); | 20615 var m = t.get$members().$index(memberName); |
18845 if ($notnull_bool($ne(m, null))) ret.add(m); | 20616 if ($notnull_bool($ne(m, null))) ret.add$1(m); |
18846 } | 20617 } |
18847 return (ret && ret.is$MemberSet()); | 20618 return (ret && ret.is$MemberSet()); |
18848 } | 20619 } |
18849 ConcreteType.prototype.resolveType = function(node, isRequired) { | 20620 ConcreteType.prototype.resolveType = function(node, isRequired) { |
18850 var ret = this.genericType.resolveType(node, isRequired); | 20621 var ret = this.genericType.resolveType(node, isRequired); |
18851 return (ret && ret.is$lang_Type()); | 20622 return (ret && ret.is$lang_Type()); |
18852 } | 20623 } |
18853 ConcreteType.prototype.addDirectSubtype = function(type) { | 20624 ConcreteType.prototype.addDirectSubtype = function(type) { |
18854 this.genericType.addDirectSubtype(type); | 20625 this.genericType.addDirectSubtype(type); |
18855 } | 20626 } |
| 20627 ConcreteType.prototype.addDirectSubtype$1 = function($0) { |
| 20628 return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
| 20629 }; |
| 20630 ConcreteType.prototype.getConstructor$1 = function($0) { |
| 20631 return this.getConstructor($assert_String($0)); |
| 20632 }; |
| 20633 ConcreteType.prototype.getMember$1 = function($0) { |
| 20634 return this.getMember($assert_String($0)); |
| 20635 }; |
| 20636 ConcreteType.prototype.getOrMakeConcreteType$1 = function($0) { |
| 20637 return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
| 20638 }; |
| 20639 ConcreteType.prototype.markUsed$0 = function() { |
| 20640 return this.markUsed(); |
| 20641 }; |
| 20642 ConcreteType.prototype.resolveMember$1 = function($0) { |
| 20643 return this.resolveMember($assert_String($0)); |
| 20644 }; |
| 20645 ConcreteType.prototype.resolveTypeParams$1 = function($0) { |
| 20646 return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
| 20647 }; |
18856 // ********** Code for DefinedType ************** | 20648 // ********** Code for DefinedType ************** |
18857 function DefinedType(name, library, definition, isClass) { | 20649 function DefinedType(name, library, definition, isClass) { |
18858 this.isUsed = false | 20650 this.isUsed = false |
18859 this.isNativeType = false | 20651 this.isNativeType = false |
18860 this.library = library; | 20652 this.library = library; |
18861 this.isClass = isClass; | 20653 this.isClass = isClass; |
18862 this.directSubtypes = new HashSetImplementation$Type(); | 20654 this.directSubtypes = new HashSetImplementation$Type(); |
18863 this.constructors = $map([]); | 20655 this.constructors = $map([]); |
18864 this.members = $map([]); | 20656 this.members = $map([]); |
18865 this.factories = new FactoryMap(); | 20657 this.factories = new FactoryMap(); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18991 } | 20783 } |
18992 DefinedType.prototype._resolveInterfaces = function(types) { | 20784 DefinedType.prototype._resolveInterfaces = function(types) { |
18993 if (types == null) return []; | 20785 if (types == null) return []; |
18994 var interfaces = []; | 20786 var interfaces = []; |
18995 for (var $i = 0;$i < types.length; $i++) { | 20787 for (var $i = 0;$i < types.length; $i++) { |
18996 var type = types.$index($i); | 20788 var type = types.$index($i); |
18997 var resolvedInterface = this.resolveType((type && type.is$TypeReference()),
true); | 20789 var resolvedInterface = this.resolveType((type && type.is$TypeReference()),
true); |
18998 if ($notnull_bool(resolvedInterface.get$isClosed() && !($notnull_bool(this.l
ibrary.get$isCore() || this.library.get$isCoreImpl())))) { | 20790 if ($notnull_bool(resolvedInterface.get$isClosed() && !($notnull_bool(this.l
ibrary.get$isCore() || this.library.get$isCoreImpl())))) { |
18999 world.error(('can not implement "' + resolvedInterface.get$name() + '": ')
+ 'only native implementation allowed', type.get$span()); | 20791 world.error(('can not implement "' + resolvedInterface.get$name() + '": ')
+ 'only native implementation allowed', type.get$span()); |
19000 } | 20792 } |
19001 resolvedInterface.addDirectSubtype(this); | 20793 resolvedInterface.addDirectSubtype$1(this); |
19002 interfaces.add(resolvedInterface); | 20794 interfaces.add$1(resolvedInterface); |
19003 } | 20795 } |
19004 return (interfaces && interfaces.is$List$Type()); | 20796 return (interfaces && interfaces.is$List$Type()); |
19005 } | 20797 } |
19006 DefinedType.prototype.addDirectSubtype = function(type) { | 20798 DefinedType.prototype.addDirectSubtype = function(type) { |
19007 $assert(this._subtypes == null, "_subtypes == null", "type.dart", 744, 12); | 20799 $assert(this._subtypes == null, "_subtypes == null", "type.dart", 744, 12); |
19008 this.directSubtypes.add(type); | 20800 this.directSubtypes.add(type); |
19009 } | 20801 } |
19010 DefinedType.prototype.get$subtypes = function() { | 20802 DefinedType.prototype.get$subtypes = function() { |
19011 if (this._subtypes == null) { | 20803 if (this._subtypes == null) { |
19012 this._subtypes = new HashSetImplementation$Type(); | 20804 this._subtypes = new HashSetImplementation$Type(); |
19013 var $list = this.directSubtypes; | 20805 var $list = this.directSubtypes; |
19014 for (var $i = this.directSubtypes.iterator(); $i.hasNext(); ) { | 20806 for (var $i = this.directSubtypes.iterator(); $i.hasNext$0(); ) { |
19015 var st = $i.next(); | 20807 var st = $i.next$0(); |
19016 this._subtypes.add(st); | 20808 this._subtypes.add(st); |
19017 this._subtypes.addAll(st.get$subtypes()); | 20809 this._subtypes.addAll(st.get$subtypes()); |
19018 } | 20810 } |
19019 } | 20811 } |
19020 return this._subtypes; | 20812 return this._subtypes; |
19021 } | 20813 } |
19022 DefinedType.prototype._cycleInClassExtends = function() { | 20814 DefinedType.prototype._cycleInClassExtends = function() { |
19023 var seen = new HashSetImplementation(); | 20815 var seen = new HashSetImplementation(); |
19024 seen.add(this); | 20816 seen.add(this); |
19025 var ancestor = this.get$parent(); | 20817 var ancestor = this.get$parent(); |
(...skipping 15 matching lines...) Expand all Loading... |
19041 seen.add(this); | 20833 seen.add(this); |
19042 function _helper(ancestor) { | 20834 function _helper(ancestor) { |
19043 if ($notnull_bool(ancestor == null)) return false; | 20835 if ($notnull_bool(ancestor == null)) return false; |
19044 if (ancestor === $this) return true; | 20836 if (ancestor === $this) return true; |
19045 if (seen.contains(ancestor)) { | 20837 if (seen.contains(ancestor)) { |
19046 return false; | 20838 return false; |
19047 } | 20839 } |
19048 seen.add(ancestor); | 20840 seen.add(ancestor); |
19049 if ($notnull_bool($ne(ancestor.get$interfaces(), null))) { | 20841 if ($notnull_bool($ne(ancestor.get$interfaces(), null))) { |
19050 var $list = ancestor.get$interfaces(); | 20842 var $list = ancestor.get$interfaces(); |
19051 for (var $i = ancestor.get$interfaces().iterator(); $i.hasNext(); ) { | 20843 for (var $i = ancestor.get$interfaces().iterator$0(); $i.hasNext$0(); ) { |
19052 var parent = $i.next(); | 20844 var parent = $i.next$0(); |
19053 if ($notnull_bool(_helper(parent))) return true; | 20845 if ($notnull_bool(_helper(parent))) return true; |
19054 } | 20846 } |
19055 } | 20847 } |
19056 return false; | 20848 return false; |
19057 } | 20849 } |
19058 for (var i = 0; | 20850 for (var i = 0; |
19059 i < this.interfaces.length; i++) { | 20851 i < this.interfaces.length; i++) { |
19060 if ($notnull_bool(_helper(this.interfaces.$index(i)))) return i; | 20852 if ($notnull_bool(_helper(this.interfaces.$index(i)))) return i; |
19061 } | 20853 } |
19062 return -1; | 20854 return -1; |
(...skipping 18 matching lines...) Expand all Loading... |
19081 world.error('class may not extend an interface - use implements', type
Def.extendsTypes.$index(0).get$span()); | 20873 world.error('class may not extend an interface - use implements', type
Def.extendsTypes.$index(0).get$span()); |
19082 } | 20874 } |
19083 this.get$parent().addDirectSubtype(this); | 20875 this.get$parent().addDirectSubtype(this); |
19084 if ($notnull_bool(this._cycleInClassExtends())) { | 20876 if ($notnull_bool(this._cycleInClassExtends())) { |
19085 world.error(('class "' + this.name + '" has a cycle in its inheritance
chain'), extendsTypeRef.get$span()); | 20877 world.error(('class "' + this.name + '" has a cycle in its inheritance
chain'), extendsTypeRef.get$span()); |
19086 } | 20878 } |
19087 } | 20879 } |
19088 else { | 20880 else { |
19089 if (!$notnull_bool(this.get$isObject())) { | 20881 if (!$notnull_bool(this.get$isObject())) { |
19090 this.set$parent(world.objectType); | 20882 this.set$parent(world.objectType); |
| 20883 this.get$parent().addDirectSubtype(this); |
19091 } | 20884 } |
19092 } | 20885 } |
19093 this.interfaces = this._resolveInterfaces(typeDef.implementsTypes); | 20886 this.interfaces = this._resolveInterfaces(typeDef.implementsTypes); |
19094 if (typeDef.factoryType != null) { | 20887 if (typeDef.factoryType != null) { |
19095 world.error('factory not allowed on classes', typeDef.factoryType.span); | 20888 world.error('factory not allowed on classes', typeDef.factoryType.span); |
19096 } | 20889 } |
19097 } | 20890 } |
19098 else { | 20891 else { |
19099 if (typeDef.implementsTypes != null && typeDef.implementsTypes.length > 0)
{ | 20892 if (typeDef.implementsTypes != null && typeDef.implementsTypes.length > 0)
{ |
19100 world.error('implements not allowed on interfaces (use extends)', typeDe
f.implementsTypes.$index(0).get$span()); | 20893 world.error('implements not allowed on interfaces (use extends)', typeDe
f.implementsTypes.$index(0).get$span()); |
(...skipping 11 matching lines...) Expand all Loading... |
19112 } | 20905 } |
19113 } | 20906 } |
19114 } | 20907 } |
19115 else if ((this.definition instanceof FunctionTypeDefinition)) { | 20908 else if ((this.definition instanceof FunctionTypeDefinition)) { |
19116 this.interfaces = [world.functionType]; | 20909 this.interfaces = [world.functionType]; |
19117 } | 20910 } |
19118 if (this.typeParameters != null) { | 20911 if (this.typeParameters != null) { |
19119 var $list = this.typeParameters; | 20912 var $list = this.typeParameters; |
19120 for (var $i = 0;$i < $list.length; $i++) { | 20913 for (var $i = 0;$i < $list.length; $i++) { |
19121 var tp = $list.$index($i); | 20914 var tp = $list.$index($i); |
19122 tp.resolve(this); | 20915 tp.resolve$1(this); |
19123 } | 20916 } |
19124 } | 20917 } |
19125 world._addType(this); | 20918 world._addType(this); |
19126 var $list = this.constructors.getValues(); | 20919 var $list = this.constructors.getValues(); |
19127 for (var $i = this.constructors.getValues().iterator(); $i.hasNext(); ) { | 20920 for (var $i = this.constructors.getValues().iterator$0(); $i.hasNext$0(); ) { |
19128 var c = $i.next(); | 20921 var c = $i.next$0(); |
19129 c.resolve(this); | 20922 c.resolve$1(this); |
19130 } | 20923 } |
19131 var $list0 = this.members.getValues(); | 20924 var $list0 = this.members.getValues(); |
19132 for (var $i = this.members.getValues().iterator(); $i.hasNext(); ) { | 20925 for (var $i = this.members.getValues().iterator$0(); $i.hasNext$0(); ) { |
19133 var m = $i.next(); | 20926 var m = $i.next$0(); |
19134 m.resolve(this); | 20927 m.resolve$1(this); |
19135 } | 20928 } |
19136 this.factories.forEach((function (f) { | 20929 this.factories.forEach((function (f) { |
19137 return f.resolve($this); | 20930 return f.resolve$1($this); |
19138 }) | 20931 }) |
19139 ); | 20932 ); |
19140 } | 20933 } |
19141 DefinedType.prototype.addMethod = function(methodName, definition) { | 20934 DefinedType.prototype.addMethod = function(methodName, definition) { |
19142 if (methodName == null) methodName = definition.name.name; | 20935 if (methodName == null) methodName = definition.name.name; |
19143 var method = new MethodMember(methodName, this, definition); | 20936 var method = new MethodMember(methodName, this, definition); |
19144 if ($notnull_bool(method.get$isConstructor())) { | 20937 if ($notnull_bool(method.get$isConstructor())) { |
19145 if (this.constructors.containsKey(method.get$constructorName())) { | 20938 if (this.constructors.containsKey(method.get$constructorName())) { |
19146 world.error(('duplicate constructor definition of ' + method.get$name() +
''), definition.span); | 20939 world.error(('duplicate constructor definition of ' + method.get$name() +
''), definition.span); |
19147 return; | 20940 return; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19237 body = new NativeStatement(null, (span && span.is$SourceSpan())); | 21030 body = new NativeStatement(null, (span && span.is$SourceSpan())); |
19238 inits = null; | 21031 inits = null; |
19239 } | 21032 } |
19240 else { | 21033 else { |
19241 body = null; | 21034 body = null; |
19242 inits = [new CallExpression(new SuperExpression((span && span.is$SourceSpa
n())), [], (span && span.is$SourceSpan()))]; | 21035 inits = [new CallExpression(new SuperExpression((span && span.is$SourceSpa
n())), [], (span && span.is$SourceSpan()))]; |
19243 } | 21036 } |
19244 var typeDef = (($0 = this.definition) && $0.is$TypeDefinition()); | 21037 var typeDef = (($0 = this.definition) && $0.is$TypeDefinition()); |
19245 var c = new FunctionDefinition(null, null, typeDef.name, [], inits, body, (s
pan && span.is$SourceSpan())); | 21038 var c = new FunctionDefinition(null, null, typeDef.name, [], inits, body, (s
pan && span.is$SourceSpan())); |
19246 this.addMethod(null, (c && c.is$FunctionDefinition())); | 21039 this.addMethod(null, (c && c.is$FunctionDefinition())); |
19247 this.constructors.$index('').resolve(this); | 21040 this.constructors.$index('').resolve$1(this); |
19248 return this.constructors.$index(''); | 21041 return this.constructors.$index(''); |
19249 } | 21042 } |
19250 return null; | 21043 return null; |
19251 } | 21044 } |
19252 DefinedType.prototype.getMember = function(memberName) { | 21045 DefinedType.prototype.getMember = function(memberName) { |
19253 var $0; | 21046 var $0; |
19254 var member = (($0 = this.members.$index(memberName)) && $0.is$Member()); | 21047 var member = (($0 = this.members.$index(memberName)) && $0.is$Member()); |
19255 if (member != null) { | 21048 if (member != null) { |
19256 var parentMember = this.getMemberInParents(memberName); | 21049 var parentMember = this.getMemberInParents(memberName); |
19257 if ($notnull_bool($ne(parentMember, null))) { | 21050 if ($notnull_bool($ne(parentMember, null))) { |
(...skipping 23 matching lines...) Expand all Loading... |
19281 return (ret && ret.is$Member()); | 21074 return (ret && ret.is$Member()); |
19282 } | 21075 } |
19283 return null; | 21076 return null; |
19284 } | 21077 } |
19285 } | 21078 } |
19286 else { | 21079 else { |
19287 if (this.interfaces != null && this.interfaces.length > 0) { | 21080 if (this.interfaces != null && this.interfaces.length > 0) { |
19288 var $list = this.interfaces; | 21081 var $list = this.interfaces; |
19289 for (var $i = 0;$i < $list.length; $i++) { | 21082 for (var $i = 0;$i < $list.length; $i++) { |
19290 var i = $list.$index($i); | 21083 var i = $list.$index($i); |
19291 var ret = i.getMember(memberName); | 21084 var ret = i.getMember$1(memberName); |
19292 if ($notnull_bool($ne(ret, null))) { | 21085 if ($notnull_bool($ne(ret, null))) { |
19293 return (ret && ret.is$Member()); | 21086 return (ret && ret.is$Member()); |
19294 } | 21087 } |
19295 } | 21088 } |
19296 return null; | 21089 return null; |
19297 } | 21090 } |
19298 else { | 21091 else { |
19299 return world.objectType.getMember(memberName); | 21092 return world.objectType.getMember(memberName); |
19300 } | 21093 } |
19301 } | 21094 } |
19302 } | 21095 } |
19303 DefinedType.prototype.resolveMember = function(memberName) { | 21096 DefinedType.prototype.resolveMember = function(memberName) { |
19304 var $0; | 21097 var $0; |
19305 var ret = (($0 = this._resolvedMembers.$index(memberName)) && $0.is$MemberSet(
)); | 21098 var ret = (($0 = this._resolvedMembers.$index(memberName)) && $0.is$MemberSet(
)); |
19306 if (ret != null) return ret; | 21099 if (ret != null) return ret; |
19307 var member = this.getMember(memberName); | 21100 var member = this.getMember(memberName); |
19308 if (member == null) { | 21101 if (member == null) { |
19309 return null; | 21102 return null; |
19310 } | 21103 } |
19311 ret = new MemberSet(member); | 21104 ret = new MemberSet(member, false); |
19312 this._resolvedMembers.$setindex(memberName, ret); | 21105 this._resolvedMembers.$setindex(memberName, ret); |
19313 if ($notnull_bool(member.get$isStatic())) { | 21106 if ($notnull_bool(member.get$isStatic())) { |
19314 return ret; | 21107 return ret; |
19315 } | 21108 } |
19316 else { | 21109 else { |
19317 var $list = this.get$subtypes(); | 21110 var $list = this.get$subtypes(); |
19318 for (var $i = this.get$subtypes().iterator(); $i.hasNext(); ) { | 21111 for (var $i = this.get$subtypes().iterator(); $i.hasNext$0(); ) { |
19319 var t = $i.next(); | 21112 var t = $i.next$0(); |
19320 var m; | 21113 var m; |
19321 if ($notnull_bool(!$notnull_bool(this.isClass) && t.get$isClass())) { | 21114 if ($notnull_bool(!$notnull_bool(this.isClass) && t.get$isClass())) { |
19322 m = t.getMember(memberName); | 21115 m = t.getMember$1(memberName); |
19323 } | 21116 } |
19324 else { | 21117 else { |
19325 m = t.get$members().$index(memberName); | 21118 m = t.get$members().$index(memberName); |
19326 } | 21119 } |
19327 if ($notnull_bool($ne(m, null))) ret.add((m && m.is$Member())); | 21120 if ($notnull_bool($ne(m, null))) ret.add((m && m.is$Member())); |
19328 } | 21121 } |
19329 return ret; | 21122 return ret; |
19330 } | 21123 } |
19331 } | 21124 } |
19332 DefinedType.prototype._createNotEqualMember = function() { | 21125 DefinedType.prototype._createNotEqualMember = function() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19401 } | 21194 } |
19402 if (typeRef.typeArguments.length != baseType.get$typeParameters().length) { | 21195 if (typeRef.typeArguments.length != baseType.get$typeParameters().length) { |
19403 world.error('wrong number of type arguments', typeRef.span); | 21196 world.error('wrong number of type arguments', typeRef.span); |
19404 return null; | 21197 return null; |
19405 } | 21198 } |
19406 var typeArgs = []; | 21199 var typeArgs = []; |
19407 for (var i = 0; | 21200 for (var i = 0; |
19408 i < typeRef.typeArguments.length; i++) { | 21201 i < typeRef.typeArguments.length; i++) { |
19409 var extendsType = baseType.get$typeParameters().$index(i).extendsType; | 21202 var extendsType = baseType.get$typeParameters().$index(i).extendsType; |
19410 var typeArg = this.resolveType((($0 = typeRef.typeArguments.$index(i)) &&
$0.is$TypeReference()), typeErrors); | 21203 var typeArg = this.resolveType((($0 = typeRef.typeArguments.$index(i)) &&
$0.is$TypeReference()), typeErrors); |
19411 typeArgs.add(typeArg); | 21204 typeArgs.add$1(typeArg); |
19412 if ($notnull_bool($ne(extendsType, null) && !(typeArg instanceof Parameter
Type))) { | 21205 if ($notnull_bool($ne(extendsType, null) && !(typeArg instanceof Parameter
Type))) { |
19413 typeArg.ensureSubtypeOf((extendsType && extendsType.is$lang_Type()), typ
eRef.typeArguments.$index(i).get$span(), typeErrors); | 21206 typeArg.ensureSubtypeOf$3(extendsType, typeRef.typeArguments.$index(i).g
et$span(), typeErrors); |
19414 } | 21207 } |
19415 } | 21208 } |
19416 typeRef.type = baseType.getOrMakeConcreteType(typeArgs); | 21209 typeRef.type = baseType.getOrMakeConcreteType$1(typeArgs); |
19417 } | 21210 } |
19418 else if ((node instanceof FunctionTypeReference)) { | 21211 else if ((node instanceof FunctionTypeReference)) { |
19419 var typeRef = (node && node.is$FunctionTypeReference()); | 21212 var typeRef = (node && node.is$FunctionTypeReference()); |
19420 var name = ''; | 21213 var name = ''; |
19421 if (typeRef.func.name != null) name = typeRef.func.name.name; | 21214 if (typeRef.func.name != null) name = typeRef.func.name.name; |
19422 typeRef.type = this.library.getOrAddFunctionType($assert_String(name), typeR
ef.func, this); | 21215 typeRef.type = this.library.getOrAddFunctionType($assert_String(name), typeR
ef.func, this); |
19423 } | 21216 } |
19424 else { | 21217 else { |
19425 world.internalError('unknown type reference', node.span); | 21218 world.internalError('unknown type reference', node.span); |
19426 } | 21219 } |
19427 return node.type; | 21220 return node.type; |
19428 } | 21221 } |
19429 DefinedType.prototype.resolveTypeParams = function(inType) { | 21222 DefinedType.prototype.resolveTypeParams = function(inType) { |
19430 return this; | 21223 return this; |
19431 } | 21224 } |
19432 DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) { | 21225 DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) { |
19433 $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1226, 12); | 21226 $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1227, 12); |
19434 var names = [this.name]; | 21227 var names = [this.name]; |
19435 var typeMap = $map([]); | 21228 var typeMap = $map([]); |
19436 for (var i = 0; | 21229 for (var i = 0; |
19437 i < typeArgs.length; i++) { | 21230 i < typeArgs.length; i++) { |
19438 var paramName = this.typeParameters.$index(i).get$name(); | 21231 var paramName = this.typeParameters.$index(i).get$name(); |
19439 typeMap.$setindex(paramName, typeArgs.$index(i)); | 21232 typeMap.$setindex(paramName, typeArgs.$index(i)); |
19440 names.add(typeArgs.$index(i).get$name()); | 21233 names.add$1(typeArgs.$index(i).get$name()); |
19441 } | 21234 } |
19442 var concreteName = Strings.join((names && names.is$List$String()), '\$'); | 21235 var concreteName = Strings.join((names && names.is$List$String()), '\$'); |
19443 var ret = this._concreteTypes.$index(concreteName); | 21236 var ret = this._concreteTypes.$index(concreteName); |
19444 if ($notnull_bool(ret == null)) { | 21237 if ($notnull_bool(ret == null)) { |
19445 ret = new ConcreteType($assert_String(concreteName), this, typeMap, typeArgs
); | 21238 ret = new ConcreteType($assert_String(concreteName), this, typeMap, typeArgs
); |
19446 this._concreteTypes.$setindex(concreteName, ret); | 21239 this._concreteTypes.$setindex(concreteName, ret); |
19447 } | 21240 } |
19448 return (ret && ret.is$lang_Type()); | 21241 return (ret && ret.is$lang_Type()); |
19449 } | 21242 } |
19450 DefinedType.prototype.getCallStub = function(args) { | 21243 DefinedType.prototype.getCallStub = function(args) { |
19451 $assert(this.get$isFunction(), "isFunction", "type.dart", 1246, 12); | 21244 $assert(this.get$isFunction(), "isFunction", "type.dart", 1247, 12); |
19452 var name = _getCallStubName('call', args); | 21245 var name = _getCallStubName('call', args); |
19453 if (this.varStubs == null) this.varStubs = $map([]); | 21246 if (this.varStubs == null) this.varStubs = $map([]); |
19454 var stub = this.varStubs.$index(name); | 21247 var stub = this.varStubs.$index(name); |
19455 if ($notnull_bool(stub == null)) { | 21248 if ($notnull_bool(stub == null)) { |
19456 stub = new VarFunctionStub($assert_String(name), args); | 21249 stub = new VarFunctionStub($assert_String(name), args); |
19457 this.varStubs.$setindex(name, stub); | 21250 this.varStubs.$setindex(name, stub); |
19458 } | 21251 } |
19459 return (stub && stub.is$VarFunctionStub()); | 21252 return (stub && stub.is$VarFunctionStub()); |
19460 } | 21253 } |
| 21254 DefinedType.prototype.addDirectSubtype$1 = function($0) { |
| 21255 return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
| 21256 }; |
| 21257 DefinedType.prototype.addMethod$2 = function($0, $1) { |
| 21258 return this.addMethod($assert_String($0), ($1 && $1.is$FunctionDefinition())); |
| 21259 }; |
| 21260 DefinedType.prototype.getConstructor$1 = function($0) { |
| 21261 return this.getConstructor($assert_String($0)); |
| 21262 }; |
| 21263 DefinedType.prototype.getMember$1 = function($0) { |
| 21264 return this.getMember($assert_String($0)); |
| 21265 }; |
| 21266 DefinedType.prototype.getOrMakeConcreteType$1 = function($0) { |
| 21267 return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
| 21268 }; |
| 21269 DefinedType.prototype.markUsed$0 = function() { |
| 21270 return this.markUsed(); |
| 21271 }; |
| 21272 DefinedType.prototype.resolve$0 = function() { |
| 21273 return this.resolve(); |
| 21274 }; |
| 21275 DefinedType.prototype.resolveMember$1 = function($0) { |
| 21276 return this.resolveMember($assert_String($0)); |
| 21277 }; |
| 21278 DefinedType.prototype.resolveTypeParams$1 = function($0) { |
| 21279 return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
| 21280 }; |
| 21281 DefinedType.prototype.setDefinition$1 = function($0) { |
| 21282 return this.setDefinition(($0 && $0.is$Definition())); |
| 21283 }; |
19461 // ********** Code for FixedCollection ************** | 21284 // ********** Code for FixedCollection ************** |
19462 function FixedCollection(value, length) { | 21285 function FixedCollection(value, length) { |
19463 this.value = value; | 21286 this.value = value; |
19464 this.length = length; | 21287 this.length = length; |
19465 // Initializers done | 21288 // Initializers done |
19466 } | 21289 } |
| 21290 FixedCollection.prototype.is$Collection$E = function(){return this;}; |
| 21291 FixedCollection.prototype.is$Collection$Object = function(){return this;}; |
19467 FixedCollection.prototype.is$Collection$Type = function(){return this;}; | 21292 FixedCollection.prototype.is$Collection$Type = function(){return this;}; |
19468 FixedCollection.prototype.is$Iterable = function(){return this;}; | 21293 FixedCollection.prototype.is$Iterable = function(){return this;}; |
19469 FixedCollection.prototype.get$value = function() { return this.value; }; | 21294 FixedCollection.prototype.get$value = function() { return this.value; }; |
19470 FixedCollection.prototype.iterator = function() { | 21295 FixedCollection.prototype.iterator = function() { |
19471 return new FixedIterator$E(this.value, this.length); | 21296 return new FixedIterator$E(this.value, this.length); |
19472 } | 21297 } |
19473 FixedCollection.prototype.forEach = function(f) { | 21298 FixedCollection.prototype.forEach = function(f) { |
19474 Collections.forEach(this, f); | 21299 Collections.forEach(this, f); |
19475 } | 21300 } |
19476 FixedCollection.prototype.filter = function(f) { | 21301 FixedCollection.prototype.filter = function(f) { |
19477 return Collections.filter(this, new ListFactory$E(), f); | 21302 return Collections.filter(this, new ListFactory$E(), f); |
19478 } | 21303 } |
19479 FixedCollection.prototype.some = function(f) { | 21304 FixedCollection.prototype.some = function(f) { |
19480 return Collections.some(this, f); | 21305 return Collections.some(this, f); |
19481 } | 21306 } |
19482 FixedCollection.prototype.isEmpty = function() { | 21307 FixedCollection.prototype.isEmpty = function() { |
19483 return this.length == 0; | 21308 return this.length == 0; |
19484 } | 21309 } |
| 21310 FixedCollection.prototype.filter$1 = FixedCollection.prototype.filter; |
| 21311 FixedCollection.prototype.isEmpty$0 = function() { |
| 21312 return this.isEmpty(); |
| 21313 }; |
| 21314 FixedCollection.prototype.iterator$0 = function() { |
| 21315 return this.iterator(); |
| 21316 }; |
| 21317 FixedCollection.prototype.some$1 = FixedCollection.prototype.some; |
19485 // ********** Code for FixedCollection$Type ************** | 21318 // ********** Code for FixedCollection$Type ************** |
19486 function FixedCollection$Type(value, length) { | 21319 function FixedCollection$Type(value, length) { |
19487 this.value = value; | 21320 this.value = value; |
19488 this.length = length; | 21321 this.length = length; |
19489 // Initializers done | 21322 // Initializers done |
19490 } | 21323 } |
19491 $inherits(FixedCollection$Type, FixedCollection); | 21324 $inherits(FixedCollection$Type, FixedCollection); |
| 21325 FixedCollection$Type.prototype.is$Collection$E = function(){return this;}; |
| 21326 FixedCollection$Type.prototype.is$Collection$Object = function(){return this;}; |
19492 FixedCollection$Type.prototype.is$Collection$Type = function(){return this;}; | 21327 FixedCollection$Type.prototype.is$Collection$Type = function(){return this;}; |
19493 FixedCollection$Type.prototype.is$Iterable = function(){return this;}; | 21328 FixedCollection$Type.prototype.is$Iterable = function(){return this;}; |
19494 // ********** Code for FixedIterator ************** | 21329 // ********** Code for FixedIterator ************** |
19495 function FixedIterator(value, length) { | 21330 function FixedIterator(value, length) { |
19496 this._index = 0 | 21331 this._index = 0 |
19497 this.value = value; | 21332 this.value = value; |
19498 this.length = length; | 21333 this.length = length; |
19499 // Initializers done | 21334 // Initializers done |
19500 } | 21335 } |
19501 FixedIterator.prototype.is$Iterator$T = function(){return this;}; | 21336 FixedIterator.prototype.is$Iterator$T = function(){return this;}; |
19502 FixedIterator.prototype.get$value = function() { return this.value; }; | 21337 FixedIterator.prototype.get$value = function() { return this.value; }; |
19503 FixedIterator.prototype.hasNext = function() { | 21338 FixedIterator.prototype.hasNext = function() { |
19504 return this._index < this.length; | 21339 return this._index < this.length; |
19505 } | 21340 } |
19506 FixedIterator.prototype.next = function() { | 21341 FixedIterator.prototype.next = function() { |
19507 this._index++; | 21342 this._index++; |
19508 return this.value; | 21343 return this.value; |
19509 } | 21344 } |
| 21345 FixedIterator.prototype.hasNext$0 = function() { |
| 21346 return this.hasNext(); |
| 21347 }; |
| 21348 FixedIterator.prototype.next$0 = function() { |
| 21349 return this.next(); |
| 21350 }; |
19510 // ********** Code for FixedIterator$E ************** | 21351 // ********** Code for FixedIterator$E ************** |
19511 function FixedIterator$E(value, length) { | 21352 function FixedIterator$E(value, length) { |
19512 this._index = 0 | 21353 this._index = 0 |
19513 this.value = value; | 21354 this.value = value; |
19514 this.length = length; | 21355 this.length = length; |
19515 // Initializers done | 21356 // Initializers done |
19516 } | 21357 } |
19517 $inherits(FixedIterator$E, FixedIterator); | 21358 $inherits(FixedIterator$E, FixedIterator); |
19518 FixedIterator$E.prototype.is$Iterator$T = function(){return this;}; | 21359 FixedIterator$E.prototype.is$Iterator$T = function(){return this;}; |
19519 // ********** Code for Value ************** | 21360 // ********** Code for Value ************** |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19572 } | 21413 } |
19573 if ($notnull_bool(this.type.needsVarCall(args))) { | 21414 if ($notnull_bool(this.type.needsVarCall(args))) { |
19574 return this._varCall(context, args); | 21415 return this._varCall(context, args); |
19575 } | 21416 } |
19576 } | 21417 } |
19577 var member = this._resolveMember(context, name, node, isDynamic); | 21418 var member = this._resolveMember(context, name, node, isDynamic); |
19578 if ($notnull_bool(member == null)) { | 21419 if ($notnull_bool(member == null)) { |
19579 return this.invokeNoSuchMethod(context, name, node, args); | 21420 return this.invokeNoSuchMethod(context, name, node, args); |
19580 } | 21421 } |
19581 else { | 21422 else { |
19582 return member.invoke(context, node, this, args, isDynamic); | 21423 return member.invoke$5(context, node, this, args, isDynamic); |
19583 } | 21424 } |
19584 } | 21425 } |
19585 Value.prototype.canInvoke = function(context, name, args) { | 21426 Value.prototype.canInvoke = function(context, name, args) { |
19586 if ($notnull_bool(this.get$_typeIsVarOrParameterType() && name == '\$ne')) { | 21427 if ($notnull_bool(this.get$_typeIsVarOrParameterType() && name == '\$ne')) { |
19587 return true; | 21428 return true; |
19588 } | 21429 } |
19589 if ($notnull_bool(this.type.get$isVarOrFunction() && name == '\$call')) { | 21430 if ($notnull_bool(this.type.get$isVarOrFunction() && name == '\$call')) { |
19590 return true; | 21431 return true; |
19591 } | 21432 } |
19592 var member = this._resolveMember(context, name, null, true); | 21433 var member = this._resolveMember(context, name, null, true); |
19593 return $notnull_bool($ne(member, null) && member.canInvoke(context, args)); | 21434 return $notnull_bool($ne(member, null) && member.canInvoke$2(context, args)); |
19594 } | 21435 } |
19595 Value.prototype._hasOverriddenNoSuchMethod = function() { | 21436 Value.prototype._hasOverriddenNoSuchMethod = function() { |
19596 if ($notnull_bool(this.isSuper)) { | 21437 if ($notnull_bool(this.isSuper)) { |
19597 var m = this.type.getMember('noSuchMethod'); | 21438 var m = this.type.getMember('noSuchMethod'); |
19598 return $notnull_bool($ne(m, null) && !$notnull_bool(m.declaringType.get$isOb
ject())); | 21439 return $notnull_bool($ne(m, null) && !$notnull_bool(m.declaringType.get$isOb
ject())); |
19599 } | 21440 } |
19600 else { | 21441 else { |
19601 return this.type.resolveMember('noSuchMethod').members.length > 1; | 21442 return this.type.resolveMember('noSuchMethod').members.length > 1; |
19602 } | 21443 } |
19603 } | 21444 } |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19778 testCode = '!' + testCode; | 21619 testCode = '!' + testCode; |
19779 } | 21620 } |
19780 if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value())); | 21621 if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value())); |
19781 } | 21622 } |
19782 return new Value(world.nonNullBool, testCode, span, true); | 21623 return new Value(world.nonNullBool, testCode, span, true); |
19783 } | 21624 } |
19784 Value.prototype.convertWarning = function(toType, node) { | 21625 Value.prototype.convertWarning = function(toType, node) { |
19785 world.warning(('type "' + this.type.name + '" is not assignable to "' + toType
.name + '"'), node.span); | 21626 world.warning(('type "' + this.type.name + '" is not assignable to "' + toType
.name + '"'), node.span); |
19786 } | 21627 } |
19787 Value.prototype.invokeNoSuchMethod = function(context, name, node, args) { | 21628 Value.prototype.invokeNoSuchMethod = function(context, name, node, args) { |
19788 var $0; | |
19789 var pos = ''; | 21629 var pos = ''; |
19790 if (args != null) { | 21630 if (args != null) { |
19791 var argsCode = []; | 21631 var argsCode = []; |
19792 for (var i = 0; | 21632 for (var i = 0; |
19793 i < args.get$length(); i++) { | 21633 i < args.get$length(); i++) { |
19794 argsCode.add(args.values.$index(i).code); | 21634 argsCode.add$1(args.values.$index(i).code); |
19795 } | 21635 } |
19796 pos = Strings.join((argsCode && argsCode.is$List$String()), ", "); | 21636 pos = Strings.join((argsCode && argsCode.is$List$String()), ", "); |
19797 } | 21637 } |
19798 var noSuchArgs = [new Value(world.stringType, ('"' + name + '"'), node.span, t
rue), new Value(world.listType, ('[' + pos + ']'), node.span, true)]; | 21638 var noSuchArgs = [new Value(world.stringType, ('"' + name + '"'), node.span, t
rue), new Value(world.listType, ('[' + pos + ']'), node.span, true)]; |
19799 return (($0 = this._resolveMember(context, 'noSuchMethod', node, false).invoke
$4(context, node, this, new Arguments(null, noSuchArgs))) && $0.is$Value()); | 21639 return this._resolveMember(context, 'noSuchMethod', node, false).invoke$4(cont
ext, node, this, new Arguments(null, noSuchArgs)); |
19800 } | 21640 } |
19801 Value.prototype.invokeSpecial = function(name, args, returnType) { | 21641 Value.prototype.invokeSpecial = function(name, args, returnType) { |
19802 $assert(name.startsWith('\$'), "name.startsWith('\\$')", "value.dart", 449, 12
); | 21642 $assert(name.startsWith('\$'), "name.startsWith('\\$')", "value.dart", 449, 12
); |
19803 $assert(!$notnull_bool(args.get$hasNames()), "!args.hasNames", "value.dart", 4
50, 12); | 21643 $assert(!$notnull_bool(args.get$hasNames()), "!args.hasNames", "value.dart", 4
50, 12); |
19804 var argsString = args.getCode(); | 21644 var argsString = args.getCode(); |
19805 if (name == '\$index' || name == '\$setindex') { | 21645 if (name == '\$index' || name == '\$setindex') { |
19806 return new Value(returnType, ('' + this.code + '.' + name + '(' + argsString
+ ')'), this.span, true); | 21646 return new Value(returnType, ('' + this.code + '.' + name + '(' + argsString
+ ')'), this.span, true); |
19807 } | 21647 } |
19808 else { | 21648 else { |
19809 if (argsString.length > 0) argsString = (', ' + argsString + ''); | 21649 if (argsString.length > 0) argsString = (', ' + argsString + ''); |
19810 world.gen.corejs.useOperator(name); | 21650 world.gen.corejs.useOperator(name); |
19811 return new Value(returnType, ('' + name + '(' + this.code + '' + argsString
+ ')'), this.span, true); | 21651 return new Value(returnType, ('' + name + '(' + this.code + '' + argsString
+ ')'), this.span, true); |
19812 } | 21652 } |
19813 } | 21653 } |
| 21654 Value.prototype.checkFirstClass$1 = function($0) { |
| 21655 return this.checkFirstClass(($0 && $0.is$SourceSpan())); |
| 21656 }; |
| 21657 Value.prototype.convertTo$3 = function($0, $1, $2) { |
| 21658 return this.convertTo(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type(
)), ($2 && $2.is$lang_Node()), false); |
| 21659 }; |
| 21660 Value.prototype.convertTo$4 = function($0, $1, $2, $3) { |
| 21661 return this.convertTo(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type(
)), ($2 && $2.is$lang_Node()), $assert_bool($3)); |
| 21662 }; |
| 21663 Value.prototype.get_$3 = function($0, $1, $2) { |
| 21664 return this.get_(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $
2.is$lang_Node())); |
| 21665 }; |
| 21666 Value.prototype.instanceOf$3$isTrue$forceCheck = function($0, $1, $2, isTrue, fo
rceCheck) { |
| 21667 return this.instanceOf(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type
()), ($2 && $2.is$SourceSpan()), $assert_bool(isTrue), $assert_bool(forceCheck))
; |
| 21668 }; |
| 21669 Value.prototype.instanceOf$4 = function($0, $1, $2, $3) { |
| 21670 return this.instanceOf(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type
()), ($2 && $2.is$SourceSpan()), $assert_bool($3), false); |
| 21671 }; |
19814 Value.prototype.invoke$4 = function($0, $1, $2, $3) { | 21672 Value.prototype.invoke$4 = function($0, $1, $2, $3) { |
19815 return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 &&
$2.is$lang_Node()), ($3 && $3.is$Arguments()), false); | 21673 return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 &&
$2.is$lang_Node()), ($3 && $3.is$Arguments()), false); |
19816 } | 21674 }; |
19817 ; | 21675 Value.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
| 21676 return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 &&
$2.is$lang_Node()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
| 21677 }; |
| 21678 Value.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
| 21679 return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 &&
$2.is$lang_Node()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
| 21680 }; |
| 21681 Value.prototype.needsConversion$1 = function($0) { |
| 21682 return this.needsConversion(($0 && $0.is$lang_Type())); |
| 21683 }; |
| 21684 Value.prototype.set_$4 = function($0, $1, $2, $3) { |
| 21685 return this.set_(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $
2.is$lang_Node()), ($3 && $3.is$Value()), false); |
| 21686 }; |
19818 // ********** Code for EvaluatedValue ************** | 21687 // ********** Code for EvaluatedValue ************** |
19819 function EvaluatedValue() {} | 21688 function EvaluatedValue() {} |
19820 EvaluatedValue._internal$ctor = function(type, actualValue, canonicalCode, span,
code) { | 21689 EvaluatedValue._internal$ctor = function(type, actualValue, canonicalCode, span,
code) { |
19821 this.actualValue = actualValue; | 21690 this.actualValue = actualValue; |
19822 this.canonicalCode = canonicalCode; | 21691 this.canonicalCode = canonicalCode; |
19823 Value.call(this, type, code, span, false); | 21692 Value.call(this, type, code, span, false); |
19824 // Initializers done | 21693 // Initializers done |
19825 } | 21694 } |
19826 EvaluatedValue._internal$ctor.prototype = EvaluatedValue.prototype; | 21695 EvaluatedValue._internal$ctor.prototype = EvaluatedValue.prototype; |
19827 $inherits(EvaluatedValue, Value); | 21696 $inherits(EvaluatedValue, Value); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19872 ConstObjectValue._internal$ctor = function(type, fields, actualValue, canonicalC
ode, span, code) { | 21741 ConstObjectValue._internal$ctor = function(type, fields, actualValue, canonicalC
ode, span, code) { |
19873 this.fields = fields; | 21742 this.fields = fields; |
19874 EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actual
Value, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code)); | 21743 EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actual
Value, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code)); |
19875 // Initializers done | 21744 // Initializers done |
19876 } | 21745 } |
19877 ConstObjectValue._internal$ctor.prototype = ConstObjectValue.prototype; | 21746 ConstObjectValue._internal$ctor.prototype = ConstObjectValue.prototype; |
19878 $inherits(ConstObjectValue, EvaluatedValue); | 21747 $inherits(ConstObjectValue, EvaluatedValue); |
19879 ConstObjectValue.ConstObjectValue$factory = function(type, fields, canonicalCode
, span) { | 21748 ConstObjectValue.ConstObjectValue$factory = function(type, fields, canonicalCode
, span) { |
19880 var fieldValues = []; | 21749 var fieldValues = []; |
19881 var $list = fields.getKeys(); | 21750 var $list = fields.getKeys(); |
19882 for (var $i = fields.getKeys().iterator(); $i.hasNext(); ) { | 21751 for (var $i = fields.getKeys().iterator$0(); $i.hasNext$0(); ) { |
19883 var f = $i.next(); | 21752 var f = $i.next$0(); |
19884 fieldValues.add(('' + f + ' = ' + fields.$index(f).get$actualValue() + '')); | 21753 fieldValues.add(('' + f + ' = ' + fields.$index(f).get$actualValue() + '')); |
19885 } | 21754 } |
19886 fieldValues.sort((function (a, b) { | 21755 fieldValues.sort((function (a, b) { |
19887 return a.compareTo(b); | 21756 return a.compareTo$1(b); |
19888 }) | 21757 }) |
19889 ); | 21758 ); |
19890 var actualValue = ('const ' + type.get$jsname() + ' [') + Strings.join(fieldVa
lues, ',') + ']'; | 21759 var actualValue = ('const ' + type.get$jsname() + ' [') + Strings.join(fieldVa
lues, ',') + ']'; |
19891 return new ConstObjectValue._internal$ctor(type, fields, actualValue, canonica
lCode, span, EvaluatedValue.codeWithComments(canonicalCode, span)); | 21760 return new ConstObjectValue._internal$ctor(type, fields, actualValue, canonica
lCode, span, EvaluatedValue.codeWithComments(canonicalCode, span)); |
19892 } | 21761 } |
19893 // ********** Code for GlobalValue ************** | 21762 // ********** Code for GlobalValue ************** |
19894 function GlobalValue(type, code, isConst, field, name, exp, canonicalCode, span,
dependencies) { | 21763 function GlobalValue(type, code, isConst, field, name, exp, canonicalCode, span,
dependencies) { |
19895 this.field = field; | 21764 this.field = field; |
19896 this.name = name; | 21765 this.name = name; |
19897 this.exp = exp; | 21766 this.exp = exp; |
19898 this.canonicalCode = canonicalCode; | 21767 this.canonicalCode = canonicalCode; |
19899 this.dependencies = dependencies; | 21768 this.dependencies = dependencies; |
19900 Value.call(this, type, code, span, !$notnull_bool(isConst)); | 21769 Value.call(this, type, code, span, !$notnull_bool(isConst)); |
19901 // Initializers done | 21770 // Initializers done |
19902 } | 21771 } |
19903 $inherits(GlobalValue, Value); | 21772 $inherits(GlobalValue, Value); |
19904 GlobalValue.prototype.is$GlobalValue = function(){return this;}; | 21773 GlobalValue.prototype.is$GlobalValue = function(){return this;}; |
| 21774 GlobalValue.prototype.is$Comparable = function(){return this;}; |
19905 GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies)
{ | 21775 GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies)
{ |
19906 var code = ($notnull_bool(exp.get$isConst()) ? exp.get$canonicalCode() : exp.c
ode); | 21776 var code = ($notnull_bool(exp.get$isConst()) ? exp.get$canonicalCode() : exp.c
ode); |
19907 var codeWithComment = ('' + code + '/*' + field.declaringType.name + '.' + fie
ld.get$name() + '*/'); | 21777 var codeWithComment = ('' + code + '/*' + field.declaringType.name + '.' + fie
ld.get$name() + '*/'); |
19908 return new GlobalValue(exp.type, $assert_String(codeWithComment), field.isFina
l, field, null, exp, code, exp.span, dependencies.filter((function (d) { | 21778 return new GlobalValue(exp.type, $assert_String(codeWithComment), field.isFina
l, field, null, exp, code, exp.span, dependencies.filter$1((function (d) { |
19909 return (d instanceof GlobalValue); | 21779 return (d instanceof GlobalValue); |
19910 }) | 21780 }) |
19911 )); | 21781 )); |
19912 } | 21782 } |
19913 GlobalValue.GlobalValue$fromConst$factory = function(uniqueId, exp, dependencies
) { | 21783 GlobalValue.GlobalValue$fromConst$factory = function(uniqueId, exp, dependencies
) { |
19914 var name = ("const\$" + uniqueId + ""); | 21784 var name = ("const\$" + uniqueId + ""); |
19915 var codeWithComment = ("" + name + "/*" + exp.span.get$text() + "*/"); | 21785 var codeWithComment = ("" + name + "/*" + exp.span.get$text() + "*/"); |
19916 return new GlobalValue(exp.type, $assert_String(codeWithComment), true, null,
name, exp, name, exp.span, dependencies.filter((function (d) { | 21786 return new GlobalValue(exp.type, $assert_String(codeWithComment), true, null,
name, exp, name, exp.span, dependencies.filter$1((function (d) { |
19917 return (d instanceof GlobalValue); | 21787 return (d instanceof GlobalValue); |
19918 }) | 21788 }) |
19919 )); | 21789 )); |
19920 } | 21790 } |
19921 GlobalValue.prototype.get$name = function() { return this.name; }; | 21791 GlobalValue.prototype.get$name = function() { return this.name; }; |
19922 GlobalValue.prototype.set$name = function(value) { return this.name = value; }; | 21792 GlobalValue.prototype.set$name = function(value) { return this.name = value; }; |
19923 GlobalValue.prototype.get$canonicalCode = function() { return this.canonicalCode
; }; | 21793 GlobalValue.prototype.get$canonicalCode = function() { return this.canonicalCode
; }; |
19924 GlobalValue.prototype.set$canonicalCode = function(value) { return this.canonica
lCode = value; }; | 21794 GlobalValue.prototype.set$canonicalCode = function(value) { return this.canonica
lCode = value; }; |
19925 GlobalValue.prototype.get$isConst = function() { | 21795 GlobalValue.prototype.get$isConst = function() { |
19926 return $notnull_bool(this.exp.get$isConst() && ($notnull_bool(this.field == nu
ll || this.field.isFinal))); | 21796 return $notnull_bool(this.exp.get$isConst() && ($notnull_bool(this.field == nu
ll || this.field.isFinal))); |
(...skipping 23 matching lines...) Expand all Loading... |
19950 else if (this.name != null && other.name == null) { | 21820 else if (this.name != null && other.name == null) { |
19951 return -1; | 21821 return -1; |
19952 } | 21822 } |
19953 else if (this.name != null) { | 21823 else if (this.name != null) { |
19954 return this.name.compareTo(other.name); | 21824 return this.name.compareTo(other.name); |
19955 } | 21825 } |
19956 else { | 21826 else { |
19957 return this.field.name.compareTo(other.field.name); | 21827 return this.field.name.compareTo(other.field.name); |
19958 } | 21828 } |
19959 } | 21829 } |
| 21830 GlobalValue.prototype.compareTo$1 = function($0) { |
| 21831 return this.compareTo(($0 && $0.is$GlobalValue())); |
| 21832 }; |
19960 // ********** Code for BareValue ************** | 21833 // ********** Code for BareValue ************** |
19961 function BareValue(home, outermost, span) { | 21834 function BareValue(home, outermost, span) { |
19962 this.home = home; | 21835 this.home = home; |
19963 Value.call(this, outermost.method.declaringType, null, span, false); | 21836 Value.call(this, outermost.method.declaringType, null, span, false); |
19964 // Initializers done | 21837 // Initializers done |
19965 this.isType = outermost.get$isStatic(); | 21838 this.isType = outermost.get$isStatic(); |
19966 } | 21839 } |
19967 $inherits(BareValue, Value); | 21840 $inherits(BareValue, Value); |
19968 BareValue.prototype._tryResolveMember = function(context, name) { | 21841 BareValue.prototype._tryResolveMember = function(context, name) { |
19969 $assert($eq(context, this.home), "context == home", "value.dart", 654, 12); | 21842 $assert($eq(context, this.home), "context == home", "value.dart", 654, 12); |
(...skipping 21 matching lines...) Expand all Loading... |
19991 // Initializers done | 21864 // Initializers done |
19992 } | 21865 } |
19993 CompilerException.prototype.toString = function() { | 21866 CompilerException.prototype.toString = function() { |
19994 if (this._location != null) { | 21867 if (this._location != null) { |
19995 return ('CompilerException: ' + this._location.toMessageString(this._lang_me
ssage) + ''); | 21868 return ('CompilerException: ' + this._location.toMessageString(this._lang_me
ssage) + ''); |
19996 } | 21869 } |
19997 else { | 21870 else { |
19998 return ('CompilerException: ' + this._lang_message + ''); | 21871 return ('CompilerException: ' + this._lang_message + ''); |
19999 } | 21872 } |
20000 } | 21873 } |
| 21874 CompilerException.prototype.toString$0 = function() { |
| 21875 return this.toString(); |
| 21876 }; |
20001 // ********** Code for World ************** | 21877 // ********** Code for World ************** |
20002 function World(files) { | 21878 function World(files) { |
20003 this.errors = 0 | 21879 this.errors = 0 |
20004 this.warnings = 0 | 21880 this.warnings = 0 |
20005 this.dartBytesRead = 0 | 21881 this.dartBytesRead = 0 |
20006 this.jsBytesWritten = 0 | 21882 this.jsBytesWritten = 0 |
20007 this.seenFatal = false | 21883 this.seenFatal = false |
20008 this.files = files; | 21884 this.files = files; |
20009 this.libraries = $map([]); | 21885 this.libraries = $map([]); |
20010 this._todo = []; | 21886 this._todo = []; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20045 World.prototype._addMember = function(member) { | 21921 World.prototype._addMember = function(member) { |
20046 $assert(!$notnull_bool(member.get$isPrivate()), "!member.isPrivate", "world.da
rt", 145, 12); | 21922 $assert(!$notnull_bool(member.get$isPrivate()), "!member.isPrivate", "world.da
rt", 145, 12); |
20047 if ($notnull_bool(member.get$isStatic())) { | 21923 if ($notnull_bool(member.get$isStatic())) { |
20048 if ($notnull_bool(member.declaringType.get$isTop())) { | 21924 if ($notnull_bool(member.declaringType.get$isTop())) { |
20049 this._addTopName(member); | 21925 this._addTopName(member); |
20050 } | 21926 } |
20051 return; | 21927 return; |
20052 } | 21928 } |
20053 var mset = this._members.$index(member.name); | 21929 var mset = this._members.$index(member.name); |
20054 if ($notnull_bool(mset == null)) { | 21930 if ($notnull_bool(mset == null)) { |
20055 mset = new MemberSet(member); | 21931 mset = new MemberSet(member, true); |
20056 this._members.$setindex(mset.get$name(), mset); | 21932 this._members.$setindex(mset.get$name(), mset); |
20057 } | 21933 } |
20058 else { | 21934 else { |
20059 mset.get$members().add(member); | 21935 mset.get$members().add$1(member); |
20060 } | 21936 } |
20061 } | 21937 } |
20062 World.prototype._addTopName = function(named) { | 21938 World.prototype._addTopName = function(named) { |
20063 var existing = this._topNames.$index(named.get$name()); | 21939 var existing = this._topNames.$index(named.get$name()); |
20064 if ($notnull_bool($ne(existing, null))) { | 21940 if ($notnull_bool($ne(existing, null))) { |
20065 this.info(('mangling matching top level name "' + named.get$name() + '" in '
) + ('both "' + named.get$library().name + '" and "' + existing.get$library().na
me + '"')); | 21941 this.info(('mangling matching top level name "' + named.get$name() + '" in '
) + ('both "' + named.get$library().name + '" and "' + existing.get$library().na
me + '"')); |
20066 if ($notnull_bool(named.get$isNative())) { | 21942 if ($notnull_bool(named.get$isNative())) { |
20067 if ($notnull_bool(existing.get$isNative())) { | 21943 if ($notnull_bool(existing.get$isNative())) { |
20068 world.internalError(('conflicting native names "' + named.get$name() + '
" ') + ('(already defined in ' + existing.get$span().get$locationText() + ')'),
named.get$span()); | 21944 world.internalError(('conflicting native names "' + named.get$name() + '
" ') + ('(already defined in ' + existing.get$span().get$locationText() + ')'),
named.get$span()); |
20069 } | 21945 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20159 }) | 22035 }) |
20160 ); | 22036 ); |
20161 this.withTiming('generate code', (function () { | 22037 this.withTiming('generate code', (function () { |
20162 var mainMembers = lib.topType.resolveMember('main'); | 22038 var mainMembers = lib.topType.resolveMember('main'); |
20163 var main = null; | 22039 var main = null; |
20164 if ($notnull_bool(mainMembers == null || mainMembers.get$members().length ==
0)) { | 22040 if ($notnull_bool(mainMembers == null || mainMembers.get$members().length ==
0)) { |
20165 $this.fatal('no main method specified'); | 22041 $this.fatal('no main method specified'); |
20166 } | 22042 } |
20167 else if (mainMembers.get$members().length > 1) { | 22043 else if (mainMembers.get$members().length > 1) { |
20168 var $list = mainMembers.get$members(); | 22044 var $list = mainMembers.get$members(); |
20169 for (var $i = mainMembers.get$members().iterator(); $i.hasNext(); ) { | 22045 for (var $i = mainMembers.get$members().iterator$0(); $i.hasNext$0(); ) { |
20170 var m = $i.next(); | 22046 var m = $i.next$0(); |
20171 main = m; | 22047 main = m; |
20172 $this.error('more than one main member (using last?)', main.get$span()); | 22048 $this.error('more than one main member (using last?)', main.get$span()); |
20173 } | 22049 } |
20174 } | 22050 } |
20175 else { | 22051 else { |
20176 main = mainMembers.get$members().$index(0); | 22052 main = mainMembers.get$members().$index(0); |
20177 } | 22053 } |
20178 var codeWriter = new CodeWriter(); | 22054 var codeWriter = new CodeWriter(); |
20179 $this.gen = new WorldGenerator(main, codeWriter); | 22055 $this.gen = new WorldGenerator(main, codeWriter); |
20180 $this.gen.run(); | 22056 $this.gen.run(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20218 this._todo.add(library); | 22094 this._todo.add(library); |
20219 } | 22095 } |
20220 return library; | 22096 return library; |
20221 } | 22097 } |
20222 World.prototype.process = function() { | 22098 World.prototype.process = function() { |
20223 while (this._todo.length > 0) { | 22099 while (this._todo.length > 0) { |
20224 var todo = this._todo; | 22100 var todo = this._todo; |
20225 this._todo = []; | 22101 this._todo = []; |
20226 for (var $i = 0;$i < todo.length; $i++) { | 22102 for (var $i = 0;$i < todo.length; $i++) { |
20227 var lib = todo.$index($i); | 22103 var lib = todo.$index($i); |
20228 lib.visitSources(); | 22104 lib.visitSources$0(); |
20229 } | 22105 } |
20230 } | 22106 } |
20231 } | 22107 } |
20232 World.prototype.processScript = function(filename) { | 22108 World.prototype.processScript = function(filename) { |
20233 var library = this.getOrAddLibrary(filename); | 22109 var library = this.getOrAddLibrary(filename); |
20234 this.process(); | 22110 this.process(); |
20235 return library; | 22111 return library; |
20236 } | 22112 } |
20237 World.prototype.resolveAll = function() { | 22113 World.prototype.resolveAll = function() { |
20238 var $list = this.libraries.getValues(); | 22114 var $list = this.libraries.getValues(); |
20239 for (var $i = this.libraries.getValues().iterator(); $i.hasNext(); ) { | 22115 for (var $i = this.libraries.getValues().iterator$0(); $i.hasNext$0(); ) { |
20240 var lib = $i.next(); | 22116 var lib = $i.next$0(); |
20241 lib.resolve(); | 22117 lib.resolve$0(); |
20242 } | 22118 } |
20243 } | 22119 } |
20244 World.prototype._message = function(message, span, span1, span2, throwing) { | 22120 World.prototype._message = function(message, span, span1, span2, throwing) { |
20245 var text = message; | 22121 var text = message; |
20246 if (span != null) { | 22122 if (span != null) { |
20247 text = span.toMessageString(message); | 22123 text = span.toMessageString(message); |
20248 } | 22124 } |
20249 print(text); | 22125 print(text); |
20250 if (span1 != null) { | 22126 if (span1 != null) { |
20251 print(span1.toMessageString(message)); | 22127 print(span1.toMessageString(message)); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20393 this.throwOnWarnings = true; | 22269 this.throwOnWarnings = true; |
20394 continue loop; | 22270 continue loop; |
20395 | 22271 |
20396 case '--compile-only': | 22272 case '--compile-only': |
20397 | 22273 |
20398 this.compileOnly = true; | 22274 this.compileOnly = true; |
20399 continue loop; | 22275 continue loop; |
20400 | 22276 |
20401 default: | 22277 default: |
20402 | 22278 |
20403 if (arg.endsWith('.dart')) { | 22279 if ($notnull_bool(arg.endsWith$1('.dart'))) { |
20404 this.dartScript = $assert_String(arg); | 22280 this.dartScript = $assert_String(arg); |
20405 this.childArgs = (($0 = args.getRange(i + 1, args.length - i - 1)) &&
$0.is$List$String()); | 22281 this.childArgs = (($0 = args.getRange(i + 1, args.length - i - 1)) &&
$0.is$List$String()); |
20406 break loop; | 22282 break loop; |
20407 } | 22283 } |
20408 else if (arg.startsWith('--out=')) { | 22284 else if ($notnull_bool(arg.startsWith$1('--out='))) { |
20409 this.outfile = arg.substring('--out='.length); | 22285 this.outfile = arg.substring$1('--out='.length); |
20410 } | 22286 } |
20411 else if (arg.startsWith('--libdir=')) { | 22287 else if ($notnull_bool(arg.startsWith$1('--libdir='))) { |
20412 this.libDir = arg.substring('--libdir='.length); | 22288 this.libDir = $assert_String(arg.substring$1('--libdir='.length)); |
20413 passedLibDir = true; | 22289 passedLibDir = true; |
20414 } | 22290 } |
20415 else { | 22291 else { |
20416 if (!$notnull_bool(ignoreUnrecognizedFlags)) { | 22292 if (!$notnull_bool(ignoreUnrecognizedFlags)) { |
20417 print(('unrecognized flag: "' + arg + '"')); | 22293 print(('unrecognized flag: "' + arg + '"')); |
20418 } | 22294 } |
20419 } | 22295 } |
20420 | 22296 |
20421 } | 22297 } |
20422 } | 22298 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20454 // Initializers done | 22330 // Initializers done |
20455 } | 22331 } |
20456 VarMember.prototype.is$VarMember = function(){return this;}; | 22332 VarMember.prototype.is$VarMember = function(){return this;}; |
20457 VarMember.prototype.get$name = function() { return this.name; }; | 22333 VarMember.prototype.get$name = function() { return this.name; }; |
20458 VarMember.prototype.get$returnType = function() { | 22334 VarMember.prototype.get$returnType = function() { |
20459 return world.varType; | 22335 return world.varType; |
20460 } | 22336 } |
20461 VarMember.prototype.invoke = function(context, node, target, args) { | 22337 VarMember.prototype.invoke = function(context, node, target, args) { |
20462 return new Value(this.get$returnType(), ('' + target.code + '.' + this.name +
'(' + args.getCode() + ')'), node.span, true); | 22338 return new Value(this.get$returnType(), ('' + target.code + '.' + this.name +
'(' + args.getCode() + ')'), node.span, true); |
20463 } | 22339 } |
| 22340 VarMember.prototype.generate$1 = function($0) { |
| 22341 return this.generate(($0 && $0.is$CodeWriter())); |
| 22342 }; |
20464 VarMember.prototype.invoke$4 = function($0, $1, $2, $3) { | 22343 VarMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
20465 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments())); | 22344 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments())); |
20466 } | 22345 }; |
20467 ; | |
20468 // ********** Code for VarFunctionStub ************** | 22346 // ********** Code for VarFunctionStub ************** |
20469 function VarFunctionStub(name, callArgs) { | 22347 function VarFunctionStub(name, callArgs) { |
20470 this.args = callArgs.toCallStubArgs(); | 22348 this.args = callArgs.toCallStubArgs(); |
20471 VarMember.call(this, name); | 22349 VarMember.call(this, name); |
20472 // Initializers done | 22350 // Initializers done |
20473 world.gen.corejs.useGenStub = true; | 22351 world.gen.corejs.useGenStub = true; |
20474 } | 22352 } |
20475 $inherits(VarFunctionStub, VarMember); | 22353 $inherits(VarFunctionStub, VarMember); |
20476 VarFunctionStub.prototype.is$VarFunctionStub = function(){return this;}; | 22354 VarFunctionStub.prototype.is$VarFunctionStub = function(){return this;}; |
20477 VarFunctionStub.prototype.generate = function(code) { | 22355 VarFunctionStub.prototype.generate = function(code) { |
(...skipping 18 matching lines...) Expand all Loading... |
20496 w.writeln(('function to\$' + this.name + '(f) { return f && f.to\$' + this.nam
e + '(); }')); | 22374 w.writeln(('function to\$' + this.name + '(f) { return f && f.to\$' + this.nam
e + '(); }')); |
20497 } | 22375 } |
20498 VarFunctionStub.prototype.generateNamed = function(w) { | 22376 VarFunctionStub.prototype.generateNamed = function(w) { |
20499 var named = Strings.join(this.args.getNames(), '", "'); | 22377 var named = Strings.join(this.args.getNames(), '", "'); |
20500 var argsCode = this.args.getCode(); | 22378 var argsCode = this.args.getCode(); |
20501 w.enterBlock(('Function.prototype.' + this.name + ' = function(' + argsCode +
') {')); | 22379 w.enterBlock(('Function.prototype.' + this.name + ' = function(' + argsCode +
') {')); |
20502 w.writeln(('this.' + this.name + ' = this.\$genStub(' + this.args.get$length()
+ ', ["' + named + '"]);')); | 22380 w.writeln(('this.' + this.name + ' = this.\$genStub(' + this.args.get$length()
+ ', ["' + named + '"]);')); |
20503 w.writeln(('return this.' + this.name + '(' + argsCode + ');')); | 22381 w.writeln(('return this.' + this.name + '(' + argsCode + ');')); |
20504 w.exitBlock('}'); | 22382 w.exitBlock('}'); |
20505 } | 22383 } |
| 22384 VarFunctionStub.prototype.generate$1 = function($0) { |
| 22385 return this.generate(($0 && $0.is$CodeWriter())); |
| 22386 }; |
20506 // ********** Code for VarMethodStub ************** | 22387 // ********** Code for VarMethodStub ************** |
20507 function VarMethodStub(name, member, args, body) { | 22388 function VarMethodStub(name, member, args, body) { |
20508 this.member = member; | 22389 this.member = member; |
20509 this.args = args; | 22390 this.args = args; |
20510 this.body = body; | 22391 this.body = body; |
20511 VarMember.call(this, name); | 22392 VarMember.call(this, name); |
20512 // Initializers done | 22393 // Initializers done |
20513 } | 22394 } |
20514 $inherits(VarMethodStub, VarMember); | 22395 $inherits(VarMethodStub, VarMember); |
20515 VarMethodStub.prototype.get$returnType = function() { | 22396 VarMethodStub.prototype.get$returnType = function() { |
20516 var $0; | 22397 var $0; |
20517 return (($0 = this.member != null ? this.member.get$returnType() : world.varTy
pe) && $0.is$lang_Type()); | 22398 return (($0 = this.member != null ? this.member.get$returnType() : world.varTy
pe) && $0.is$lang_Type()); |
20518 } | 22399 } |
20519 VarMethodStub.prototype.get$typeName = function() { | 22400 VarMethodStub.prototype.get$typeName = function() { |
20520 return this.member != null ? this.member.declaringType.get$jsname() : 'Object'
; | 22401 return this.member != null ? this.member.declaringType.get$jsname() : 'Object'
; |
20521 } | 22402 } |
20522 VarMethodStub.prototype.generate = function(code) { | 22403 VarMethodStub.prototype.generate = function(code) { |
20523 code.write(('' + this.get$typeName() + '.prototype.' + this.name + ' = ')); | 22404 code.write(('' + this.get$typeName() + '.prototype.' + this.name + ' = ')); |
20524 this.generateBody(code); | 22405 this.generateBody(code, ';'); |
20525 code.writeln(';'); | |
20526 } | 22406 } |
20527 VarMethodStub.prototype.generateBody = function(code) { | 22407 VarMethodStub.prototype.generateBody = function(code, end) { |
20528 if ($notnull_bool(this._useDirectCall(this.member, this.args))) { | 22408 if ($notnull_bool(this._useDirectCall(this.member, this.args))) { |
20529 code.write(('' + this.get$typeName() + '.prototype.' + this.member.get$jsnam
e() + '')); | 22409 code.writeln(('' + this.get$typeName() + '.prototype.' + this.member.get$jsn
ame() + '' + end + '')); |
20530 } | 22410 } |
20531 else { | 22411 else { |
20532 code.enterBlock(('function(' + this.args.getCode() + ') {')); | 22412 code.enterBlock(('function(' + this.args.getCode() + ') {')); |
20533 code.writeln(('return ' + this.body.code + ';')); | 22413 code.writeln(('return ' + this.body.code + ';')); |
20534 code.exitBlock('}'); | 22414 code.exitBlock(('}' + end + '')); |
20535 } | 22415 } |
20536 } | 22416 } |
20537 VarMethodStub.prototype._useDirectCall = function(member, args) { | 22417 VarMethodStub.prototype._useDirectCall = function(member, args) { |
20538 if ((member instanceof MethodMember) && $ne(member.declaringType.get$library()
, world.get$dom())) { | 22418 if ((member instanceof MethodMember) && $ne(member.declaringType.get$library()
, world.get$dom())) { |
20539 var method = (member && member.is$MethodMember()); | 22419 var method = (member && member.is$MethodMember()); |
20540 if ($notnull_bool(method.needsArgumentConversion(args))) { | 22420 if ($notnull_bool(method.needsArgumentConversion(args))) { |
20541 return false; | 22421 return false; |
20542 } | 22422 } |
20543 for (var i = args.get$length(); | 22423 for (var i = args.get$length(); |
20544 i < method.parameters.length; i++) { | 22424 i < method.parameters.length; i++) { |
20545 if (method.parameters.$index(i).get$value().code != 'null') { | 22425 if (method.parameters.$index(i).get$value().code != 'null') { |
20546 return false; | 22426 return false; |
20547 } | 22427 } |
20548 } | 22428 } |
20549 return method.namesInOrder(args); | 22429 return method.namesInOrder(args); |
20550 } | 22430 } |
20551 else { | 22431 else { |
20552 return false; | 22432 return false; |
20553 } | 22433 } |
20554 } | 22434 } |
| 22435 VarMethodStub.prototype.generate$1 = function($0) { |
| 22436 return this.generate(($0 && $0.is$CodeWriter())); |
| 22437 }; |
| 22438 VarMethodStub.prototype.generateBody$2 = function($0, $1) { |
| 22439 return this.generateBody(($0 && $0.is$CodeWriter()), $assert_String($1)); |
| 22440 }; |
20555 // ********** Code for VarMethodSet ************** | 22441 // ********** Code for VarMethodSet ************** |
20556 function VarMethodSet(name, members, callArgs, returnType) { | 22442 function VarMethodSet(name, members, callArgs, returnType) { |
20557 this.members = members; | 22443 this.members = members; |
20558 this.returnType = returnType; | 22444 this.returnType = returnType; |
20559 this.args = callArgs.toCallStubArgs(); | 22445 this.args = callArgs.toCallStubArgs(); |
20560 VarMember.call(this, name); | 22446 VarMember.call(this, name); |
20561 // Initializers done | 22447 // Initializers done |
20562 } | 22448 } |
20563 $inherits(VarMethodSet, VarMember); | 22449 $inherits(VarMethodSet, VarMember); |
20564 VarMethodSet.prototype.get$members = function() { return this.members; }; | 22450 VarMethodSet.prototype.get$members = function() { return this.members; }; |
20565 VarMethodSet.prototype.get$returnType = function() { return this.returnType; }; | 22451 VarMethodSet.prototype.get$returnType = function() { return this.returnType; }; |
20566 VarMethodSet.prototype.get$baseName = function() { | 22452 VarMethodSet.prototype.get$baseName = function() { |
20567 return $assert_String(this.members.$index(0).get$name()); | 22453 return $assert_String(this.members.$index(0).get$name()); |
20568 } | 22454 } |
20569 VarMethodSet.prototype.invoke = function(context, node, target, args) { | 22455 VarMethodSet.prototype.invoke = function(context, node, target, args) { |
20570 this._invokeMembers(context, node); | 22456 this._invokeMembers(context, node); |
20571 return VarMember.prototype.invoke.call(this, context, node, target, args); | 22457 return VarMember.prototype.invoke.call(this, context, node, target, args); |
20572 } | 22458 } |
20573 VarMethodSet.prototype._invokeMembers = function(context, node) { | 22459 VarMethodSet.prototype._invokeMembers = function(context, node) { |
20574 if (this._fallbackStubs != null) return; | 22460 if (this._fallbackStubs != null) return; |
| 22461 var objectStub = null; |
20575 this._fallbackStubs = []; | 22462 this._fallbackStubs = []; |
20576 var $list = this.members; | 22463 var $list = this.members; |
20577 for (var $i = 0;$i < $list.length; $i++) { | 22464 for (var $i = 0;$i < $list.length; $i++) { |
20578 var member = $list.$index($i); | 22465 var member = $list.$index($i); |
20579 var target = new Value(member.declaringType, 'this', node.span, true); | 22466 var target = new Value(member.declaringType, 'this', node.span, true); |
20580 var result = member.invoke$4(context, node, target, this.args); | 22467 var result = member.invoke$4(context, node, target, this.args); |
20581 var stub = new VarMethodStub(this.name, member, this.args, result); | 22468 var stub = new VarMethodStub(this.name, member, this.args, result); |
20582 var type = member.declaringType; | 22469 var type = member.declaringType; |
20583 if ($ne(type.get$library(), world.get$dom()) && !$notnull_bool(type.get$isOb
ject())) { | 22470 if ($notnull_bool(type.get$isObject())) { |
| 22471 objectStub = stub; |
| 22472 } |
| 22473 else if ($ne(type.get$library(), world.get$dom())) { |
20584 VarMethodSet._addVarStub((type && type.is$lang_Type()), (stub && stub.is$V
arMember())); | 22474 VarMethodSet._addVarStub((type && type.is$lang_Type()), (stub && stub.is$V
arMember())); |
20585 } | 22475 } |
20586 else { | 22476 else { |
20587 this._fallbackStubs.add(stub); | 22477 this._fallbackStubs.add(stub); |
20588 } | 22478 } |
20589 } | 22479 } |
20590 var target = new Value(world.objectType, 'this', node.span, true); | 22480 if ($notnull_bool(objectStub == null)) { |
20591 var result = target.invokeNoSuchMethod(context, this.get$baseName(), node, thi
s.args); | 22481 var target = new Value(world.objectType, 'this', node.span, true); |
20592 var stub = new VarMethodStub(this.name, null, this.args, result); | 22482 var result = target.invokeNoSuchMethod(context, this.get$baseName(), node, t
his.args); |
| 22483 objectStub = new VarMethodStub(this.name, null, this.args, result); |
| 22484 } |
20593 if (this._fallbackStubs.length == 0) { | 22485 if (this._fallbackStubs.length == 0) { |
20594 VarMethodSet._addVarStub(world.objectType, (stub && stub.is$VarMember())); | 22486 VarMethodSet._addVarStub(world.objectType, (objectStub && objectStub.is$VarM
ember())); |
20595 } | 22487 } |
20596 else { | 22488 else { |
20597 this._fallbackStubs.add(stub); | 22489 this._fallbackStubs.add(objectStub); |
20598 world.gen.corejs.useVarMethod = true; | 22490 world.gen.corejs.useVarMethod = true; |
20599 } | 22491 } |
20600 } | 22492 } |
20601 VarMethodSet._addVarStub = function(type, stub) { | 22493 VarMethodSet._addVarStub = function(type, stub) { |
20602 if (type.varStubs == null) type.varStubs = $map([]); | 22494 if (type.varStubs == null) type.varStubs = $map([]); |
20603 type.varStubs.$setindex(stub.name, stub); | 22495 type.varStubs.$setindex(stub.name, stub); |
20604 } | 22496 } |
20605 VarMethodSet.prototype.generate = function(code) { | 22497 VarMethodSet.prototype.generate = function(code) { |
20606 if (this._fallbackStubs.length == 0) return; | 22498 if (this._fallbackStubs.length == 0) return; |
20607 code.enterBlock(('\$varMethod("' + this.name + '", {')); | 22499 code.enterBlock(('\$varMethod("' + this.name + '", {')); |
20608 var lastOne = this._fallbackStubs.$index(this._fallbackStubs.length - 1); | 22500 var lastOne = this._fallbackStubs.last(); |
20609 var $list = this._fallbackStubs; | 22501 var $list = this._fallbackStubs; |
20610 for (var $i = 0;$i < $list.length; $i++) { | 22502 for (var $i = 0;$i < $list.length; $i++) { |
20611 var stub = $list.$index($i); | 22503 var stub = $list.$index($i); |
20612 code.write(('"' + stub.get$typeName() + '": ')); | 22504 code.write(('"' + stub.get$typeName() + '": ')); |
20613 stub.generateBody(code); | 22505 stub.generateBody$2(code, $notnull_bool($eq(stub, lastOne)) ? '' : ','); |
20614 code.writeln($notnull_bool($eq(stub, lastOne)) ? '' : ','); | |
20615 } | 22506 } |
20616 code.exitBlock('});'); | 22507 code.exitBlock('});'); |
20617 } | 22508 } |
| 22509 VarMethodSet.prototype.generate$1 = function($0) { |
| 22510 return this.generate(($0 && $0.is$CodeWriter())); |
| 22511 }; |
20618 VarMethodSet.prototype.invoke$4 = function($0, $1, $2, $3) { | 22512 VarMethodSet.prototype.invoke$4 = function($0, $1, $2, $3) { |
20619 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments())); | 22513 return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()),
($2 && $2.is$Value()), ($3 && $3.is$Arguments())); |
20620 } | 22514 }; |
20621 ; | |
20622 // ********** Code for top level ************** | 22515 // ********** Code for top level ************** |
20623 function map(source, mapper) { | 22516 function map(source, mapper) { |
20624 var result = new ListFactory(); | 22517 var result = new ListFactory(); |
20625 if (!!(source && source.is$List)) { | 22518 if (!!(source && source.is$List)) { |
20626 var list = (source && source.is$List()); | 22519 var list = (source && source.is$List()); |
20627 result.length = list.length; | 22520 result.length = list.length; |
20628 for (var i = 0; | 22521 for (var i = 0; |
20629 i < list.length; i++) { | 22522 i < list.length; i++) { |
20630 result.$setindex(i, mapper(list.$index(i))); | 22523 result.$setindex(i, mapper(list.$index(i))); |
20631 } | 22524 } |
20632 } | 22525 } |
20633 else { | 22526 else { |
20634 for (var $i = source.iterator(); $i.hasNext(); ) { | 22527 for (var $i = source.iterator(); $i.hasNext$0(); ) { |
20635 var item = $i.next(); | 22528 var item = $i.next$0(); |
20636 result.add(mapper(item)); | 22529 result.add(mapper(item)); |
20637 } | 22530 } |
20638 } | 22531 } |
20639 return result; | 22532 return result; |
20640 } | 22533 } |
20641 function reduce(source, callback, initialValue) { | 22534 function reduce(source, callback, initialValue) { |
20642 var i = source.iterator(); | 22535 var i = source.iterator(); |
20643 var current = initialValue; | 22536 var current = initialValue; |
20644 if ($notnull_bool(current == null && i.hasNext())) { | 22537 if ($notnull_bool(current == null && i.hasNext$0())) { |
20645 current = i.next(); | 22538 current = i.next$0(); |
20646 } | 22539 } |
20647 while ($notnull_bool(i.hasNext())) { | 22540 while ($notnull_bool(i.hasNext$0())) { |
20648 current = callback.call$2(current, i.next()); | 22541 current = callback.call$2(current, i.next$0()); |
20649 } | 22542 } |
20650 return current; | 22543 return current; |
20651 } | 22544 } |
20652 function orderValuesByKeys(map) { | 22545 function orderValuesByKeys(map) { |
20653 var $0; | 22546 var $0; |
20654 var keys = (($0 = map.getKeys()) && $0.is$List()); | 22547 var keys = (($0 = map.getKeys()) && $0.is$List()); |
20655 keys.sort((function (x, y) { | 22548 keys.sort((function (x, y) { |
20656 return x.compareTo(y); | 22549 return x.compareTo$1(y); |
20657 }) | 22550 }) |
20658 ); | 22551 ); |
20659 var values = []; | 22552 var values = []; |
20660 for (var $i = 0;$i < keys.length; $i++) { | 22553 for (var $i = 0;$i < keys.length; $i++) { |
20661 var k = keys.$index($i); | 22554 var k = keys.$index($i); |
20662 values.add(map.$index(k)); | 22555 values.add(map.$index(k)); |
20663 } | 22556 } |
20664 return values; | 22557 return values; |
20665 } | 22558 } |
20666 function isMultilineString(text) { | 22559 function isMultilineString(text) { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20751 process.argv.addAll(options.childArgs); | 22644 process.argv.addAll(options.childArgs); |
20752 vm.runInNewContext($assert_String(code), createSandbox()); | 22645 vm.runInNewContext($assert_String(code), createSandbox()); |
20753 } | 22646 } |
20754 } | 22647 } |
20755 else { | 22648 else { |
20756 process.exit(1); | 22649 process.exit(1); |
20757 } | 22650 } |
20758 } | 22651 } |
20759 // ********** Globals ************** | 22652 // ********** Globals ************** |
20760 var const$0 = new NoMoreElementsException()/*const NoMoreElementsException()*/; | 22653 var const$0 = new NoMoreElementsException()/*const NoMoreElementsException()*/; |
20761 var const$10 = new StringWrapper('Dynamic')/*const SourceString('Dynamic')*/; | 22654 var const$10 = new StringWrapper('void')/*const SourceString('void')*/; |
20762 var const$12 = new StringWrapper('String')/*const SourceString('String')*/; | 22655 var const$12 = new StringWrapper('int')/*const SourceString('int')*/; |
20763 var const$14 = new IllegalAccessException()/*const IllegalAccessException()*/; | 22656 var const$14 = new StringWrapper('Dynamic')/*const SourceString('Dynamic')*/; |
20764 var const$146 = new Keyword("break", false)/*const Keyword("break")*/; | 22657 var const$148 = new Keyword("break", false)/*const Keyword("break")*/; |
20765 var const$148 = new Keyword("case", false)/*const Keyword("case")*/; | 22658 var const$150 = new Keyword("case", false)/*const Keyword("case")*/; |
20766 var const$15 = ImmutableList.ImmutableList$from$factory([])/*const []*/; | 22659 var const$152 = new Keyword("catch", false)/*const Keyword("catch")*/; |
20767 var const$150 = new Keyword("catch", false)/*const Keyword("catch")*/; | 22660 var const$154 = new Keyword("const", false)/*const Keyword("const")*/; |
20768 var const$152 = new Keyword("const", false)/*const Keyword("const")*/; | 22661 var const$156 = new Keyword("continue", false)/*const Keyword("continue")*/; |
20769 var const$154 = new Keyword("continue", false)/*const Keyword("continue")*/; | 22662 var const$158 = new Keyword("default", false)/*const Keyword("default")*/; |
20770 var const$156 = new Keyword("default", false)/*const Keyword("default")*/; | 22663 var const$16 = new StringWrapper('String')/*const SourceString('String')*/; |
20771 var const$158 = new Keyword("do", false)/*const Keyword("do")*/; | 22664 var const$160 = new Keyword("do", false)/*const Keyword("do")*/; |
20772 var const$16 = new LinkTail()/*const EmptyLink()*/; | 22665 var const$162 = new Keyword("else", false)/*const Keyword("else")*/; |
20773 var const$160 = new Keyword("else", false)/*const Keyword("else")*/; | 22666 var const$164 = new Keyword("false", false)/*const Keyword("false")*/; |
20774 var const$162 = new Keyword("false", false)/*const Keyword("false")*/; | 22667 var const$166 = new Keyword("final", false)/*const Keyword("final")*/; |
20775 var const$164 = new Keyword("final", false)/*const Keyword("final")*/; | 22668 var const$168 = new Keyword("finally", false)/*const Keyword("finally")*/; |
20776 var const$166 = new Keyword("finally", false)/*const Keyword("finally")*/; | 22669 var const$170 = new Keyword("for", false)/*const Keyword("for")*/; |
20777 var const$168 = new Keyword("for", false)/*const Keyword("for")*/; | 22670 var const$172 = new Keyword("if", false)/*const Keyword("if")*/; |
20778 var const$170 = new Keyword("if", false)/*const Keyword("if")*/; | 22671 var const$174 = new Keyword("in", false)/*const Keyword("in")*/; |
20779 var const$172 = new Keyword("in", false)/*const Keyword("in")*/; | 22672 var const$176 = new Keyword("is", false)/*const Keyword("is")*/; |
20780 var const$174 = new Keyword("is", false)/*const Keyword("is")*/; | 22673 var const$178 = new Keyword("new", false)/*const Keyword("new")*/; |
20781 var const$176 = new Keyword("new", false)/*const Keyword("new")*/; | 22674 var const$18 = new LinkTail()/*const EmptyLink()*/; |
20782 var const$178 = new Keyword("null", false)/*const Keyword("null")*/; | 22675 var const$180 = new Keyword("null", false)/*const Keyword("null")*/; |
20783 var const$180 = new Keyword("return", false)/*const Keyword("return")*/; | 22676 var const$182 = new Keyword("return", false)/*const Keyword("return")*/; |
20784 var const$182 = new Keyword("super", false)/*const Keyword("super")*/; | 22677 var const$184 = new Keyword("super", false)/*const Keyword("super")*/; |
20785 var const$184 = new Keyword("switch", false)/*const Keyword("switch")*/; | 22678 var const$186 = new Keyword("switch", false)/*const Keyword("switch")*/; |
20786 var const$186 = new Keyword("this", false)/*const Keyword("this")*/; | 22679 var const$188 = new Keyword("this", false)/*const Keyword("this")*/; |
20787 var const$188 = new Keyword("throw", false)/*const Keyword("throw")*/; | 22680 var const$190 = new Keyword("throw", false)/*const Keyword("throw")*/; |
20788 var const$190 = new Keyword("true", false)/*const Keyword("true")*/; | 22681 var const$192 = new Keyword("true", false)/*const Keyword("true")*/; |
20789 var const$192 = new Keyword("try", false)/*const Keyword("try")*/; | 22682 var const$194 = new Keyword("try", false)/*const Keyword("try")*/; |
20790 var const$194 = new Keyword("var", false)/*const Keyword("var")*/; | 22683 var const$196 = new Keyword("var", false)/*const Keyword("var")*/; |
20791 var const$196 = new Keyword("void", false)/*const Keyword("void")*/; | 22684 var const$198 = new Keyword("void", false)/*const Keyword("void")*/; |
20792 var const$198 = new Keyword("while", false)/*const Keyword("while")*/; | 22685 var const$200 = new Keyword("while", false)/*const Keyword("while")*/; |
20793 var const$2 = new StringWrapper('global scope')/*const SourceString('global scop
e')*/; | 22686 var const$202 = new Keyword("abstract", true)/*const Keyword("abstract", true)*/
; |
20794 var const$200 = new Keyword("abstract", true)/*const Keyword("abstract", true)*/
; | 22687 var const$204 = new Keyword("assert", true)/*const Keyword("assert", true)*/; |
20795 var const$202 = new Keyword("assert", true)/*const Keyword("assert", true)*/; | 22688 var const$206 = new Keyword("class", true)/*const Keyword("class", true)*/; |
20796 var const$204 = new Keyword("class", true)/*const Keyword("class", true)*/; | 22689 var const$208 = new Keyword("extends", true)/*const Keyword("extends", true)*/; |
20797 var const$206 = new Keyword("extends", true)/*const Keyword("extends", true)*/; | 22690 var const$210 = new Keyword("factory", true)/*const Keyword("factory", true)*/; |
20798 var const$208 = new Keyword("factory", true)/*const Keyword("factory", true)*/; | 22691 var const$212 = new Keyword("get", true)/*const Keyword("get", true)*/; |
20799 var const$210 = new Keyword("get", true)/*const Keyword("get", true)*/; | 22692 var const$214 = new Keyword("implements", true)/*const Keyword("implements", tru
e)*/; |
20800 var const$212 = new Keyword("implements", true)/*const Keyword("implements", tru
e)*/; | 22693 var const$216 = new Keyword("import", true)/*const Keyword("import", true)*/; |
20801 var const$214 = new Keyword("import", true)/*const Keyword("import", true)*/; | 22694 var const$218 = new Keyword("interface", true)/*const Keyword("interface", true)
*/; |
20802 var const$216 = new Keyword("interface", true)/*const Keyword("interface", true)
*/; | 22695 var const$220 = new Keyword("library", true)/*const Keyword("library", true)*/; |
20803 var const$218 = new Keyword("library", true)/*const Keyword("library", true)*/; | 22696 var const$222 = new Keyword("native", true)/*const Keyword("native", true)*/; |
20804 var const$220 = new Keyword("native", true)/*const Keyword("native", true)*/; | 22697 var const$224 = new Keyword("negate", true)/*const Keyword("negate", true)*/; |
20805 var const$222 = new Keyword("negate", true)/*const Keyword("negate", true)*/; | 22698 var const$226 = new Keyword("operator", true)/*const Keyword("operator", true)*/
; |
20806 var const$224 = new Keyword("operator", true)/*const Keyword("operator", true)*/
; | 22699 var const$228 = new Keyword("set", true)/*const Keyword("set", true)*/; |
20807 var const$226 = new Keyword("set", true)/*const Keyword("set", true)*/; | 22700 var const$230 = new Keyword("source", true)/*const Keyword("source", true)*/; |
20808 var const$228 = new Keyword("source", true)/*const Keyword("source", true)*/; | 22701 var const$232 = new Keyword("static", true)/*const Keyword("static", true)*/; |
20809 var const$230 = new Keyword("static", true)/*const Keyword("static", true)*/; | 22702 var const$234 = new Keyword("typedef", true)/*const Keyword("typedef", true)*/; |
20810 var const$232 = new Keyword("typedef", true)/*const Keyword("typedef", true)*/; | 22703 var const$238 = new StringWrapper('EOF')/*const SourceString('EOF')*/; |
20811 var const$236 = new StringWrapper('EOF')/*const SourceString('EOF')*/; | 22704 var const$241 = new ElementKind('class')/*const ElementKind('class')*/; |
20812 var const$239 = new ElementKind('class')/*const ElementKind('class')*/; | 22705 var const$243 = new ElementKind('function')/*const ElementKind('function')*/; |
20813 var const$241 = new ElementKind('function')/*const ElementKind('function')*/; | 22706 var const$245 = new StringWrapper('JS')/*const SourceString('JS')*/; |
20814 var const$243 = new StringWrapper('JS')/*const SourceString('JS')*/; | 22707 var const$246 = new ElementKind('foreign')/*const ElementKind('foreign')*/; |
20815 var const$244 = new ElementKind('foreign')/*const ElementKind('foreign')*/; | 22708 var const$248 = new ImmutableMap([])/*const {}*/; |
20816 var const$246 = new ImmutableMap([])/*const {}*/; | 22709 var const$249 = new StringWrapper('+')/*const SourceString('+')*/; |
20817 var const$247 = new StringWrapper('+')/*const SourceString('+')*/; | 22710 var const$250 = new StringWrapper('-')/*const SourceString('-')*/; |
20818 var const$248 = new StringWrapper('-')/*const SourceString('-')*/; | 22711 var const$251 = new StringWrapper('*')/*const SourceString('*')*/; |
20819 var const$249 = new StringWrapper('*')/*const SourceString('*')*/; | 22712 var const$252 = new StringWrapper('/')/*const SourceString('/')*/; |
20820 var const$250 = new StringWrapper('/')/*const SourceString('/')*/; | 22713 var const$253 = new StringWrapper('<')/*const SourceString('<')*/; |
20821 var const$251 = new StringWrapper('<')/*const SourceString('<')*/; | 22714 var const$254 = new StringWrapper('~/')/*const SourceString('~/')*/; |
20822 var const$252 = new StringWrapper('~/')/*const SourceString('~/')*/; | 22715 var const$255 = new StringWrapper('==')/*const SourceString('==')*/; |
20823 var const$253 = new StringWrapper('==')/*const SourceString('==')*/; | 22716 var const$256 = new StringWrapper('var')/*const SourceString('var')*/; |
20824 var const$254 = new StringWrapper('var')/*const SourceString('var')*/; | 22717 var const$257 = new ElementKind('variable')/*const ElementKind('variable')*/; |
20825 var const$255 = new ElementKind('variable')/*const ElementKind('variable')*/; | 22718 var const$259 = new StringWrapper('=')/*const SourceString('=')*/; |
20826 var const$257 = new StringWrapper('=')/*const SourceString('=')*/; | |
20827 var const$266 = new StringWrapper("+")/*const SourceString("+")*/; | 22719 var const$266 = new StringWrapper("+")/*const SourceString("+")*/; |
20828 var const$267 = new StringWrapper("-")/*const SourceString("-")*/; | 22720 var const$267 = new StringWrapper("-")/*const SourceString("-")*/; |
20829 var const$268 = new StringWrapper("*")/*const SourceString("*")*/; | 22721 var const$268 = new StringWrapper("*")/*const SourceString("*")*/; |
20830 var const$269 = new StringWrapper("/")/*const SourceString("/")*/; | 22722 var const$269 = new StringWrapper("/")/*const SourceString("/")*/; |
20831 var const$270 = new StringWrapper("~/")/*const SourceString("~/")*/; | 22723 var const$270 = new StringWrapper("~/")/*const SourceString("~/")*/; |
20832 var const$271 = new StringWrapper("==")/*const SourceString("==")*/; | 22724 var const$271 = new StringWrapper("==")/*const SourceString("==")*/; |
20833 var const$274 = new StringWrapper('\$add')/*const SourceString('\$add')*/; | 22725 var const$274 = new StringWrapper('\$add')/*const SourceString('\$add')*/; |
20834 var const$275 = new ExceptionImplementation("Internal Error (Leg): UNREACHABLE")
/*const Exception("Internal Error (Leg): UNREACHABLE")*/; | 22726 var const$275 = new ExceptionImplementation("Internal Error (Leg): UNREACHABLE")
/*const Exception("Internal Error (Leg): UNREACHABLE")*/; |
20835 var const$276 = new StringWrapper('\$div')/*const SourceString('\$div')*/; | 22727 var const$276 = new StringWrapper('\$div')/*const SourceString('\$div')*/; |
20836 var const$277 = new StringWrapper('\$eq')/*const SourceString('\$eq')*/; | 22728 var const$277 = new StringWrapper('\$eq')/*const SourceString('\$eq')*/; |
20837 var const$278 = new StringWrapper('\$mul')/*const SourceString('\$mul')*/; | 22729 var const$278 = new StringWrapper('\$mul')/*const SourceString('\$mul')*/; |
20838 var const$279 = new StringWrapper('\$sub')/*const SourceString('\$sub')*/; | 22730 var const$279 = new StringWrapper('\$sub')/*const SourceString('\$sub')*/; |
20839 var const$280 = new StringWrapper('\$tdiv')/*const SourceString('\$tdiv')*/; | 22731 var const$280 = new StringWrapper('\$tdiv')/*const SourceString('\$tdiv')*/; |
20840 var const$3 = new StringWrapper('main')/*const SourceString('main')*/; | 22732 var const$4 = new IllegalAccessException()/*const IllegalAccessException()*/; |
20841 var const$403 = ImmutableList.ImmutableList$from$factory(['NullPointerException'
, 'ObjectNotClosureException', 'NoSuchMethodException', 'StackOverflowException'
])/*const [ | 22733 var const$403 = ImmutableList.ImmutableList$from$factory(['NullPointerException'
, 'ObjectNotClosureException', 'NoSuchMethodException', 'StackOverflowException'
])/*const [ |
20842 'NullPointerException', 'ObjectNotClosureException', | 22734 'NullPointerException', 'ObjectNotClosureException', |
20843 'NoSuchMethodException', 'StackOverflowException']*/; | 22735 'NoSuchMethodException', 'StackOverflowException']*/; |
20844 var const$5 = new EmptyQueueException()/*const EmptyQueueException()*/; | 22736 var const$5 = ImmutableList.ImmutableList$from$factory([])/*const <HInstruction>
[]*/; |
20845 var const$6 = new StringWrapper('void')/*const SourceString('void')*/; | 22737 var const$6 = new StringWrapper('global scope')/*const SourceString('global scop
e')*/; |
20846 var const$8 = new StringWrapper('int')/*const SourceString('int')*/; | 22738 var const$7 = new StringWrapper('main')/*const SourceString('main')*/; |
| 22739 var const$9 = new EmptyQueueException()/*const EmptyQueueException()*/; |
20847 HTracer._singleton = null; | 22740 HTracer._singleton = null; |
20848 var const$234 = ImmutableList.ImmutableList$from$factory([const$146, const$148,
const$150, const$152, const$154, const$156, const$158, const$160, const$162, con
st$164, const$166, const$168, const$170, const$172, const$174, const$176, const$
178, const$180, const$182, const$184, const$186, const$188, const$190, const$192
, const$194, const$196, const$198, const$200, const$202, const$204, const$206, c
onst$208, const$210, const$212, const$214, const$216, const$218, const$220, cons
t$222, const$224, const$226, const$228, const$230, const$232])/*const <Keyword>
[ | 22741 var const$236 = ImmutableList.ImmutableList$from$factory([const$148, const$150,
const$152, const$154, const$156, const$158, const$160, const$162, const$164, con
st$166, const$168, const$170, const$172, const$174, const$176, const$178, const$
180, const$182, const$184, const$186, const$188, const$190, const$192, const$194
, const$196, const$198, const$200, const$202, const$204, const$206, const$208, c
onst$210, const$212, const$214, const$216, const$218, const$220, const$222, cons
t$224, const$226, const$228, const$230, const$232, const$234])/*const <Keyword>
[ |
20849 BREAK, | 22742 BREAK, |
20850 CASE, | 22743 CASE, |
20851 CATCH, | 22744 CATCH, |
20852 CONST, | 22745 CONST, |
20853 CONTINUE, | 22746 CONTINUE, |
20854 DEFAULT, | 22747 DEFAULT, |
20855 DO, | 22748 DO, |
20856 ELSE, | 22749 ELSE, |
20857 FALSE, | 22750 FALSE, |
20858 FINAL, | 22751 FINAL, |
(...skipping 25 matching lines...) Expand all Loading... |
20884 INTERFACE, | 22777 INTERFACE, |
20885 LIBRARY, | 22778 LIBRARY, |
20886 NATIVE, | 22779 NATIVE, |
20887 NEGATE, | 22780 NEGATE, |
20888 OPERATOR, | 22781 OPERATOR, |
20889 SET, | 22782 SET, |
20890 SOURCE, | 22783 SOURCE, |
20891 STATIC, | 22784 STATIC, |
20892 TYPEDEF ]*/; | 22785 TYPEDEF ]*/; |
20893 RunEntry(function () {main();}, []); | 22786 RunEntry(function () {main();}, []); |
OLD | NEW |