Skip to content

Commit

Permalink
fixes #427, static fields emitted outside the scope of their class
Browse files Browse the repository at this point in the history
mainly, this backs off of some readability optimizations around static and top-level fields that were too aggressive. On their own, they were okay, but they collide with the library-cycle issues. Once we can remove that issue, we could consider restoring some of this. In the meantime, simplicity is good.

The new operation in the declaration loader is to allow us to see if an initializer has all its dependencies satisfied, but without changing any ordering if they are not.

[email protected]

Review URL: https://codereview.chromium.org/1636233002 .
  • Loading branch information
John Messerly committed Jan 27, 2016
1 parent d043d05 commit 0b646eb
Show file tree
Hide file tree
Showing 19 changed files with 1,180 additions and 800 deletions.
2 changes: 1 addition & 1 deletion pkg/dev_compiler/lib/runtime/dart/_interceptors.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,9 +870,9 @@ dart_library.library('dart/_interceptors', null, /* Imports */[
names: ['_handleIEtoString', '_bitCount', '_shru', '_shrs', '_ors', '_spread']
});
JSNumber[dart.metadata] = () => [dart.const(new _js_helper.JsPeerInterface({name: 'Number'}))];
dart.registerExtension(dart.global.Number, JSNumber);
JSNumber._MIN_INT32 = -2147483648;
JSNumber._MAX_INT32 = 2147483647;
dart.registerExtension(dart.global.Number, JSNumber);
const _defaultSplit = Symbol('_defaultSplit');
dart.defineExtensionNames([
'codeUnitAt',
Expand Down
10 changes: 7 additions & 3 deletions pkg/dev_compiler/lib/runtime/dart/_internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2299,18 +2299,22 @@ dart_library.library('dart/_internal', null, /* Imports */[
names: ['getName', 'validatePublicSymbol', 'isValidSymbol']
});
Symbol.reservedWordRE = '(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|' + 'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|' + 'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|' + 'v(?:ar|oid)|w(?:hile|ith))';
Symbol.publicIdentifierRE = '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[a-zA-Z$][\\w$]*';
Symbol.identifierRE = '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[a-zA-Z$_][\\w$]*';
Symbol.operatorRE = '(?:[\\-+*/%&|^]|\\[\\]=?|==|~/?|<[<=]?|>[>=]?|unary-)';
const POWERS_OF_TEN = dart.const([1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0, 1000000000000000.0, 10000000000000000.0, 100000000000000000.0, 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0, 1e+21, 1e+22]);
dart.defineLazyProperties(Symbol, {
get publicIdentifierRE() {
return '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[a-zA-Z$][\\w$]*';
},
get identifierRE() {
return '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[a-zA-Z$_][\\w$]*';
},
get publicSymbolPattern() {
return core.RegExp.new(`^(?:${Symbol.operatorRE}\$|${Symbol.publicIdentifierRE}(?:=?\$|[.](?!\$)))+?\$`);
},
get symbolPattern() {
return core.RegExp.new(`^(?:${Symbol.operatorRE}\$|${Symbol.identifierRE}(?:=?\$|[.](?!\$)))+?\$`);
}
});
const POWERS_OF_TEN = dart.const([1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0, 1000000000000000.0, 10000000000000000.0, 100000000000000000.0, 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0, 1e+21, 1e+22]);
// Exports:
exports.EfficientLength = EfficientLength;
exports.ListIterable$ = ListIterable$;
Expand Down
Loading

0 comments on commit 0b646eb

Please sign in to comment.