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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 18429011: Capture and handle properly every call to JSArray that read or writes elements via a native call (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Karl's comments Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/compiler/dart2js/cpa_inference_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library mock_compiler; 5 library mock_compiler;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 noSuchMethod(im) { throw im; } 100 noSuchMethod(im) { throw im; }
101 } 101 }
102 abstract class JSIndexable { 102 abstract class JSIndexable {
103 get length; 103 get length;
104 } 104 }
105 abstract class JSMutableIndexable extends JSIndexable {} 105 abstract class JSMutableIndexable extends JSIndexable {}
106 class JSArray extends Interceptor implements List, JSIndexable { 106 class JSArray extends Interceptor implements List, JSIndexable {
107 var length; 107 var length;
108 operator[](index) => this[index]; 108 operator[](index) => this[index];
109 operator[]=(index, value) {} 109 operator[]=(index, value) {}
110 var add; 110 add(value) {}
111 removeAt(index) {}
112 insert(index, value) {}
113 removeLast() {}
111 } 114 }
112 class JSMutableArray extends JSArray implements JSMutableIndexable {} 115 class JSMutableArray extends JSArray implements JSMutableIndexable {}
113 class JSFixedArray extends JSMutableArray {} 116 class JSFixedArray extends JSMutableArray {}
114 class JSExtendableArray extends JSMutableArray {} 117 class JSExtendableArray extends JSMutableArray {}
115 class JSString extends Interceptor implements String, JSIndexable { 118 class JSString extends Interceptor implements String, JSIndexable {
116 var length; 119 var length;
117 operator[](index) {} 120 operator[](index) {}
118 toString() {} 121 toString() {}
119 operator+(other) => this; 122 operator+(other) => this;
120 } 123 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 454 }
452 } 455 }
453 456
454 class MockDeferredLoadTask extends DeferredLoadTask { 457 class MockDeferredLoadTask extends DeferredLoadTask {
455 MockDeferredLoadTask(Compiler compiler) : super(compiler); 458 MockDeferredLoadTask(Compiler compiler) : super(compiler);
456 459
457 void registerMainApp(LibraryElement mainApp) { 460 void registerMainApp(LibraryElement mainApp) {
458 // Do nothing. 461 // Do nothing.
459 } 462 }
460 } 463 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/cpa_inference_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698