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

Unified Diff: pkg/fletchc/lib/src/fletch_native_descriptor.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 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/fletchc/lib/src/fletch_function_builder.dart ('k') | pkg/fletchc/lib/src/fletch_registry.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fletchc/lib/src/fletch_native_descriptor.dart
diff --git a/pkg/fletchc/lib/src/fletch_native_descriptor.dart b/pkg/fletchc/lib/src/fletch_native_descriptor.dart
deleted file mode 100644
index b3ff778534280a53346f7e5467f132dd8f0ae5cd..0000000000000000000000000000000000000000
--- a/pkg/fletchc/lib/src/fletch_native_descriptor.dart
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// 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_native_descriptor;
-
-import 'dart:convert' show
- JSON;
-
-class FletchNativeDescriptor {
- final String enumName;
-
- final String cls;
-
- final String name;
-
- final int index;
-
- final bool isDetachable;
-
- FletchNativeDescriptor(this.enumName, this.cls, this.name, this.index,
- this.isDetachable);
-
- String toString() {
- return "FletchNativeDescriptor"
- "($enumName, $cls, $name, $index, $isDetachable)";
- }
-
- static void decode(
- String jsonData,
- Map<String, FletchNativeDescriptor> natives,
- Map<String, String> names) {
- Map jsonObjects = JSON.decode(jsonData);
- int index = 0;
- for (Map native in jsonObjects['natives']) {
- String cls = native['class'];
- String name = native['name'];
- bool isDetachable = native['is_detachable'];
- assert(isDetachable != null);
- void add(cls, name) {
- natives['$cls.$name'] = new FletchNativeDescriptor(
- native['enum'], cls, name, index, isDetachable);
- natives['$cls._fletchNative$name'] = new FletchNativeDescriptor(
- native['enum'], cls, name, index, isDetachable);
- }
- if (cls == "<none>") {
- cls = null;
- add("", name);
- if (name.startsWith("_")) {
- // For private top-level methods, create a public version as well.
- // TODO(ahe): Modify the VM table of natives.
- add("", name.substring(1));
- }
- } else {
- add(cls, name);
- }
- index++;
- }
- for (Map name in jsonObjects['names']) {
- names[name['name']] = name['value'];
- }
- }
-}
« no previous file with comments | « pkg/fletchc/lib/src/fletch_function_builder.dart ('k') | pkg/fletchc/lib/src/fletch_registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698