JS backend: made JsBlock statements list modifieable
Inliner should be able to add statements of inline function to JsBlock
This commit is contained in:
committed by
Zalim Bashorov
parent
53fe237499
commit
2b6045af0f
@@ -5,6 +5,7 @@
|
||||
package com.google.dart.compiler.backend.js.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.intellij.util.SmartList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -21,11 +22,11 @@ public class JsBlock extends SourceInfoAwareJsNode implements JsStatement {
|
||||
}
|
||||
|
||||
public JsBlock(JsStatement statement) {
|
||||
this(Collections.singletonList(statement));
|
||||
this(new SmartList<JsStatement>(statement));
|
||||
}
|
||||
|
||||
public JsBlock(JsStatement... statements) {
|
||||
this(Arrays.asList(statements));
|
||||
this(new SmartList<JsStatement>(statements));
|
||||
}
|
||||
|
||||
public JsBlock(@NotNull List<JsStatement> statements) {
|
||||
|
||||
Reference in New Issue
Block a user