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

Side by Side Diff: frog/minfrog

Issue 9478021: Add some sweet XML classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « frog/corejs.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2 // ********** Library dart:core ************** 2 // ********** Library dart:core **************
3 // ********** Natives dart:core ************** 3 // ********** Natives dart:core **************
4 function $defProp(obj, prop, value) { 4 function $defProp(obj, prop, value) {
5 Object.defineProperty(obj, prop, 5 Object.defineProperty(obj, prop,
6 {value: value, enumerable: false, writable: true, configurable: true}); 6 {value: value, enumerable: false, writable: true, configurable: true});
7 } 7 }
8 Function.prototype.bind = Function.prototype.bind || 8 Function.prototype.bind = Function.prototype.bind ||
9 function(thisObj) { 9 function(thisObj) {
10 var func = this; 10 var func = this;
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 // we have to fall through to the toString() based implementation 1886 // we have to fall through to the toString() based implementation
1887 // below in that case. 1887 // below in that case.
1888 if (name && typeof(name) == 'string' && name != 'Object') return name; 1888 if (name && typeof(name) == 'string' && name != 'Object') return name;
1889 } 1889 }
1890 var string = Object.prototype.toString.call(this); 1890 var string = Object.prototype.toString.call(this);
1891 var name = string.substring(8, string.length - 1); 1891 var name = string.substring(8, string.length - 1);
1892 if (name == 'Window') { 1892 if (name == 'Window') {
1893 name = 'DOMWindow'; 1893 name = 'DOMWindow';
1894 } else if (name == 'Document') { 1894 } else if (name == 'Document') {
1895 name = 'HTMLDocument'; 1895 name = 'HTMLDocument';
1896 } else if (name == 'XMLDocument') {
1897 name = 'Document';
1896 } 1898 }
1897 return name; 1899 return name;
1898 }); 1900 });
1899 function $dynamic(name) { 1901 function $dynamic(name) {
1900 var f = Object.prototype[name]; 1902 var f = Object.prototype[name];
1901 if (f && f.methods) return f.methods; 1903 if (f && f.methods) return f.methods;
1902 1904
1903 var methods = {}; 1905 var methods = {};
1904 if (f) methods.Object = f; 1906 if (f) methods.Object = f;
1905 function $dynamicBind() { 1907 function $dynamicBind() {
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
3074 } 3076 }
3075 CoreJs.prototype.ensureDynamicSetMetadata = function() { 3077 CoreJs.prototype.ensureDynamicSetMetadata = function() {
3076 if (this._generatedDynamicSetMetadata) return; 3078 if (this._generatedDynamicSetMetadata) return;
3077 this._generatedDynamicSetMetadata = true; 3079 this._generatedDynamicSetMetadata = true;
3078 this.writer.writeln("function $dynamicSetMetadata(inputTable) {\n // TODO: De al with light isolates.\n var table = [];\n for (var i = 0; i < inputTable.len gth; i++) {\n var tag = inputTable[i][0];\n var tags = inputTable[i][1];\n var map = {};\n var tagNames = tags.split('|');\n for (var j = 0; j < tagNames.length; j++) {\n map[tagNames[j]] = true;\n }\n table.push({ tag: tag, tags: tags, map: map});\n }\n $dynamicMetadata = table;\n}\n"); 3080 this.writer.writeln("function $dynamicSetMetadata(inputTable) {\n // TODO: De al with light isolates.\n var table = [];\n for (var i = 0; i < inputTable.len gth; i++) {\n var tag = inputTable[i][0];\n var tags = inputTable[i][1];\n var map = {};\n var tagNames = tags.split('|');\n for (var j = 0; j < tagNames.length; j++) {\n map[tagNames[j]] = true;\n }\n table.push({ tag: tag, tags: tags, map: map});\n }\n $dynamicMetadata = table;\n}\n");
3079 } 3081 }
3080 CoreJs.prototype.ensureTypeNameOf = function() { 3082 CoreJs.prototype.ensureTypeNameOf = function() {
3081 if (this._generatedTypeNameOf) return; 3083 if (this._generatedTypeNameOf) return;
3082 this._generatedTypeNameOf = true; 3084 this._generatedTypeNameOf = true;
3083 this.ensureDefProp(); 3085 this.ensureDefProp();
3084 this.writer.writeln("$defProp(Object.prototype, '$typeNameOf', function() {\n var constructor = this.constructor;\n if (typeof(constructor) == 'function') { \n // The constructor isn't null or undefined at this point. Try\n // to g rab hold of its name.\n var name = constructor.name;\n // If the name is a non-empty string, we use that as the type\n // name of this object. On Firef ox, we often get 'Object' as\n // the constructor name even for more speciali zed objects so\n // we have to fall through to the toString() based implement ation\n // below in that case.\n if (name && typeof(name) == 'string' && n ame != 'Object') return name;\n }\n var string = Object.prototype.toString.cal l(this);\n var name = string.substring(8, string.length - 1);\n if (name == 'W indow') {\n name = 'DOMWindow';\n } else if (name == 'Document') {\n name = 'HTMLDocument';\n }\n return name;\n});"); 3086 this.writer.writeln("$defProp(Object.prototype, '$typeNameOf', function() {\n var constructor = this.constructor;\n if (typeof(constructor) == 'function') { \n // The constructor isn't null or undefined at this point. Try\n // to g rab hold of its name.\n var name = constructor.name;\n // If the name is a non-empty string, we use that as the type\n // name of this object. On Firef ox, we often get 'Object' as\n // the constructor name even for more speciali zed objects so\n // we have to fall through to the toString() based implement ation\n // below in that case.\n if (name && typeof(name) == 'string' && n ame != 'Object') return name;\n }\n var string = Object.prototype.toString.cal l(this);\n var name = string.substring(8, string.length - 1);\n if (name == 'W indow') {\n name = 'DOMWindow';\n } else if (name == 'Document') {\n name = 'HTMLDocument';\n } else if (name == 'XMLDocument') {\n name = 'Document' ;\n }\n return name;\n});");
3085 } 3087 }
3086 CoreJs.prototype.ensureInheritsHelper = function() { 3088 CoreJs.prototype.ensureInheritsHelper = function() {
3087 if (this._generatedInherits) return; 3089 if (this._generatedInherits) return;
3088 this._generatedInherits = true; 3090 this._generatedInherits = true;
3089 this.writer.writeln("/** Implements extends for Dart classes on JavaScript pro totypes. */\nfunction $inherits(child, parent) {\n if (child.prototype.__proto_ _) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n functio n tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tm p();\n child.prototype.constructor = child;\n }\n}"); 3091 this.writer.writeln("/** Implements extends for Dart classes on JavaScript pro totypes. */\nfunction $inherits(child, parent) {\n if (child.prototype.__proto_ _) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n functio n tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tm p();\n child.prototype.constructor = child;\n }\n}");
3090 } 3092 }
3091 CoreJs.prototype.ensureDefProp = function() { 3093 CoreJs.prototype.ensureDefProp = function() {
3092 if (this._generatedDefProp) return; 3094 if (this._generatedDefProp) return;
3093 this._generatedDefProp = true; 3095 this._generatedDefProp = true;
3094 this.writer.writeln("function $defProp(obj, prop, value) {\n Object.definePro perty(obj, prop,\n {value: value, enumerable: false, writable: true, config urable: true});\n}"); 3096 this.writer.writeln("function $defProp(obj, prop, value) {\n Object.definePro perty(obj, prop,\n {value: value, enumerable: false, writable: true, config urable: true});\n}");
(...skipping 11726 matching lines...) Expand 10 before | Expand all | Expand 10 after
14821 var const$0002 = Object.create(EmptyQueueException.prototype, {}); 14823 var const$0002 = Object.create(EmptyQueueException.prototype, {});
14822 var const$0006 = Object.create(IllegalAccessException.prototype, {}); 14824 var const$0006 = Object.create(IllegalAccessException.prototype, {});
14823 var const$0007 = ImmutableList.ImmutableList$from$factory([]); 14825 var const$0007 = ImmutableList.ImmutableList$from$factory([]);
14824 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/"); 14826 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/");
14825 var const$0010 = ImmutableList.ImmutableList$from$factory(["__PROTO__", "prototy pe", "constructor"]); 14827 var const$0010 = ImmutableList.ImmutableList$from$factory(["__PROTO__", "prototy pe", "constructor"]);
14826 var const$0011 = ImmutableList.ImmutableList$from$factory(["NaN", "Infinity", "u ndefined", "eval", "parseInt", "parseFloat", "isNan", "isFinite", "decodeURI", " decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "A rray", "String", "Boolean", "Number", "Date", "RegExp", "Error", "EvalError", "R angeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "a rguments", "escape", "unescape", "applicationCache", "closed", "Components", "co ntent", "controllers", "crypto", "defaultStatus", "dialogArguments", "directorie s", "document", "frameElement", "frames", "fullScreen", "globalStorage", "histor y", "innerHeight", "innerWidth", "length", "location", "locationbar", "localStor age", "menubar", "mozInnerScreenX", "mozInnerScreenY", "mozScreenPixelsPerCssPix el", "name", "navigator", "opener", "outerHeight", "outerWidth", "pageXOffset", "pageYOffset", "parent", "personalbar", "pkcs11", "returnValue", "screen", "scro llbars", "scrollMaxX", "scrollMaxY", "self", "sessionStorage", "sidebar", "statu s", "statusbar", "toolbar", "top", "window", "alert", "addEventListener", "atob" , "back", "blur", "btoa", "captureEvents", "clearInterval", "clearTimeout", "clo se", "confirm", "disableExternalCapture", "dispatchEvent", "dump", "enableExtern alCapture", "escape", "find", "focus", "forward", "GeckoActiveXObject", "getAtte ntion", "getAttentionWithCycleCount", "getComputedStyle", "getSelection", "home" , "maximize", "minimize", "moveBy", "moveTo", "open", "openDialog", "postMessage ", "print", "prompt", "QueryInterface", "releaseEvents", "removeEventListener", "resizeBy", "resizeTo", "restore", "routeEvent", "scroll", "scrollBy", "scrollBy Lines", "scrollByPages", "scrollTo", "setInterval", "setResizeable", "setTimeout ", "showModalDialog", "sizeToContent", "stop", "uuescape", "updateCommands", "XP CNativeWrapper", "XPCSafeJSOjbectWrapper", "onabort", "onbeforeunload", "onchang e", "onclick", "onclose", "oncontextmenu", "ondragdrop", "onerror", "onfocus", " onhashchange", "onkeydown", "onkeypress", "onkeyup", "onload", "onmousedown", "o nmousemove", "onmouseout", "onmouseover", "onmouseup", "onmozorientation", "onpa int", "onreset", "onresize", "onscroll", "onselect", "onsubmit", "onunload", "on touchcancel", "ontouchend", "ontouchmove", "ontouchstart", "ongesturestart", "on gesturechange", "ongestureend", "uneval", "getPrototypeOf", "let", "yield", "abs tract", "int", "short", "boolean", "interface", "static", "byte", "long", "char" , "final", "native", "synchronized", "float", "package", "throws", "goto", "priv ate", "transient", "implements", "protected", "volatile", "double", "public", "a ttachEvent", "clientInformation", "clipboardData", "createPopup", "dialogHeight" , "dialogLeft", "dialogTop", "dialogWidth", "onafterprint", "onbeforedeactivate" , "onbeforeprint", "oncontrolselect", "ondeactivate", "onhelp", "onresizeend", " event", "external", "Debug", "Enumerator", "Global", "Image", "ActiveXObject", " VBArray", "Components", "toString", "getClass", "constructor", "prototype", "val ueOf", "Anchor", "Applet", "Attr", "Canvas", "CanvasGradient", "CanvasPattern", "CanvasRenderingContext2D", "CDATASection", "CharacterData", "Comment", "CSS2Pro perties", "CSSRule", "CSSStyleSheet", "Document", "DocumentFragment", "DocumentT ype", "DOMException", "DOMImplementation", "DOMParser", "Element", "Event", "Ext ernalInterface", "FlashPlayer", "Form", "Frame", "History", "HTMLCollection", "H TMLDocument", "HTMLElement", "IFrame", "Image", "Input", "JSObject", "KeyEvent", "Link", "Location", "MimeType", "MouseEvent", "Navigator", "Node", "NodeList", "Option", "Plugin", "ProcessingInstruction", "Range", "RangeException", "Screen" , "Select", "Table", "TableCell", "TableRow", "TableSelection", "Text", "TextAre a", "UIEvent", "Window", "XMLHttpRequest", "XMLSerializer", "XPathException", "X PathResult", "XSLTProcessor", "java", "Packages", "netscape", "sun", "JavaObject ", "JavaClass", "JavaArray", "JavaMember", "$wnd", "$doc", "$entry", "$moduleNam e", "$moduleBase", "$gwt_version", "$sessionId", "$stack", "$stackDepth", "$loca tion", "call"]); 14828 var const$0011 = ImmutableList.ImmutableList$from$factory(["NaN", "Infinity", "u ndefined", "eval", "parseInt", "parseFloat", "isNan", "isFinite", "decodeURI", " decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "A rray", "String", "Boolean", "Number", "Date", "RegExp", "Error", "EvalError", "R angeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "a rguments", "escape", "unescape", "applicationCache", "closed", "Components", "co ntent", "controllers", "crypto", "defaultStatus", "dialogArguments", "directorie s", "document", "frameElement", "frames", "fullScreen", "globalStorage", "histor y", "innerHeight", "innerWidth", "length", "location", "locationbar", "localStor age", "menubar", "mozInnerScreenX", "mozInnerScreenY", "mozScreenPixelsPerCssPix el", "name", "navigator", "opener", "outerHeight", "outerWidth", "pageXOffset", "pageYOffset", "parent", "personalbar", "pkcs11", "returnValue", "screen", "scro llbars", "scrollMaxX", "scrollMaxY", "self", "sessionStorage", "sidebar", "statu s", "statusbar", "toolbar", "top", "window", "alert", "addEventListener", "atob" , "back", "blur", "btoa", "captureEvents", "clearInterval", "clearTimeout", "clo se", "confirm", "disableExternalCapture", "dispatchEvent", "dump", "enableExtern alCapture", "escape", "find", "focus", "forward", "GeckoActiveXObject", "getAtte ntion", "getAttentionWithCycleCount", "getComputedStyle", "getSelection", "home" , "maximize", "minimize", "moveBy", "moveTo", "open", "openDialog", "postMessage ", "print", "prompt", "QueryInterface", "releaseEvents", "removeEventListener", "resizeBy", "resizeTo", "restore", "routeEvent", "scroll", "scrollBy", "scrollBy Lines", "scrollByPages", "scrollTo", "setInterval", "setResizeable", "setTimeout ", "showModalDialog", "sizeToContent", "stop", "uuescape", "updateCommands", "XP CNativeWrapper", "XPCSafeJSOjbectWrapper", "onabort", "onbeforeunload", "onchang e", "onclick", "onclose", "oncontextmenu", "ondragdrop", "onerror", "onfocus", " onhashchange", "onkeydown", "onkeypress", "onkeyup", "onload", "onmousedown", "o nmousemove", "onmouseout", "onmouseover", "onmouseup", "onmozorientation", "onpa int", "onreset", "onresize", "onscroll", "onselect", "onsubmit", "onunload", "on touchcancel", "ontouchend", "ontouchmove", "ontouchstart", "ongesturestart", "on gesturechange", "ongestureend", "uneval", "getPrototypeOf", "let", "yield", "abs tract", "int", "short", "boolean", "interface", "static", "byte", "long", "char" , "final", "native", "synchronized", "float", "package", "throws", "goto", "priv ate", "transient", "implements", "protected", "volatile", "double", "public", "a ttachEvent", "clientInformation", "clipboardData", "createPopup", "dialogHeight" , "dialogLeft", "dialogTop", "dialogWidth", "onafterprint", "onbeforedeactivate" , "onbeforeprint", "oncontrolselect", "ondeactivate", "onhelp", "onresizeend", " event", "external", "Debug", "Enumerator", "Global", "Image", "ActiveXObject", " VBArray", "Components", "toString", "getClass", "constructor", "prototype", "val ueOf", "Anchor", "Applet", "Attr", "Canvas", "CanvasGradient", "CanvasPattern", "CanvasRenderingContext2D", "CDATASection", "CharacterData", "Comment", "CSS2Pro perties", "CSSRule", "CSSStyleSheet", "Document", "DocumentFragment", "DocumentT ype", "DOMException", "DOMImplementation", "DOMParser", "Element", "Event", "Ext ernalInterface", "FlashPlayer", "Form", "Frame", "History", "HTMLCollection", "H TMLDocument", "HTMLElement", "IFrame", "Image", "Input", "JSObject", "KeyEvent", "Link", "Location", "MimeType", "MouseEvent", "Navigator", "Node", "NodeList", "Option", "Plugin", "ProcessingInstruction", "Range", "RangeException", "Screen" , "Select", "Table", "TableCell", "TableRow", "TableSelection", "Text", "TextAre a", "UIEvent", "Window", "XMLHttpRequest", "XMLSerializer", "XPathException", "X PathResult", "XSLTProcessor", "java", "Packages", "netscape", "sun", "JavaObject ", "JavaClass", "JavaArray", "JavaMember", "$wnd", "$doc", "$entry", "$moduleNam e", "$moduleBase", "$gwt_version", "$sessionId", "$stack", "$stackDepth", "$loca tion", "call"]);
14827 var const$0012 = ImmutableList.ImmutableList$from$factory(["break", "delete", "f unction", "return", "typeof", "case", "do", "if", "switch", "var", "catch", "els e", "in", "this", "void", "continue", "false", "instanceof", "throw", "while", " debugger", "finally", "new", "true", "with", "default", "for", "null", "try", "a bstract", "double", "goto", "native", "static", "boolean", "enum", "implements", "package", "super", "byte", "export", "import", "private", "synchronized", "cha r", "extends", "int", "protected", "throws", "class", "final", "interface", "pub lic", "transient", "const", "float", "long", "short", "volatile"]); 14829 var const$0012 = ImmutableList.ImmutableList$from$factory(["break", "delete", "f unction", "return", "typeof", "case", "do", "if", "switch", "var", "catch", "els e", "in", "this", "void", "continue", "false", "instanceof", "throw", "while", " debugger", "finally", "new", "true", "with", "default", "for", "null", "try", "a bstract", "double", "goto", "native", "static", "boolean", "enum", "implements", "package", "super", "byte", "export", "import", "private", "synchronized", "cha r", "extends", "int", "protected", "throws", "class", "final", "interface", "pub lic", "transient", "const", "float", "long", "short", "volatile"]);
14828 var $globals = {}; 14830 var $globals = {};
14829 $static_init(); 14831 $static_init();
14830 main(); 14832 main();
OLDNEW
« no previous file with comments | « frog/corejs.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698