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

Side by Side Diff: test/codegen/expect/language/constant_propagation_phis_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 unified diff | Download patch
OLDNEW
(Empty)
1 dart_library.library('language/constant_propagation_phis_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__constant_propagation_phis_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect;
10 const constant_propagation_phis_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun ctionType(dart.dynamic, [dart.dynamic])))();
13 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))();
14 constant_propagation_phis_test.keys = dart.constList(["keyA"], core.String);
15 constant_propagation_phis_test.values = dart.constList(["a"], core.String);
16 constant_propagation_phis_test.main = function() {
17 for (let i = 0; i < 20; i++)
18 constant_propagation_phis_test.test(constant_propagation_phis_test.keys[da rtx.get](0));
19 };
20 dart.fn(constant_propagation_phis_test.main, VoidTodynamic());
21 constant_propagation_phis_test.test = function(key) {
22 let ref = constant_propagation_phis_test.key2value(key);
23 expect$.Expect.equals("a", ref == null ? "-" : ref);
24 };
25 dart.fn(constant_propagation_phis_test.test, dynamicTodynamic());
26 constant_propagation_phis_test.key2value = function(key) {
27 let index = constant_propagation_phis_test.indexOf(constant_propagation_phis _test.keys, key);
28 return dart.equals(index, -1) ? null : constant_propagation_phis_test.values [dartx.get](core.int._check(index));
29 };
30 dart.fn(constant_propagation_phis_test.key2value, dynamicTodynamic());
31 constant_propagation_phis_test.indexOf = function(keys, key) {
32 for (let i = dart.dsend(dart.dload(keys, 'length'), '-', 1); dart.test(dart. dsend(i, '>=', 0)); i = dart.dsend(i, '-', 1)) {
33 let equals = dart.equals(dart.dindex(keys, i), key);
34 if (equals) return i;
35 }
36 return -1;
37 };
38 dart.fn(constant_propagation_phis_test.indexOf, dynamicAnddynamicTodynamic());
39 // Exports:
40 exports.constant_propagation_phis_test = constant_propagation_phis_test;
41 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698