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

Unified Diff: tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart

Issue 1537663002: dart2js: Initial implementation of inlining. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebaseline test expectations and fix a bug (typo). Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_runtime_types_test.dart ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart
index 7d9283e87cb9bc3861b89f275ac3092d1a304f2b..bb196169d0d0817b16791a5dd777e39123de4b8c 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart
@@ -9,7 +9,7 @@ library supercall_test;
import 'js_backend_cps_ir.dart';
const List<TestEntry> tests = const [
- const TestEntry.forMethod('function(Sub#m)', """
+ const TestEntry("""
class Base {
m(x) {
print(x+1);
@@ -22,8 +22,19 @@ main() {
new Sub().m(100);
}""",
r"""
-function(x) {
- return V.Base.prototype.m$1.call(this, x + 10);
+function() {
+ var v0;
+ V.Sub$();
+ v0 = H.S(100 + 10 + 1);
+ if (typeof dartPrint == "function")
+ dartPrint(v0);
+ else if (typeof console == "object" && typeof console.log != "undefined")
+ console.log(v0);
+ else if (!(typeof window == "object")) {
+ if (!(typeof print == "function"))
+ throw "Unable to print message: " + String(v0);
+ print(v0);
+ }
}"""),
// Reenable when we support compiling functions that
@@ -51,7 +62,7 @@ function(x) {
// return V.Base.prototype.$add.call(null, v2, v1);
// }"""),
-const TestEntry.forMethod('function(Sub#m)', """
+const TestEntry("""
class Base {
var field = 123;
}
@@ -62,8 +73,17 @@ main() {
print(new Sub().m(10));
}""",
r"""
-function(x) {
- return x + this.field;
+function() {
+ var v0 = H.S(10 + V.Sub$().field);
+ if (typeof dartPrint == "function")
+ dartPrint(v0);
+ else if (typeof console == "object" && typeof console.log != "undefined")
+ console.log(v0);
+ else if (!(typeof window == "object")) {
+ if (!(typeof print == "function"))
+ throw "Unable to print message: " + String(v0);
+ print(v0);
+ }
}"""),
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_runtime_types_test.dart ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698