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

Side by Side Diff: pkg/fletchc/lib/src/fletch_backend.dart

Issue 1056113003: Mark Foreign as builtin. (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | 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 // 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698