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

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

Issue 14404004: Throw NoSuchMethod or ArgumentError instead of generating a bailout, when we know the next instruct… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
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 import 'dart:uri'; 9 import 'dart:uri';
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 dynamic JS(String typeDescription, String codeTemplate, 70 dynamic JS(String typeDescription, String codeTemplate,
71 [var arg0, var arg1, var arg2, var arg3, var arg4, var arg5, var arg6, 71 [var arg0, var arg1, var arg2, var arg3, var arg4, var arg5, var arg6,
72 var arg7, var arg8, var arg9, var arg10, var arg11]) {}'''; 72 var arg7, var arg8, var arg9, var arg10, var arg11]) {}''';
73 73
74 const String DEFAULT_INTERCEPTORSLIB = r''' 74 const String DEFAULT_INTERCEPTORSLIB = r'''
75 class Interceptor { 75 class Interceptor {
76 toString() {} 76 toString() {}
77 bool operator==(other) => identical(this, other); 77 bool operator==(other) => identical(this, other);
78 noSuchMethod(im) { throw im; } 78 noSuchMethod(im) { throw im; }
79 } 79 }
80 class JSIndexable {} 80 abstract class JSIndexable {}
81 class JSArray extends Interceptor implements List, JSIndexable { 81 class JSArray extends Interceptor implements List, JSIndexable {
82 var length; 82 var length;
83 operator[](index) {} 83 operator[](index) {}
84 operator[]=(index, value) {} 84 operator[]=(index, value) {}
85 var add; 85 var add;
86 } 86 }
87 class JSMutableArray extends JSArray {} 87 class JSMutableArray extends JSArray {}
88 class JSFixedArray extends JSMutableArray {} 88 class JSFixedArray extends JSMutableArray {}
89 class JSExtendableArray extends JSMutableArray {} 89 class JSExtendableArray extends JSMutableArray {}
90 class JSString extends Interceptor implements String, JSIndexable { 90 class JSString extends Interceptor implements String, JSIndexable {
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 } 398 }
399 399
400 class MockDeferredLoadTask extends DeferredLoadTask { 400 class MockDeferredLoadTask extends DeferredLoadTask {
401 MockDeferredLoadTask(Compiler compiler) : super(compiler); 401 MockDeferredLoadTask(Compiler compiler) : super(compiler);
402 402
403 void registerMainApp(LibraryElement mainApp) { 403 void registerMainApp(LibraryElement mainApp) {
404 // Do nothing. 404 // Do nothing.
405 } 405 }
406 } 406 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dead_bailout_target_test.dart ('k') | tests/compiler/dart2js/type_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698