| Index: pkg/dartino_compiler/lib/src/dartino_context.dart
|
| diff --git a/pkg/fletchc/lib/src/fletch_context.dart b/pkg/dartino_compiler/lib/src/dartino_context.dart
|
| similarity index 80%
|
| rename from pkg/fletchc/lib/src/fletch_context.dart
|
| rename to pkg/dartino_compiler/lib/src/dartino_context.dart
|
| index 09b36fd7ebe550447263dc4b36c0eb3aa0d89f6f..92f53b5a21d9c93c64e157223a7f843ee6f5d7f5 100644
|
| --- a/pkg/fletchc/lib/src/fletch_context.dart
|
| +++ b/pkg/dartino_compiler/lib/src/dartino_context.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.fletch_context;
|
| +library dartino_compiler.dartino_context;
|
|
|
| import 'package:compiler/src/tree/tree.dart' show
|
| Node;
|
| @@ -31,39 +31,39 @@ import 'package:compiler/src/constants/values.dart' show
|
| ConstructedConstantValue,
|
| FunctionConstantValue;
|
|
|
| -import 'fletch_compiler_implementation.dart' show
|
| - FletchCompilerImplementation;
|
| +import 'dartino_compiler_implementation.dart' show
|
| + DartinoCompilerImplementation;
|
|
|
| -export 'fletch_compiler_implementation.dart' show
|
| - FletchCompilerImplementation;
|
| +export 'dartino_compiler_implementation.dart' show
|
| + DartinoCompilerImplementation;
|
|
|
| -import 'fletch_backend.dart' show
|
| - FletchBackend;
|
| +import 'dartino_backend.dart' show
|
| + DartinoBackend;
|
|
|
| -export 'fletch_backend.dart' show
|
| - FletchBackend;
|
| +export 'dartino_backend.dart' show
|
| + DartinoBackend;
|
|
|
| export 'bytecode_assembler.dart' show
|
| BytecodeAssembler,
|
| BytecodeLabel;
|
|
|
| -import 'fletch_native_descriptor.dart' show
|
| - FletchNativeDescriptor;
|
| +import 'dartino_native_descriptor.dart' show
|
| + DartinoNativeDescriptor;
|
|
|
| -import 'fletch_selector.dart' show
|
| - FletchSelector,
|
| +import 'dartino_selector.dart' show
|
| + DartinoSelector,
|
| SelectorKind;
|
|
|
| -export 'fletch_native_descriptor.dart' show
|
| - FletchNativeDescriptor;
|
| +export 'dartino_native_descriptor.dart' show
|
| + DartinoNativeDescriptor;
|
|
|
| -import 'fletch_registry.dart' show
|
| - FletchRegistry;
|
| +import 'dartino_registry.dart' show
|
| + DartinoRegistry;
|
|
|
| -class FletchContext {
|
| - final FletchCompilerImplementation compiler;
|
| +class DartinoContext {
|
| + final DartinoCompilerImplementation compiler;
|
|
|
| - Map<String, FletchNativeDescriptor> nativeDescriptors;
|
| + Map<String, DartinoNativeDescriptor> nativeDescriptors;
|
|
|
| Set<String> names = new Set<String>();
|
|
|
| @@ -75,12 +75,12 @@ class FletchContext {
|
| Map<Name, String> nameToSymbol = <Name, String>{};
|
| Map<Selector, String> selectorToSymbol = <Selector, String>{};
|
|
|
| - FletchContext(this.compiler);
|
| + DartinoContext(this.compiler);
|
|
|
| - FletchBackend get backend => compiler.backend;
|
| + DartinoBackend get backend => compiler.backend;
|
|
|
| bool get enableBigint {
|
| - String enableBigintConstant = compiler.environment['fletch.enable-bigint'];
|
| + String enableBigintConstant = compiler.environment['dartino.enable-bigint'];
|
| return enableBigintConstant != "false";
|
| }
|
|
|
| @@ -163,14 +163,14 @@ class FletchContext {
|
| staticIndices.forEach(f);
|
| }
|
|
|
| - int toFletchSelector(Selector selector) {
|
| + int toDartinoSelector(Selector selector) {
|
| String symbol = getSymbolFromSelector(selector);
|
| int id = getSymbolId(symbol);
|
| - SelectorKind kind = getFletchSelectorKind(selector);
|
| - return FletchSelector.encode(id, kind, selector.argumentCount);
|
| + SelectorKind kind = getDartinoSelectorKind(selector);
|
| + return DartinoSelector.encode(id, kind, selector.argumentCount);
|
| }
|
|
|
| - int toFletchIsSelector(ClassElement classElement, [int arity]) {
|
| + int toDartinoIsSelector(ClassElement classElement, [int arity]) {
|
| LibraryElement library = classElement.library;
|
| StringBuffer buffer = new StringBuffer();
|
| buffer.write("?is?");
|
| @@ -178,11 +178,11 @@ class FletchContext {
|
| buffer.write("?");
|
| buffer.write(getLibraryTag(library));
|
| int id = getSymbolId(buffer.toString());
|
| - if (arity == null) return FletchSelector.encodeGetter(id);
|
| - return FletchSelector.encodeMethod(id, arity);
|
| + if (arity == null) return DartinoSelector.encodeGetter(id);
|
| + return DartinoSelector.encodeMethod(id, arity);
|
| }
|
|
|
| - int toFletchTearoffIsSelector(
|
| + int toDartinoTearoffIsSelector(
|
| String functionName,
|
| ClassElement classElement) {
|
| LibraryElement library = classElement.library;
|
| @@ -194,10 +194,10 @@ class FletchContext {
|
| buffer.write("?");
|
| buffer.write(getLibraryTag(library));
|
| int id = getSymbolId(buffer.toString());
|
| - return FletchSelector.encodeMethod(id, 0);
|
| + return DartinoSelector.encodeMethod(id, 0);
|
| }
|
|
|
| - SelectorKind getFletchSelectorKind(Selector selector) {
|
| + SelectorKind getDartinoSelectorKind(Selector selector) {
|
| if (selector.isGetter) return SelectorKind.Getter;
|
| if (selector.isSetter) return SelectorKind.Setter;
|
| return SelectorKind.Method;
|
| @@ -208,7 +208,7 @@ class FletchContext {
|
| backend.registerClassElement(classElement);
|
| // TODO(ahe): This should not be required. Also, instantiate type,
|
| // not class.
|
| - FletchRegistry registry = new FletchRegistry(compiler);
|
| + DartinoRegistry registry = new DartinoRegistry(compiler);
|
| registry.registerInstantiatedClass(classElement);
|
| }
|
|
|
| @@ -216,12 +216,12 @@ class FletchContext {
|
| backend.markFunctionConstantAsUsed(value);
|
| }
|
|
|
| - // TODO(zarah): Remove this and use the FletchSystemBuilder
|
| + // TODO(zarah): Remove this and use the DartinoSystemBuilder
|
| void markConstantUsed(ConstantValue constant) {
|
| backend.systemBuilder.registerConstant(constant, this);
|
| }
|
|
|
| - // TODO(zarah): Remove this and use the FletchSystemBuilder
|
| + // TODO(zarah): Remove this and use the DartinoSystemBuilder
|
| int lookupConstantIdByValue(ConstantValue value) =>
|
| backend.systemBuilder.lookupConstantIdByValue(value);
|
|
|
|
|