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

Unified Diff: pkg/kernel/lib/kernel.dart

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)
Patch Set: Address Kevin's comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/frontend/accessors.dart ('k') | pkg/kernel/lib/repository.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/kernel.dart
diff --git a/pkg/kernel/lib/kernel.dart b/pkg/kernel/lib/kernel.dart
index 1d67fb337f157e00d21f2ffa1806e3dda57ceae8..361f59aaa265445c0a472feb4138df8e821c00b3 100644
--- a/pkg/kernel/lib/kernel.dart
+++ b/pkg/kernel/lib/kernel.dart
@@ -15,18 +15,17 @@ library kernel;
import 'ast.dart';
import 'binary/ast_to_binary.dart';
-import 'binary/loader.dart';
+import 'binary/ast_from_binary.dart';
import 'dart:async';
import 'dart:io';
-import 'repository.dart';
import 'text/ast_to_text.dart';
export 'ast.dart';
-export 'repository.dart';
-Program loadProgramFromBinary(String path, [Repository repository]) {
- repository ??= new Repository();
- return new BinaryLoader(repository).loadProgram(path);
+Program loadProgramFromBinary(String path, [Program program]) {
+ program ??= new Program();
+ new BinaryBuilder(new File(path).readAsBytesSync()).readProgram(program);
+ return program;
}
Future writeProgramToBinary(Program program, String path) {
« no previous file with comments | « pkg/kernel/lib/frontend/accessors.dart ('k') | pkg/kernel/lib/repository.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698