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

Unified Diff: test/codegen/expect/language/deopt_inlined_function_lazy_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: test/codegen/expect/language/deopt_inlined_function_lazy_test.js
diff --git a/test/codegen/expect/language/deopt_inlined_function_lazy_test.js b/test/codegen/expect/language/deopt_inlined_function_lazy_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..963c4382b349cccad83c5376fe7ad00029a8607b
--- /dev/null
+++ b/test/codegen/expect/language/deopt_inlined_function_lazy_test.js
@@ -0,0 +1,41 @@
+dart_library.library('language/deopt_inlined_function_lazy_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__deopt_inlined_function_lazy_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const deopt_inlined_function_lazy_test = Object.create(null);
+ let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ deopt_inlined_function_lazy_test.call_native = function(x) {
+ try {
+ return dart.dsend(x, '+', 12342353257893275483274832);
+ } finally {
+ }
+ };
+ dart.fn(deopt_inlined_function_lazy_test.call_native, dynamicTodynamic());
+ deopt_inlined_function_lazy_test.bar = function(x) {
+ if (dart.test(dart.dsend(x, '<', 0))) deopt_inlined_function_lazy_test.call_native(x);
+ x = 42;
+ return x;
+ };
+ dart.fn(deopt_inlined_function_lazy_test.bar, dynamicTodynamic());
+ deopt_inlined_function_lazy_test.foo = function(x) {
+ x = deopt_inlined_function_lazy_test.bar(x);
+ return x;
+ };
+ dart.fn(deopt_inlined_function_lazy_test.foo, dynamicTodynamic());
+ deopt_inlined_function_lazy_test.main = function() {
+ expect$.Expect.equals(42, deopt_inlined_function_lazy_test.foo(1));
+ for (let i = 0; i < 20; i++)
+ deopt_inlined_function_lazy_test.foo(7);
+ expect$.Expect.equals(42, deopt_inlined_function_lazy_test.foo(2));
+ expect$.Expect.equals(42, deopt_inlined_function_lazy_test.foo(-1));
+ };
+ dart.fn(deopt_inlined_function_lazy_test.main, VoidTodynamic());
+ // Exports:
+ exports.deopt_inlined_function_lazy_test = deopt_inlined_function_lazy_test;
+});

Powered by Google App Engine
This is Rietveld 408576698