| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.new_js_emitter.model_emitter; | 5 library dart2js.new_js_emitter.model_emitter; |
| 6 | 6 |
| 7 import '../../dart2jslib.dart' show Compiler; | 7 import '../../dart2jslib.dart' show Compiler; |
| 8 import '../../dart_types.dart' show DartType; | 8 import '../../dart_types.dart' show DartType; |
| 9 import '../../js/js.dart' as js; | 9 import '../../js/js.dart' as js; |
| 10 import '../../js_backend/js_backend.dart' show | 10 import '../../js_backend/js_backend.dart' show |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 proto[descriptor[pos]] = stub; | 510 proto[descriptor[pos]] = stub; |
| 511 funs.push(stub); | 511 funs.push(stub); |
| 512 } | 512 } |
| 513 if (descriptor[2] != null) { | 513 if (descriptor[2] != null) { |
| 514 var isIntercepted = descriptor[3]; | 514 var isIntercepted = descriptor[3]; |
| 515 var reflectionInfo = descriptor[4]; | 515 var reflectionInfo = descriptor[4]; |
| 516 proto[descriptor[2]] = | 516 proto[descriptor[2]] = |
| 517 tearOff(funs, reflectionInfo, false, name, isIntercepted); | 517 tearOff(funs, reflectionInfo, false, name, isIntercepted); |
| 518 } | 518 } |
| 519 // Install the alias for super calls on the prototype chain. | 519 // Install the alias for super calls on the prototype chain. |
| 520 if (desc[5] != null) { | 520 if (descriptor[5] != null) { |
| 521 proto[desc[5]] = desc[0]; | 521 proto[descriptor[5]] = descriptor[0]; |
| 522 } | 522 } |
| 523 } else { | 523 } else { |
| 524 proto[name] = descriptor; | 524 proto[name] = descriptor; |
| 525 } | 525 } |
| 526 } | 526 } |
| 527 """; | 527 """; |
| 528 | 528 |
| 529 js.Expression _generateFunctionType(DartType memberType) { | 529 js.Expression _generateFunctionType(DartType memberType) { |
| 530 if (memberType.containsTypeVariables) { | 530 if (memberType.containsTypeVariables) { |
| 531 js.Expression thisAccess = js.js(r'this.$receiver'); | 531 js.Expression thisAccess = js.js(r'this.$receiver'); |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 887 |
| 888 var end = Date.now(); | 888 var end = Date.now(); |
| 889 print('Setup: ' + (end - start) + ' ms.'); | 889 print('Setup: ' + (end - start) + ' ms.'); |
| 890 | 890 |
| 891 #main(); // Start main. | 891 #main(); // Start main. |
| 892 | 892 |
| 893 }(Date.now(), #code) | 893 }(Date.now(), #code) |
| 894 }"""; | 894 }"""; |
| 895 | 895 |
| 896 } | 896 } |
| OLD | NEW |