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

Side by Side Diff: frog/minfrog

Issue 9153009: Minor code review change. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/member.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 $throw(e) { 4 function $throw(e) {
5 // If e is not a value, we can use V8's captureStackTrace utility method. 5 // If e is not a value, we can use V8's captureStackTrace utility method.
6 // TODO(jmesserly): capture the stack trace on other JS engines. 6 // TODO(jmesserly): capture the stack trace on other JS engines.
7 if (e && (typeof e == 'object') && Error.captureStackTrace) { 7 if (e && (typeof e == 'object') && Error.captureStackTrace) {
8 // TODO(jmesserly): this will clobber the e.stack property 8 // TODO(jmesserly): this will clobber the e.stack property
9 Error.captureStackTrace(e, $throw); 9 Error.captureStackTrace(e, $throw);
10 } 10 }
(...skipping 4881 matching lines...) Expand 10 before | Expand all | Expand 10 after
4892 Parameter.prototype.get$value = function() { return this.value; }; 4892 Parameter.prototype.get$value = function() { return this.value; };
4893 Parameter.prototype.set$value = function(value) { return this.value = value; }; 4893 Parameter.prototype.set$value = function(value) { return this.value = value; };
4894 Parameter.prototype.resolve = function() { 4894 Parameter.prototype.resolve = function() {
4895 this.name = this.definition.name.name; 4895 this.name = this.definition.name.name;
4896 if (this.name.startsWith("this.")) { 4896 if (this.name.startsWith("this.")) {
4897 this.name = this.name.substring((5)); 4897 this.name = this.name.substring((5));
4898 this.isInitializer = true; 4898 this.isInitializer = true;
4899 } 4899 }
4900 this.type = this.method.resolveType(this.definition.type, false); 4900 this.type = this.method.resolveType(this.definition.type, false);
4901 if (this.definition.value != null) { 4901 if (this.definition.value != null) {
4902 if (this.definition.value.span.start == this.definition.span.start) { 4902 if (!this.get$hasDefaultValue()) return;
4903 return;
4904 }
4905 if (this.method.name == ":call") { 4903 if (this.method.name == ":call") {
4906 if (this.method.get$definition().get$body() == null && !this.method.get$is Native()) { 4904 if (this.method.get$definition().get$body() == null && !this.method.get$is Native()) {
4907 $globals.world.error("default value not allowed on function type", this. definition.span); 4905 $globals.world.error("default value not allowed on function type", this. definition.span);
4908 } 4906 }
4909 } 4907 }
4910 else if (this.method.get$isAbstract()) { 4908 else if (this.method.get$isAbstract()) {
4911 $globals.world.error("default value not allowed on abstract methods", this .definition.span); 4909 $globals.world.error("default value not allowed on abstract methods", this .definition.span);
4912 } 4910 }
4913 } 4911 }
4914 else if (this.isInitializer && !this.method.get$isConstructor()) { 4912 else if (this.isInitializer && !this.method.get$isConstructor()) {
(...skipping 14 matching lines...) Expand all
4929 Parameter.prototype.copyWithNewType = function(newMethod, newType) { 4927 Parameter.prototype.copyWithNewType = function(newMethod, newType) {
4930 var ret = new Parameter(this.definition, newMethod); 4928 var ret = new Parameter(this.definition, newMethod);
4931 ret.set$type(newType); 4929 ret.set$type(newType);
4932 ret.set$name(this.name); 4930 ret.set$name(this.name);
4933 ret.set$isInitializer(this.isInitializer); 4931 ret.set$isInitializer(this.isInitializer);
4934 return ret; 4932 return ret;
4935 } 4933 }
4936 Parameter.prototype.get$isOptional = function() { 4934 Parameter.prototype.get$isOptional = function() {
4937 return this.definition != null && this.definition.value != null; 4935 return this.definition != null && this.definition.value != null;
4938 } 4936 }
4937 Parameter.prototype.get$hasDefaultValue = function() {
4938 return this.definition.value.span.start != this.definition.span.start;
4939 }
4939 Parameter.prototype.copyWithNewType$2 = Parameter.prototype.copyWithNewType; 4940 Parameter.prototype.copyWithNewType$2 = Parameter.prototype.copyWithNewType;
4940 Parameter.prototype.genValue$2 = Parameter.prototype.genValue; 4941 Parameter.prototype.genValue$2 = Parameter.prototype.genValue;
4941 Parameter.prototype.resolve$0 = Parameter.prototype.resolve; 4942 Parameter.prototype.resolve$0 = Parameter.prototype.resolve;
4942 // ********** Code for Member ************** 4943 // ********** Code for Member **************
4943 $inherits(Member, Element); 4944 $inherits(Member, Element);
4944 function Member(name, declaringType) { 4945 function Member(name, declaringType) {
4945 this.isGenerated = false; 4946 this.isGenerated = false;
4946 this.declaringType = declaringType; 4947 this.declaringType = declaringType;
4947 this._provideFieldSyntax = false; 4948 this._provideFieldSyntax = false;
4948 this._providePropertySyntax = false; 4949 this._providePropertySyntax = false;
(...skipping 9025 matching lines...) Expand 10 before | Expand all | Expand 10 after
13974 $globals._RED_COLOR = "\x1b[31m"; 13975 $globals._RED_COLOR = "\x1b[31m";
13975 } 13976 }
13976 var const$0000 = Object.create(EmptyQueueException.prototype, {}); 13977 var const$0000 = Object.create(EmptyQueueException.prototype, {});
13977 var const$0001 = Object.create(_DeletedKeySentinel.prototype, {}); 13978 var const$0001 = Object.create(_DeletedKeySentinel.prototype, {});
13978 var const$0005 = Object.create(NoMoreElementsException.prototype, {}); 13979 var const$0005 = Object.create(NoMoreElementsException.prototype, {});
13979 var const$0007 = Object.create(IllegalAccessException.prototype, {}); 13980 var const$0007 = Object.create(IllegalAccessException.prototype, {});
13980 var const$0008 = ImmutableList.ImmutableList$from$factory([]); 13981 var const$0008 = ImmutableList.ImmutableList$from$factory([]);
13981 var $globals = {}; 13982 var $globals = {};
13982 $static_init(); 13983 $static_init();
13983 main(); 13984 main();
OLDNEW
« no previous file with comments | « frog/member.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698