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

Side by Side Diff: tests/language/issue10204_test.dart

Issue 14487008: When a phi is generated at use site, the names of its inputs must be freed by the user of the phi. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.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
(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 miscompile
6 // [A.visitInvokeDynamicMethod].
7
8 import "package:expect/expect.dart";
9
10 var a = 2;
11
12 class Tupe {
13 const Tupe();
14 get instructionType => a == 2 ? this : new A();
15 refine(a, b) => '$a$b';
16 }
17
18 class Node {
19 final selector = null;
20 var inputs = {"a": const Tupe(), "b": const Tupe() };
21 bool isCallOnInterceptor;
22
23 getDartReceiver() {
24 return isCallOnInterceptor ? inputs["a"] : inputs["b"];
25 }
26 }
27
28 class A {
29 visitInvokeDynamicMethod(node) {
30 var receiverType = node.getDartReceiver().instructionType;
31 return receiverType.refine(node.selector, node.selector);
32 }
33 }
34
35 main() {
36 Expect.equals('nullnull',
37 [new A()].last.visitInvokeDynamicMethod(new Node()));
38 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698