Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: tests/compiler/dart2js/value_range_test.dart

Issue 11817013: Do not apply optimizations based on an element if that element cannot be resolved. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/type_inference_test.dart ('k') | tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/value_range_test.dart
===================================================================
--- tests/compiler/dart2js/value_range_test.dart (revision 16853)
+++ tests/compiler/dart2js/value_range_test.dart (working copy)
@@ -221,9 +221,36 @@
class Dynamic_ {}
bool identical(Object a, Object b) {}''';
+const String INTERCEPTORSLIB_WITH_MEMBERS = r'''
+ class JSArray {
+ var length;
+ var removeLast;
+ operator[] (_) {}
+ }
+ class JSString {
+ var length;
+ }
+ class JSNumber {
+ }
+ class JSInt {
+ }
+ class JSDouble {
+ }
+ class JSNull {
+ }
+ class JSBool {
+ }
+ class JSFunction {
+ }
+ class ObjectInterceptor {
+ }
+ getInterceptor(x) {}''';
+
expect(String code, int kind) {
- String generated =
- compile(code, coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE);
+ String generated = compile(
+ code,
+ coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE,
+ interceptorsSource: INTERCEPTORSLIB_WITH_MEMBERS);
switch (kind) {
case REMOVED:
Expect.isTrue(!generated.contains('ioore'));
« no previous file with comments | « tests/compiler/dart2js/type_inference_test.dart ('k') | tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698