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

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

Issue 1564713002: Copier should copy InvokeMethod calling convention (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // Tests of operators. 5 // Tests of operators.
6 6
7 library operators_tests; 7 library operators_tests;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }"""), 67 }"""),
68 68
69 const TestEntry.forMethod('function(foo)', 69 const TestEntry.forMethod('function(foo)',
70 r""" 70 r"""
71 foo(a) => a ~/ 13; 71 foo(a) => a ~/ 13;
72 main() { 72 main() {
73 print(foo(5)); 73 print(foo(5));
74 print(foo(-100)); 74 print(foo(-100));
75 }""", r""" 75 }""", r"""
76 function(a) { 76 function(a) {
77 var v0; 77 return (a | 0) === a && (13 | 0) === 13 ? a / 13 | 0 : J.toInt$0$n(a / 13);
78 return (a | 0) === a && (13 | 0) === 13 ? a / 13 | 0 : J.getInterceptor$n(v0 = a / 13).toInt$0(v0);
79 }"""), 78 }"""),
80 79
81 const TestEntry(r""" 80 const TestEntry(r"""
82 foo(a) => a ~/ 13; 81 foo(a) => a ~/ 13;
83 main() { 82 main() {
84 print(foo(5)); 83 print(foo(5));
85 print(foo(100)); 84 print(foo(100));
86 }""", r""" 85 }""", r"""
87 function() { 86 function() {
88 P.print(5 / 13 | 0); 87 P.print(5 / 13 | 0);
89 P.print(100 / 13 | 0); 88 P.print(100 / 13 | 0);
90 }"""), 89 }"""),
91 90
92 const TestEntry.forMethod('function(foo)', 91 const TestEntry.forMethod('function(foo)',
93 r""" 92 r"""
94 foo(a) => a ~/ 13; 93 foo(a) => a ~/ 13;
95 main() { 94 main() {
96 print(foo(5)); 95 print(foo(5));
97 print(foo(8000000000)); 96 print(foo(8000000000));
98 }""", r""" 97 }""", r"""
99 function(a) { 98 function(a) {
100 var v0; 99 return (a | 0) === a && (13 | 0) === 13 ? a / 13 | 0 : J.toInt$0$n(a / 13);
101 return (a | 0) === a && (13 | 0) === 13 ? a / 13 | 0 : J.getInterceptor$n(v0 = a / 13).toInt$0(v0);
102 }"""), 100 }"""),
103 101
104 ]; 102 ];
105 103
106 void main() { 104 void main() {
107 runTests(tests); 105 runTests(tests);
108 } 106 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698