| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library fletchc.fletch_backend; | 5 library fletchc.fletch_backend; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Future; | 8 Future; |
| 9 | 9 |
| 10 import 'package:compiler/src/dart2jslib.dart' show | 10 import 'package:compiler/src/dart2jslib.dart' show |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 mintClass = loadBuiltinClass("_Mint", fletchSystemLibrary).element; | 361 mintClass = loadBuiltinClass("_Mint", fletchSystemLibrary).element; |
| 362 stringClass = loadBuiltinClass("String", fletchSystemLibrary).element; | 362 stringClass = loadBuiltinClass("String", fletchSystemLibrary).element; |
| 363 // TODO(ahe): Register _ConstantList through ResolutionCallbacks. | 363 // TODO(ahe): Register _ConstantList through ResolutionCallbacks. |
| 364 loadBuiltinClass(constantListName, fletchSystemLibrary); | 364 loadBuiltinClass(constantListName, fletchSystemLibrary); |
| 365 loadBuiltinClass(constantMapName, fletchSystemLibrary); | 365 loadBuiltinClass(constantMapName, fletchSystemLibrary); |
| 366 loadBuiltinClass("double", fletchSystemLibrary); | 366 loadBuiltinClass("double", fletchSystemLibrary); |
| 367 loadBuiltinClass("Null", compiler.coreLibrary); | 367 loadBuiltinClass("Null", compiler.coreLibrary); |
| 368 loadBuiltinClass("bool", compiler.coreLibrary); | 368 loadBuiltinClass("bool", compiler.coreLibrary); |
| 369 loadBuiltinClass("Coroutine", compiler.coreLibrary); | 369 loadBuiltinClass("Coroutine", compiler.coreLibrary); |
| 370 loadBuiltinClass("Port", compiler.coreLibrary); | 370 loadBuiltinClass("Port", compiler.coreLibrary); |
| 371 loadBuiltinClass("Foreign", fletchFFILibrary); |
| 371 | 372 |
| 372 growableListClass = | 373 growableListClass = |
| 373 loadClass(growableListName, fletchSystemLibrary).element; | 374 loadClass(growableListName, fletchSystemLibrary).element; |
| 374 linkedHashMapClass = | 375 linkedHashMapClass = |
| 375 loadClass(linkedHashMapName, fletchSystemLibrary).element; | 376 loadClass(linkedHashMapName, fletchSystemLibrary).element; |
| 376 // Register list constructors to world. | 377 // Register list constructors to world. |
| 377 // TODO(ahe): Register growableListClass through ResolutionCallbacks. | 378 // TODO(ahe): Register growableListClass through ResolutionCallbacks. |
| 378 growableListClass.constructors.forEach(world.registerStaticUse); | 379 growableListClass.constructors.forEach(world.registerStaticUse); |
| 379 linkedHashMapClass.constructors.forEach(world.registerStaticUse); | 380 linkedHashMapClass.constructors.forEach(world.registerStaticUse); |
| 380 | 381 |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 compiler.reportError( | 1175 compiler.reportError( |
| 1175 spannable, MessageKind.GENERIC, {'text': reason}); | 1176 spannable, MessageKind.GENERIC, {'text': reason}); |
| 1176 var constString = constantSystem.createString( | 1177 var constString = constantSystem.createString( |
| 1177 new DartString.literal(reason)); | 1178 new DartString.literal(reason)); |
| 1178 context.markConstantUsed(constString); | 1179 context.markConstantUsed(constString); |
| 1179 function | 1180 function |
| 1180 ..builder.loadConst(function.allocateConstant(constString)) | 1181 ..builder.loadConst(function.allocateConstant(constString)) |
| 1181 ..builder.emitThrow(); | 1182 ..builder.emitThrow(); |
| 1182 } | 1183 } |
| 1183 } | 1184 } |
| OLD | NEW |