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

Unified Diff: pkg/compiler/lib/src/kernel/element_map.dart

Issue 2938193003: Revert "Towards compiling Hello World!" and "Compile and run Hello World!" (Closed)
Patch Set: Created 3 years, 6 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/compiler/lib/src/js_model/js_strategy.dart ('k') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/element_map.dart
diff --git a/pkg/compiler/lib/src/kernel/element_map.dart b/pkg/compiler/lib/src/kernel/element_map.dart
index ce5b82d45b4ea394becb623a9311a99615169b59..4264a0e77c32c800eacf136bb87282722ddb1bb3 100644
--- a/pkg/compiler/lib/src/kernel/element_map.dart
+++ b/pkg/compiler/lib/src/kernel/element_map.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'package:js_runtime/shared/embedded_names.dart';
import 'package:kernel/ast.dart' as ir;
import '../closure.dart';
@@ -17,10 +16,7 @@ import '../elements/jumps.dart';
import '../elements/names.dart';
import '../elements/operators.dart';
import '../elements/types.dart';
-import '../js/js.dart' as js;
import '../js_backend/backend.dart' show JavaScriptBackend;
-import '../js_backend/namer.dart';
-import '../js_emitter/code_emitter_task.dart';
import '../native/native.dart' as native;
import '../types/types.dart';
import '../universe/call_structure.dart';
@@ -151,13 +147,6 @@ abstract class KernelToElementMap {
/// Compute the kind of foreign helper function called by [node], if any.
ForeignKind getForeignKind(ir.StaticInvocation node);
- /// Returns the [js.Name] for the `JsGetName` [constant] value.
- js.Name getNameForJsGetName(ConstantValue constant, Namer namer);
-
- /// Returns the [js.Template] for the `JsBuiltin` [constant] value.
- js.Template getJsBuiltinTemplate(
- ConstantValue constant, CodeEmitterTask emitter);
-
/// Computes the [InterfaceType] referenced by a call to the
/// [JS_INTERCEPTOR_CONSTANT] function, if any.
InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node);
@@ -546,36 +535,6 @@ abstract class KernelToElementMapMixin implements KernelToElementMap {
failedAt(cls, "No super noSuchMethod found for class $cls."));
return function;
}
-
- js.Name getNameForJsGetName(ConstantValue constant, Namer namer) {
- int index = _extractEnumIndexFromConstantValue(
- constant, commonElements.jsGetNameEnum);
- if (index == null) return null;
- return namer.getNameForJsGetName(
- CURRENT_ELEMENT_SPANNABLE, JsGetName.values[index]);
- }
-
- js.Template getJsBuiltinTemplate(
- ConstantValue constant, CodeEmitterTask emitter) {
- int index = _extractEnumIndexFromConstantValue(
- constant, commonElements.jsBuiltinEnum);
- if (index == null) return null;
- return emitter.builtinTemplateFor(JsBuiltin.values[index]);
- }
-
- int _extractEnumIndexFromConstantValue(
- ConstantValue constant, ClassEntity classElement) {
- if (constant is ConstructedConstantValue) {
- if (constant.type.element == classElement) {
- assert(constant.fields.length == 1 || constant.fields.length == 2);
- ConstantValue indexConstant = constant.fields.values.first;
- if (indexConstant is IntConstantValue) {
- return indexConstant.primitiveValue;
- }
- }
- }
- return null;
- }
}
/// Visitor that converts string literals and concatenations of string literals
« no previous file with comments | « pkg/compiler/lib/src/js_model/js_strategy.dart ('k') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698