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

Side by Side Diff: pkg/dev_compiler/test/codegen_expected/unresolved_names.js

Issue 3009733002: fix how DDC finds its undefined constant (Closed)
Patch Set: rebase and rebuild JS files Created 3 years, 3 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
1 define(['dart_sdk'], function(dart_sdk) { 1 define(['dart_sdk'], function(dart_sdk) {
2 'use strict'; 2 'use strict';
3 const core = dart_sdk.core; 3 const core = dart_sdk.core;
4 const dart = dart_sdk.dart; 4 const dart = dart_sdk.dart;
5 const dartx = dart_sdk.dartx; 5 const dartx = dart_sdk.dartx;
6 const unresolved_names = Object.create(null); 6 const unresolved_names = Object.create(null);
7 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.fnType(dart.dynam ic, [])))(); 7 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.fnType(dart.dynam ic, [])))();
8 unresolved_names.C = class C extends core.Object {}; 8 unresolved_names.C = class C extends core.Object {};
9 (unresolved_names.C.new = function() { 9 (unresolved_names.C.new = function() {
10 }).prototype = unresolved_names.C.prototype; 10 }).prototype = unresolved_names.C.prototype;
11 dart.addTypeTests(unresolved_names.C);
11 unresolved_names.main = function() { 12 unresolved_names.main = function() {
12 new (dart.throw(Error("compile error: unresolved constructor: dynamic.<unnam ed>")))(); 13 new (dart.throw(Error("compile error: unresolved constructor: dynamic.<unnam ed>")))();
13 new (dart.throw(Error("compile error: unresolved constructor: C.bar")))(); 14 new (dart.throw(Error("compile error: unresolved constructor: C.bar")))();
14 core.print(dart.throw(Error("compile error: unresolved identifier: baz"))); 15 core.print(dart.throw(Error("compile error: unresolved identifier: baz")));
15 core.print(dart.dload(unresolved_names.C, 'quux')); 16 core.print(dart.dload(unresolved_names.C, 'quux'));
16 }; 17 };
17 dart.fn(unresolved_names.main, VoidTodynamic()); 18 dart.fn(unresolved_names.main, VoidTodynamic());
18 dart.trackLibraries("unresolved_names", { 19 dart.trackLibraries("unresolved_names", {
19 "unresolved_names.dart": unresolved_names 20 "unresolved_names.dart": unresolved_names
20 }, null); 21 }, null);
21 // Exports: 22 // Exports:
22 return { 23 return {
23 unresolved_names: unresolved_names 24 unresolved_names: unresolved_names
24 }; 25 };
25 }); 26 });
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js.map ('k') | pkg/dev_compiler/test/codegen_expected/varargs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698