Make the transition to ArrayBuffer backed Arrays (#70)

* Traverse base classes when resolving overloads
* Implement preliminary TypedArray accessors
* Extract decorator flags from common flags to make space
* Add '**' overload
* Implement basic explicit inlining
* Support inlining of instance methods
* Reduce number of required locals when inlining
* Implement inlining of operator overloads
* Fix issues when inlining generic functions
This commit is contained in:
Daniel Wirtz
2018-04-11 23:35:19 +02:00
committed by GitHub
parent 0f49e054d2
commit 623597c23a
44 changed files with 13242 additions and 4945 deletions

View File

@ -75,7 +75,8 @@ import {
ParameterNode,
ParameterKind,
ExportMember,
SwitchCase
SwitchCase,
DeclarationStatement
} from "../ast";
import {
@ -912,7 +913,6 @@ export class ASTBuilder {
}
visitFieldDeclaration(node: FieldDeclaration): void {
this.serializeBuiltinDecorators(node);
var decorators = node.decorators;
if (decorators) {
for (let i = 0, k = decorators.length; i < k; ++i) {
@ -961,7 +961,6 @@ export class ASTBuilder {
visitFunctionDeclaration(node: FunctionDeclaration): void {
var sb = this.sb;
this.serializeBuiltinDecorators(node);
var decorators = node.decorators;
if (decorators) {
for (let i = 0, k = decorators.length; i < k; ++i) {
@ -1098,7 +1097,6 @@ export class ASTBuilder {
}
visitInterfaceDeclaration(node: InterfaceDeclaration): void {
this.serializeBuiltinDecorators(node);
var decorators = node.decorators;
if (decorators) {
for (let i = 0, k = decorators.length; i < k; ++i) {
@ -1138,7 +1136,6 @@ export class ASTBuilder {
}
visitMethodDeclaration(node: MethodDeclaration): void {
this.serializeBuiltinDecorators(node);
var decorators = node.decorators;
if (decorators) {
for (let i = 0, k = decorators.length; i < k; ++i) {
@ -1155,7 +1152,6 @@ export class ASTBuilder {
}
visitNamespaceDeclaration(node: NamespaceDeclaration): void {
this.serializeBuiltinDecorators(node);
var decorators = node.decorators;
if (decorators) {
for (let i = 0, k = decorators.length; i < k; ++i) {
@ -1315,7 +1311,6 @@ export class ASTBuilder {
}
visitVariableStatement(node: VariableStatement): void {
this.serializeBuiltinDecorators(node);
var decorators = node.decorators;
if (decorators) {
for (let i = 0, k = decorators.length; i < k; ++i) {
@ -1398,19 +1393,6 @@ export class ASTBuilder {
}
}
serializeBuiltinDecorators(node: Node): void {
var sb = this.sb;
var indentLevel = this.indentLevel;
if (node.is(CommonFlags.GLOBAL)) {
sb.push("@global\n");
indent(sb, indentLevel);
}
if (node.is(CommonFlags.UNMANAGED)) {
sb.push("@unmanaged\n");
indent(sb, indentLevel);
}
}
serializeExternalModifiers(node: Node): void {
var sb = this.sb;
if (node.is(CommonFlags.EXPORT)) {