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

Unified Diff: lib/runtime/dart/convert.js

Issue 1636233002: fixes #427, static fields emitted outside the scope of their class (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged2 Created 4 years, 11 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
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/convert.js
diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
index 4e9b1ce3e5ccc5826398db85f413a697d2e6a2b8..0b4fababe82c6b70976c9030b3c076958fe62e66 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -62,6 +62,12 @@ dart_library.library('dart/convert', null, /* Imports */[
statics: () => ({getByName: [Encoding, [core.String]]}),
names: ['getByName']
});
+ dart.defineLazyProperties(Encoding, {
+ get _nameToEncoding() {
+ return dart.map({"iso_8859-1:1987": LATIN1, "iso-ir-100": LATIN1, "iso_8859-1": LATIN1, "iso-8859-1": LATIN1, latin1: LATIN1, l1: LATIN1, ibm819: LATIN1, cp819: LATIN1, csisolatin1: LATIN1, "iso-ir-6": ASCII, "ansi_x3.4-1968": ASCII, "ansi_x3.4-1986": ASCII, "iso_646.irv:1991": ASCII, "iso646-us": ASCII, "us-ascii": ASCII, us: ASCII, ibm367: ASCII, cp367: ASCII, csascii: ASCII, ascii: ASCII, csutf8: UTF8, "utf-8": UTF8});
+ },
+ set _nameToEncoding(_) {}
+ });
const _allowInvalid = Symbol('_allowInvalid');
class AsciiCodec extends Encoding {
AsciiCodec(opts) {
@@ -629,12 +635,6 @@ dart_library.library('dart/convert', null, /* Imports */[
return _FusedConverter;
});
let _FusedConverter = _FusedConverter$();
- dart.defineLazyProperties(Encoding, {
- get _nameToEncoding() {
- return dart.map({"iso_8859-1:1987": LATIN1, "iso-ir-100": LATIN1, "iso_8859-1": LATIN1, "iso-8859-1": LATIN1, latin1: LATIN1, l1: LATIN1, ibm819: LATIN1, cp819: LATIN1, csisolatin1: LATIN1, "iso-ir-6": ASCII, "ansi_x3.4-1968": ASCII, "ansi_x3.4-1986": ASCII, "iso_646.irv:1991": ASCII, "iso646-us": ASCII, "us-ascii": ASCII, us: ASCII, ibm367: ASCII, cp367: ASCII, csascii: ASCII, ascii: ASCII, csutf8: UTF8, "utf-8": UTF8});
- },
- set _nameToEncoding(_) {}
- });
const _name = Symbol('_name');
class HtmlEscapeMode extends core.Object {
_(name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) {
@@ -652,7 +652,17 @@ dart_library.library('dart/convert', null, /* Imports */[
dart.setSignature(HtmlEscapeMode, {
constructors: () => ({_: [HtmlEscapeMode, [core.String, core.bool, core.bool, core.bool, core.bool]]})
});
- HtmlEscapeMode.UNKNOWN = dart.const(new HtmlEscapeMode._('unknown', true, true, true, true));
+ dart.defineLazyProperties(HtmlEscapeMode, {
+ get UNKNOWN() {
+ return dart.const(new HtmlEscapeMode._('unknown', true, true, true, true));
+ },
+ get ATTRIBUTE() {
+ return dart.const(new HtmlEscapeMode._('attribute', false, true, false, false));
+ },
+ get ELEMENT() {
+ return dart.const(new HtmlEscapeMode._('element', true, false, false, true));
+ }
+ });
const _convert = Symbol('_convert');
class HtmlEscape extends Converter$(core.String, core.String) {
HtmlEscape(mode) {
@@ -731,8 +741,6 @@ dart_library.library('dart/convert', null, /* Imports */[
})
});
const HTML_ESCAPE = dart.const(new HtmlEscape());
- HtmlEscapeMode.ATTRIBUTE = dart.const(new HtmlEscapeMode._('attribute', false, true, false, false));
- HtmlEscapeMode.ELEMENT = dart.const(new HtmlEscapeMode._('element', true, false, false, true));
const _escape = Symbol('_escape');
class _HtmlEscapeSink extends StringConversionSinkBase {
_HtmlEscapeSink(escape, sink) {
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698