KJS: relocate com.google.dart.compiler -> org.jetbrains.kotlin
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.generators.tests
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsFunctionScope
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsFunctionScope
|
||||
import org.jetbrains.kotlin.generators.util.GeneratorsFileUtil
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.renderer.KeywordStringsGenerated
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
|
||||
import com.google.dart.compiler.backend.js.JsToStringGenerationVisitor;
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.HasMetadata;
|
||||
import com.google.dart.compiler.util.TextOutputImpl;
|
||||
|
||||
abstract class AbstractNode extends HasMetadata implements JsNode {
|
||||
@Override
|
||||
public String toString() {
|
||||
TextOutputImpl out = new TextOutputImpl();
|
||||
new JsToStringGenerationVisitor(out).accept(this);
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
protected <T extends HasMetadata> T withMetadataFrom(T other) {
|
||||
this.copyMetadataFrom(other);
|
||||
//noinspection unchecked
|
||||
return (T) this;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class RecursiveJsVisitor extends JsVisitor {
|
||||
@Override
|
||||
protected void visitElement(@NotNull JsNode node) {
|
||||
node.acceptChildren(this);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
|
||||
public abstract class SourceInfoAwareJsNode extends AbstractNode {
|
||||
private Object source;
|
||||
|
||||
@Override
|
||||
public Object getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSource(Object info) {
|
||||
source = info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acceptChildren(JsVisitor visitor) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsNode source(Object info) {
|
||||
source = info;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler;
|
||||
package org.jetbrains.kotlin.js;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js;
|
||||
package org.jetbrains.kotlin.js.backend;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.js.backend.ast.*;
|
||||
|
||||
/**
|
||||
* Searches for method invocations in constructor expressions that would not
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js;
|
||||
package org.jetbrains.kotlin.js.backend;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*;
|
||||
import com.google.dart.compiler.backend.js.ast.JsExpressionStatement;
|
||||
import org.jetbrains.kotlin.js.backend.ast.*;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsExpressionStatement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js;
|
||||
package org.jetbrains.kotlin.js.backend;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.js.backend.ast.*;
|
||||
|
||||
/**
|
||||
* Precedence indices from "JavaScript - The Definitive Guide" 4th Edition (page
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js;
|
||||
package org.jetbrains.kotlin.js.backend;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.js.backend.ast.*;
|
||||
|
||||
/**
|
||||
* Determines if a statement at the end of a block requires a semicolon.
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js;
|
||||
package org.jetbrains.kotlin.js.backend;
|
||||
|
||||
import gnu.trove.THashSet;
|
||||
|
||||
+6
-7
@@ -2,11 +2,13 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js;
|
||||
package org.jetbrains.kotlin.js.backend;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*;
|
||||
import com.google.dart.compiler.backend.js.ast.JsVars.JsVar;
|
||||
import com.google.dart.compiler.util.TextOutput;
|
||||
import org.jetbrains.kotlin.js.backend.ast.*;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsDoubleLiteral;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsIntLiteral;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsVars.JsVar;
|
||||
import org.jetbrains.kotlin.js.util.TextOutput;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -15,9 +17,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsDoubleLiteral;
|
||||
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsIntLiteral;
|
||||
|
||||
/**
|
||||
* Produces text output from a JavaScript AST.
|
||||
*/
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.kotlin.js.backend.JsToStringGenerationVisitor;
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.HasMetadata;
|
||||
import org.jetbrains.kotlin.js.util.TextOutputImpl;
|
||||
|
||||
abstract class AbstractNode extends HasMetadata implements JsNode {
|
||||
@Override
|
||||
public String toString() {
|
||||
TextOutputImpl out = new TextOutputImpl();
|
||||
new JsToStringGenerationVisitor(out).accept(this);
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
protected <T extends HasMetadata> T withMetadataFrom(T other) {
|
||||
this.copyMetadataFrom(other);
|
||||
//noinspection unchecked
|
||||
return (T) this;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
/**
|
||||
* Implemented by JavaScript objects with conditional execution.
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.common.HasSymbol;
|
||||
import org.jetbrains.kotlin.js.common.HasSymbol;
|
||||
|
||||
/**
|
||||
* Implemented by JavaScript objects that have a name.
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
/**
|
||||
* Represents the operator in a JavaScript binary operation.
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.intellij.util.SmartList;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class JsConditional extends JsExpression {
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+17
-1
@@ -1,4 +1,20 @@
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast
|
||||
package org.jetbrains.kotlin.js.backend.ast
|
||||
|
||||
object JsEmpty : SourceInfoAwareJsNode(), JsStatement {
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JsForIn extends SourceInfoAwareJsNode implements JsStatement {
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.common.Symbol;
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.common.Symbol;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.common.Symbol;
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.common.Symbol;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.HasMetadata;
|
||||
import com.google.dart.compiler.common.Symbol;
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.HasMetadata;
|
||||
import org.jetbrains.kotlin.js.common.Symbol;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.common.Symbol;
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.common.Symbol;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
public final class JsNullLiteral extends JsLiteral.JsValueLiteral {
|
||||
JsNullLiteral() {
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
public abstract class JsNumberLiteral extends JsLiteral.JsValueLiteral {
|
||||
public static final JsIntLiteral ZERO = new JsIntLiteral(0);
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
public interface JsOperator {
|
||||
int INFIX = 0x02;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.common.Symbol;
|
||||
import org.jetbrains.kotlin.js.common.Symbol;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class JsPostfixOperation extends JsUnaryOperation {
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class JsPrefixOperation extends JsUnaryOperation {
|
||||
+3
-4
@@ -2,18 +2,17 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import gnu.trove.TDoubleObjectHashMap;
|
||||
import gnu.trove.THashMap;
|
||||
import gnu.trove.TIntObjectHashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsDoubleLiteral;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsNumberLiteral.JsIntLiteral;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsDoubleLiteral;
|
||||
import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsIntLiteral;
|
||||
|
||||
/**
|
||||
* A JavaScript program.
|
||||
*/
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
public final class JsRegExp extends JsLiteral.JsValueLiteral {
|
||||
private String flags;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.backend.js.JsReservedIdentifiers;
|
||||
import org.jetbrains.kotlin.js.backend.JsReservedIdentifiers;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.Maps;
|
||||
import org.jetbrains.kotlin.js.util.Maps;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
public final class JsStringLiteral extends JsLiteral.JsValueLiteral {
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JsThrow extends SourceInfoAwareJsNode implements JsStatement {
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
public abstract class JsUnaryOperation extends JsExpression {
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
/**
|
||||
* A JavaScript unary operator.
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.common.Symbol;
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.common.Symbol;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast
|
||||
package org.jetbrains.kotlin.js.backend.ast
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsVars.JsVar
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsVars.JsVar
|
||||
|
||||
abstract class JsVisitor {
|
||||
open fun <T : JsNode?> accept(node: T) {
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* the License.
|
||||
*/
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
/**
|
||||
* Taken from GWT project with modifications.
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* the License.
|
||||
*/
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
/**
|
||||
* Taken from GWT project with modifications.
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import com.google.dart.compiler.util.AstUtil;
|
||||
import org.jetbrains.kotlin.js.util.AstUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class RecursiveJsVisitor extends JsVisitor {
|
||||
@Override
|
||||
protected void visitElement(@NotNull JsNode node) {
|
||||
node.acceptChildren(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.js.backend.ast;
|
||||
|
||||
public abstract class SourceInfoAwareJsNode extends AbstractNode {
|
||||
private Object source;
|
||||
|
||||
@Override
|
||||
public Object getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSource(Object info) {
|
||||
source = info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acceptChildren(JsVisitor visitor) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsNode source(Object info) {
|
||||
source = info;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast
|
||||
package org.jetbrains.kotlin.js.backend.ast
|
||||
|
||||
import java.util.Stack
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast.metadata
|
||||
package org.jetbrains.kotlin.js.backend.ast.metadata
|
||||
|
||||
abstract class HasMetadata {
|
||||
private val metadata: MutableMap<String, Any?> = hashMapOf()
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast.metadata
|
||||
package org.jetbrains.kotlin.js.backend.ast.metadata
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,14 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@file:JvmName("MetadataProperties")
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast.metadata
|
||||
package org.jetbrains.kotlin.js.backend.ast.metadata
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.resolve.inline.InlineStrategy
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.common;
|
||||
package org.jetbrains.kotlin.js.common;
|
||||
|
||||
public interface HasSymbol {
|
||||
/**
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.common;
|
||||
package org.jetbrains.kotlin.js.common;
|
||||
|
||||
import com.google.dart.compiler.Source;
|
||||
import org.jetbrains.kotlin.js.Source;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
+18
-2
@@ -1,6 +1,22 @@
|
||||
package com.google.dart.compiler.common;
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import com.google.dart.compiler.Source;
|
||||
package org.jetbrains.kotlin.js.common;
|
||||
|
||||
import org.jetbrains.kotlin.js.Source;
|
||||
|
||||
public class SourceInfoImpl implements SourceInfo {
|
||||
protected Source source = null;
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.common;
|
||||
package org.jetbrains.kotlin.js.common;
|
||||
|
||||
public interface Symbol {
|
||||
}
|
||||
+5
-2
@@ -2,12 +2,15 @@
|
||||
// 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.
|
||||
|
||||
package com.google.dart.compiler.util;
|
||||
package org.jetbrains.kotlin.js.util;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsBinaryOperation;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsBinaryOperator;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsExpression;
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.util;
|
||||
package org.jetbrains.kotlin.js.util;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.util;
|
||||
package org.jetbrains.kotlin.js.util;
|
||||
|
||||
/**
|
||||
* Interface used for printing text output.
|
||||
+1
-1
@@ -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 file.
|
||||
|
||||
package com.google.dart.compiler.util;
|
||||
package org.jetbrains.kotlin.js.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.resolve.diagnostics
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsFunctionScope
|
||||
import com.google.dart.compiler.backend.js.ast.JsProgram
|
||||
import com.google.dart.compiler.backend.js.ast.JsRootScope
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsFunctionScope
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsProgram
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsRootScope
|
||||
import com.google.gwt.dev.js.parserExceptions.AbortParsingException
|
||||
import com.google.gwt.dev.js.rhino.CodePosition
|
||||
import com.google.gwt.dev.js.rhino.ErrorReporter
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.coroutine
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsBlock
|
||||
import com.google.dart.compiler.backend.js.ast.JsStatement
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsBlock
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsStatement
|
||||
|
||||
class CoroutineBlock {
|
||||
val statements = mutableListOf<JsStatement>()
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.coroutine
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.*
|
||||
import org.jetbrains.kotlin.js.inline.util.collectBreakContinueTargets
|
||||
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils
|
||||
import org.jetbrains.kotlin.utils.DFS
|
||||
|
||||
class CoroutineBodyTransformer(private val program: JsProgram,private val context: CoroutineTransformationContext) : RecursiveJsVisitor() {
|
||||
class CoroutineBodyTransformer(private val program: JsProgram, private val context: CoroutineTransformationContext) : RecursiveJsVisitor() {
|
||||
private val entryBlock = context.entryBlock
|
||||
private val globalCatchBlock = context.globalCatchBlock
|
||||
private var currentBlock = entryBlock
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.coroutine
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.coroutineMetadata
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.coroutineMetadata
|
||||
import org.jetbrains.kotlin.js.inline.clean.FunctionPostProcessor
|
||||
import org.jetbrains.kotlin.js.inline.util.collectLocalVariables
|
||||
import org.jetbrains.kotlin.js.inline.util.getInnerFunction
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.coroutine
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsDebugger
|
||||
import com.google.dart.compiler.backend.js.ast.JsExpressionStatement
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.MetadataProperty
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsDebugger
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsExpressionStatement
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.MetadataProperty
|
||||
|
||||
var JsDebugger.targetBlock: CoroutineBlock? by MetadataProperty(default = null)
|
||||
var JsDebugger.targetExceptionBlock: CoroutineBlock? by MetadataProperty(default = null)
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.coroutine
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.*
|
||||
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils
|
||||
import org.jetbrains.kotlin.utils.singletonOrEmptyList
|
||||
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.coroutine
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsFunction
|
||||
import com.google.dart.compiler.backend.js.ast.JsScope
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.coroutineMetadata
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsFunction
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsScope
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.coroutineMetadata
|
||||
|
||||
class CoroutineTransformationContext(private val scope: JsScope, function: JsFunction) {
|
||||
val entryBlock = CoroutineBlock()
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.coroutine
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.coroutineType
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.coroutineType
|
||||
|
||||
class CoroutineTransformer(private val program: JsProgram) : JsVisitorWithContextImpl() {
|
||||
private val additionalStatements = mutableListOf<JsStatement>()
|
||||
|
||||
@@ -16,9 +16,12 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.inline
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.*
|
||||
import com.intellij.util.SmartList
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.SideEffectKind
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.sideEffects
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.staticRef
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.synthetic
|
||||
import org.jetbrains.kotlin.js.inline.util.IdentitySet
|
||||
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils
|
||||
import org.jetbrains.kotlin.js.inline.util.rewriters.ContinueReplacingVisitor
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.inline
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.*
|
||||
import org.jetbrains.kotlin.js.inline.clean.removeDefaultInitializers
|
||||
import org.jetbrains.kotlin.js.inline.clean.removeFakeSuspend
|
||||
import org.jetbrains.kotlin.js.inline.context.InliningContext
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.inline
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.inlineStrategy
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.inlineStrategy
|
||||
import com.google.gwt.dev.js.ThrowExceptionOnErrorReporter
|
||||
import com.intellij.util.containers.SLRUCache
|
||||
import org.jetbrains.kotlin.builtins.isExtensionFunctionType
|
||||
import org.jetbrains.kotlin.builtins.isFunctionTypeOrSubtype
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.js.backend.ast.*
|
||||
import org.jetbrains.kotlin.js.config.LibrarySourcesConfig
|
||||
import org.jetbrains.kotlin.js.inline.util.IdentitySet
|
||||
import org.jetbrains.kotlin.js.inline.util.isCallInvocation
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.inline
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsStatement
|
||||
import com.google.dart.compiler.backend.js.ast.JsExpression
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsStatement
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsExpression
|
||||
|
||||
class InlineableResult(
|
||||
val inlineableBody: JsStatement,
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.inline;
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*;
|
||||
import com.google.dart.compiler.backend.js.ast.metadata.MetadataProperties;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -27,6 +25,8 @@ import org.jetbrains.kotlin.descriptors.PropertyGetterDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.PropertySetterDescriptor;
|
||||
import org.jetbrains.kotlin.diagnostics.DiagnosticSink;
|
||||
import org.jetbrains.kotlin.diagnostics.Errors;
|
||||
import org.jetbrains.kotlin.js.backend.ast.*;
|
||||
import org.jetbrains.kotlin.js.backend.ast.metadata.MetadataProperties;
|
||||
import org.jetbrains.kotlin.js.inline.clean.FunctionPostProcessor;
|
||||
import org.jetbrains.kotlin.js.inline.clean.RemoveUnusedFunctionDefinitionsKt;
|
||||
import org.jetbrains.kotlin.js.inline.clean.RemoveUnusedLocalFunctionDeclarationsKt;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user