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

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

Issue 23883004: Fix bug http://code.google.com/p/dart/issues/detail?id=12941 by doing speculative optimizations eve… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
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.
4
5 import "package:expect/expect.dart";
6 import 'compiler_helper.dart';
7
8 const String TEST = '''
9 foo(a) {
10 foo([]);
11 print(a[0]);
12 }
13 ''';
14
15 main() {
16 String generated = compile(
17 TEST,
18 entry: 'foo',
19 interceptorsSource: DEFAULT_INTERCEPTORSLIB
20 // ADD a bogus indexable class that does not have [].
21 + 'class BogusIndexable implements JSIndexable {}');
22
23 // Ensure that we still generate an optimized version, even if there
24 // is an indexable class that does not implement [].
25 Expect.isTrue(!generated.contains('index'));
26 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698