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

Side by Side Diff: tests/isolate/ports_compilation_browser_test.dart

Issue 23368003: Cleanup of isolate.status (first step) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 // Regression test for dart2js that used to crash when compiling
6 // [foo]. See http://code.google.com/p/dart/issues/detail?id=7448.
7
8 library ports_compilation;
9 import 'dart:html';
10 import 'dart:isolate';
11 import '../../pkg/unittest/lib/unittest.dart';
12 import '../../pkg/unittest/lib/html_config.dart';
13
14 void foo() {
15 // Create a "SendPortSync" object and access one of its members.
16 SendPortSync s_port;
17 s_port.callSync;
18
19 // Create a "ReceivePortSync" object (with the constructor) and
20 // access one of its members.
21 var r_port = new ReceivePortSync();
22 r_port.receive;
23
24 // Call getComputedStyle() from the HTML library.
25 query("").getComputedStyle("");
26 }
27
28 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
29
30 void main() {
31 // Generate the call, but don't execute it.
32 if (inscrutable(1) != 1) foo();
33 useHtmlConfiguration();
34 bar();
35 // Also generate it here in case the compiler's worklist goes from
36 // last seen to first seen.
37 if (inscrutable(1) != 1) foo();
38 }
39
40 bar() {
41 test('compile', () { });
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698