Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class WorkItem { | 5 class WorkItem { |
| 6 final Element element; | 6 final Element element; |
| 7 TreeElements resolutionTree; | 7 TreeElements resolutionTree; |
| 8 Function run; | 8 Function run; |
| 9 bool allowSpeculativeOptimization = true; | 9 bool allowSpeculativeOptimization = true; |
| 10 List<HTypeGuard> guards = const <HTypeGuard>[]; | 10 List<HTypeGuard> guards = const <HTypeGuard>[]; |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 void registerGetOfStaticFunction(FunctionElement element) { | 378 void registerGetOfStaticFunction(FunctionElement element) { |
| 379 registerStaticUse(element); | 379 registerStaticUse(element); |
| 380 universe.staticFunctionsNeedingGetter.add(element); | 380 universe.staticFunctionsNeedingGetter.add(element); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void registerDynamicInvocation(SourceString methodName, Selector selector) { | 383 void registerDynamicInvocation(SourceString methodName, Selector selector) { |
| 384 assert(selector !== null); | 384 assert(selector !== null); |
| 385 enqueuer.registerInvocation(methodName, selector); | 385 enqueuer.registerInvocation(methodName, selector); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void registerDynamicInvocationOn(SourceString methodName, | |
|
floitsch
2012/04/18 19:18:48
I would prefer Element first.
ngeoffray
2012/04/19 08:09:33
I changed the signature to only take an element.
| |
| 389 Selector selector, | |
| 390 Element element) { | |
| 391 assert(selector !== null); | |
|
floitsch
2012/04/18 19:18:48
I think we need to register the invocation too.
ngeoffray
2012/04/19 08:09:33
If you do that, then all 'foo' methods will be com
| |
| 392 addToWorkList(element); | |
| 393 } | |
| 394 | |
| 388 void registerDynamicGetter(SourceString methodName) { | 395 void registerDynamicGetter(SourceString methodName) { |
| 389 enqueuer.registerGetter(methodName); | 396 enqueuer.registerGetter(methodName); |
| 390 } | 397 } |
| 391 | 398 |
| 392 void registerDynamicSetter(SourceString methodName) { | 399 void registerDynamicSetter(SourceString methodName) { |
| 393 enqueuer.registerSetter(methodName); | 400 enqueuer.registerSetter(methodName); |
| 394 } | 401 } |
| 395 | 402 |
| 396 void registerInstantiatedClass(ClassElement element) { | 403 void registerInstantiatedClass(ClassElement element) { |
| 397 universe.instantiatedClasses.add(element); | 404 universe.instantiatedClasses.add(element); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 551 } | 558 } |
| 552 } | 559 } |
| 553 | 560 |
| 554 class SourceSpan { | 561 class SourceSpan { |
| 555 final Uri uri; | 562 final Uri uri; |
| 556 final int begin; | 563 final int begin; |
| 557 final int end; | 564 final int end; |
| 558 | 565 |
| 559 const SourceSpan(this.uri, this.begin, this.end); | 566 const SourceSpan(this.uri, this.begin, this.end); |
| 560 } | 567 } |
| OLD | NEW |