OLD | NEW |
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 /** | 4 /** |
5 * Generates a dynamic call stub for a function. | 5 * Generates a dynamic call stub for a function. |
6 * Our goal is to create a stub method like this on-the-fly: | 6 * Our goal is to create a stub method like this on-the-fly: |
7 * function($0, $1, capture) { this($0, $1, true, capture); } | 7 * function($0, $1, capture) { this($0, $1, true, capture); } |
8 * | 8 * |
9 * This stub then replaces the dynamic one on Function, with one that is | 9 * This stub then replaces the dynamic one on Function, with one that is |
10 * specialized for that particular function, taking into account its default | 10 * specialized for that particular function, taking into account its default |
(...skipping 19150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19161 if ($notnull_bool(this._peekIdentifier())) { | 19161 if ($notnull_bool(this._peekIdentifier())) { |
19162 return this.finishPostfixExpression(new DeclaredIdentifier(this._makeTyp
e(expr), this.identifier(), this._makeSpan($assert_num(expr.get$span().get$start
())))); | 19162 return this.finishPostfixExpression(new DeclaredIdentifier(this._makeTyp
e(expr), this.identifier(), this._makeSpan($assert_num(expr.get$span().get$start
())))); |
19163 } | 19163 } |
19164 else { | 19164 else { |
19165 return expr; | 19165 return expr; |
19166 } | 19166 } |
19167 | 19167 |
19168 } | 19168 } |
19169 } | 19169 } |
19170 lang_Parser.prototype.finishCallOrLambdaExpression = function(expr) { | 19170 lang_Parser.prototype.finishCallOrLambdaExpression = function(expr) { |
| 19171 var $0; |
19171 if ($notnull_bool(this._atClosureParameters())) { | 19172 if ($notnull_bool(this._atClosureParameters())) { |
19172 var formals = this.formalParameterList(); | 19173 var formals = this.formalParameterList(); |
19173 var body = this.functionBody(true); | 19174 var body = this.functionBody(true); |
19174 return this._makeFunction(expr, formals, body); | 19175 return this._makeFunction(expr, formals, body); |
19175 } | 19176 } |
19176 else { | 19177 else { |
| 19178 if ((expr instanceof DeclaredIdentifier)) { |
| 19179 this._lang_error('illegal target for call, did you mean to declare a funct
ion?', (($0 = expr.get$span()) && $0.is$SourceSpan())); |
| 19180 } |
19177 var args = this.arguments(); | 19181 var args = this.arguments(); |
19178 return this.finishPostfixExpression(new CallExpression(expr, args, this._mak
eSpan($assert_num(expr.get$span().get$start())))); | 19182 return this.finishPostfixExpression(new CallExpression(expr, args, this._mak
eSpan($assert_num(expr.get$span().get$start())))); |
19179 } | 19183 } |
19180 } | 19184 } |
19181 lang_Parser.prototype._isBin = function(expr, kind) { | 19185 lang_Parser.prototype._isBin = function(expr, kind) { |
19182 return (expr instanceof BinaryExpression) && $notnull_bool($eq(expr.get$op().g
et$kind(), kind)); | 19186 return (expr instanceof BinaryExpression) && $notnull_bool($eq(expr.get$op().g
et$kind(), kind)); |
19183 } | 19187 } |
19184 lang_Parser.prototype._boolTypeRef = function(span) { | 19188 lang_Parser.prototype._boolTypeRef = function(span) { |
19185 return new TypeReference(span, $globals.world.nonNullBool); | 19189 return new TypeReference(span, $globals.world.nonNullBool); |
19186 } | 19190 } |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19531 } | 19535 } |
19532 else { | 19536 else { |
19533 return -1; | 19537 return -1; |
19534 } | 19538 } |
19535 } | 19539 } |
19536 lang_Parser.parseHex = function(hex) { | 19540 lang_Parser.parseHex = function(hex) { |
19537 var result = 0; | 19541 var result = 0; |
19538 for (var i = 0; | 19542 for (var i = 0; |
19539 i < hex.length; i++) { | 19543 i < hex.length; i++) { |
19540 var digit = lang_Parser._hexDigit(hex.charCodeAt(i)); | 19544 var digit = lang_Parser._hexDigit(hex.charCodeAt(i)); |
19541 $assert($ne(digit, -1), "digit != -1", "parser.dart", 1339, 14); | 19545 $assert($ne(digit, -1), "digit != -1", "parser.dart", 1343, 14); |
19542 result = (result << 4) + $assert_num(digit); | 19546 result = (result << 4) + $assert_num(digit); |
19543 } | 19547 } |
19544 return $assert_num(result); | 19548 return $assert_num(result); |
19545 } | 19549 } |
19546 lang_Parser.prototype.finishNewExpression = function(start, isConst) { | 19550 lang_Parser.prototype.finishNewExpression = function(start, isConst) { |
19547 var type = this.type(0); | 19551 var type = this.type(0); |
19548 var name = null; | 19552 var name = null; |
19549 if ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { | 19553 if ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
19550 name = this.identifier(); | 19554 name = this.identifier(); |
19551 } | 19555 } |
(...skipping 4384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23936 NATIVE, | 23940 NATIVE, |
23937 NEGATE, | 23941 NEGATE, |
23938 OPERATOR, | 23942 OPERATOR, |
23939 SET, | 23943 SET, |
23940 SOURCE, | 23944 SOURCE, |
23941 STATIC, | 23945 STATIC, |
23942 TYPEDEF ]*/; | 23946 TYPEDEF ]*/; |
23943 var $globals = {}; | 23947 var $globals = {}; |
23944 $static_init(); | 23948 $static_init(); |
23945 main(); | 23949 main(); |
OLD | NEW |