From c8453ec0d92e6c23d693fa01ed684c49ce4f90b7 Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Fri, 27 Mar 2015 16:05:38 +0300 Subject: [PATCH] JS: removed unused JsContext methods --- .../compiler/backend/js/ast/JsContext.java | 5 --- .../js/ast/JsVisitorWithContextImpl.java | 34 ------------------- 2 files changed, 39 deletions(-) diff --git a/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsContext.java b/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsContext.java index 7716fc1cdaa..5a2f9e670fc 100644 --- a/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsContext.java +++ b/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsContext.java @@ -12,16 +12,11 @@ import org.jetbrains.annotations.Nullable; * node. */ public abstract class JsContext { - public abstract boolean canInsert(); - - public abstract boolean canRemove(); public abstract void insertAfter(R node); public abstract void insertBefore(R node); - public abstract boolean isLvalue(); - public abstract void removeMe(); public abstract void replaceMe(R node); diff --git a/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsVisitorWithContextImpl.java b/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsVisitorWithContextImpl.java index 839b1a679ce..2a449055bc6 100644 --- a/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsVisitorWithContextImpl.java +++ b/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/JsVisitorWithContextImpl.java @@ -40,16 +40,6 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext { private List collection; private int index; - @Override - public boolean canInsert() { - return true; - } - - @Override - public boolean canRemove() { - return true; - } - @Override public void insertAfter(R node) { //noinspection unchecked @@ -62,11 +52,6 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext { collection.add(index++, (T) node); } - @Override - public boolean isLvalue() { - return false; - } - @Override public void removeMe() { collection.remove(index--); @@ -98,25 +83,11 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext { } private class LvalueContext extends NodeContext { - @Override - public boolean isLvalue() { - return true; - } } private class NodeContext extends JsContext { protected T node; - @Override - public boolean canInsert() { - return false; - } - - @Override - public boolean canRemove() { - return false; - } - @Override public void insertAfter(R node) { throw new UnsupportedOperationException(); @@ -127,11 +98,6 @@ public class JsVisitorWithContextImpl extends JsVisitorWithContext { throw new UnsupportedOperationException(); } - @Override - public boolean isLvalue() { - return false; - } - @Override public void removeMe() { throw new UnsupportedOperationException();