| Index: pkg/dartino_compiler/lib/program_info.dart
|
| diff --git a/pkg/fletchc/lib/program_info.dart b/pkg/dartino_compiler/lib/program_info.dart
|
| similarity index 96%
|
| rename from pkg/fletchc/lib/program_info.dart
|
| rename to pkg/dartino_compiler/lib/program_info.dart
|
| index dfdecba005ab7536855b665341cf46a5054befef..58a569a097af3b7d4e1dd3af89278dc39fdef935 100644
|
| --- a/pkg/fletchc/lib/program_info.dart
|
| +++ b/pkg/dartino_compiler/lib/program_info.dart
|
| @@ -2,7 +2,7 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE.md file.
|
|
|
| -library fletchc.program_info;
|
| +library dartino_compiler.program_info;
|
|
|
| import 'dart:async' show
|
| Future,
|
| @@ -31,13 +31,13 @@ import 'package:persistent/persistent.dart' show
|
| import 'vm_commands.dart' show
|
| WriteSnapshotResult;
|
|
|
| -import 'fletch_system.dart' show
|
| - FletchClass,
|
| - FletchFunction,
|
| - FletchSystem;
|
| +import 'dartino_system.dart' show
|
| + DartinoClass,
|
| + DartinoFunction,
|
| + DartinoSystem;
|
|
|
| -import 'src/fletch_selector.dart' show
|
| - FletchSelector;
|
| +import 'src/dartino_selector.dart' show
|
| + DartinoSelector;
|
|
|
| enum Configuration {
|
| Offset64BitsDouble,
|
| @@ -77,7 +77,7 @@ class ProgramInfo {
|
| return _getString(_classNames[conf][classOffset]);
|
| }
|
|
|
| - String selectorName(FletchSelector selector) {
|
| + String selectorName(DartinoSelector selector) {
|
| return _getString(_selectorNames[selector.id]);
|
| }
|
|
|
| @@ -434,7 +434,7 @@ abstract class ProgramInfoBinary {
|
| }
|
| }
|
|
|
| -ProgramInfo buildProgramInfo(FletchSystem system, WriteSnapshotResult result) {
|
| +ProgramInfo buildProgramInfo(DartinoSystem system, WriteSnapshotResult result) {
|
| List<String> strings = [];
|
| Map<String, int> stringIndices = {};
|
| List<int> selectors = [];
|
| @@ -458,13 +458,13 @@ ProgramInfo buildProgramInfo(FletchSystem system, WriteSnapshotResult result) {
|
| list[index] = value;
|
| }
|
|
|
| - system.symbolByFletchSelectorId.forEach((Pair<int, String> pair) {
|
| + system.symbolByDartinoSelectorId.forEach((Pair<int, String> pair) {
|
| setIndex(selectors, pair.fst, newName(pair.snd));
|
| });
|
|
|
| - Map<int, FletchClass> functionId2Class = {};
|
| - system.classesById.forEach((Pair<int, FletchClass> pair) {
|
| - FletchClass klass = pair.snd;
|
| + Map<int, DartinoClass> functionId2Class = {};
|
| + system.classesById.forEach((Pair<int, DartinoClass> pair) {
|
| + DartinoClass klass = pair.snd;
|
| klass.methodTable.forEach((Pair<int, int> pair) {
|
| int functionId = pair.snd;
|
| functionId2Class[functionId] = klass;
|
| @@ -505,7 +505,7 @@ ProgramInfo buildProgramInfo(FletchSystem system, WriteSnapshotResult result) {
|
| fillTable(classNames,
|
| result.classOffsetTable,
|
| (id) {
|
| - FletchClass klass = system.classesById[id];
|
| + DartinoClass klass = system.classesById[id];
|
| if (klass == null) {
|
| // Why do we get here?
|
| return null;
|
| @@ -515,7 +515,7 @@ ProgramInfo buildProgramInfo(FletchSystem system, WriteSnapshotResult result) {
|
| fillTable(classNames,
|
| result.functionOffsetTable,
|
| (id) {
|
| - FletchClass klass = functionId2Class[id];
|
| + DartinoClass klass = functionId2Class[id];
|
| if (klass != null) return klass.name;
|
| return null;
|
| });
|
| @@ -550,8 +550,8 @@ Stream<String> decodeStackFrames(Configuration conf,
|
| }
|
| } else if (nsmMatch != null) {
|
| int classOffset = int.parse(nsmMatch.group(1));
|
| - FletchSelector selector =
|
| - new FletchSelector(int.parse(nsmMatch.group(2)));
|
| + DartinoSelector selector =
|
| + new DartinoSelector(int.parse(nsmMatch.group(2)));
|
| String functionName = info.selectorName(selector);
|
| String className = info.className(conf, classOffset);
|
|
|
| @@ -630,7 +630,7 @@ Future<int> decodeProgramMain(
|
| }
|
|
|
|
|
| -// We are only interested in two kind of lines in the fletch.ticks file.
|
| +// We are only interested in two kind of lines in the dartino.ticks file.
|
| final RegExp tickRegexp =
|
| new RegExp(r'^0x([0-9a-f]+),0x([0-9a-f]+),0x([0-9a-f]+)');
|
| final RegExp propertyRegexp = new RegExp(r'^(\w+)=(.*$)');
|
| @@ -758,7 +758,7 @@ Future<Profile> decodeTickSamples(
|
|
|
| usage(message) {
|
| print("Invalid arguments: $message");
|
| - print("Usage: ${io.Platform.script} <fletch.ticks> <snapshot.info.json>");
|
| + print("Usage: ${io.Platform.script} <dartino.ticks> <snapshot.info.json>");
|
| }
|
|
|
| if (arguments.length != 2) {
|
|
|