Home
last modified time | relevance | path

Searched full:compiler (Results 1 – 25 of 179) sorted by relevance

12345678

/ark/ts2abc/ts2panda/src/statement/
DloopStatement.ts30 import { Compiler } from "../compiler";
35 export function compileDoStatement(stmt: ts.DoStatement, compiler: Compiler) {
36 compiler.pushScope(stmt);
37 let pandaGen = compiler.getPandaGen();
39 let loopScope = <LoopScope>compiler.getRecorder().getScopeOfNode(stmt);
54 compiler.pushEnv(loopEnv);
57 compiler.compileStatement(stmt.statement);
59 compiler.compileCondition(stmt.expression, loopEndLabel);
70 compiler.popEnv();
75 compiler.popScope();
[all …]
DclassStatement.ts28 import { Compiler } from "../compiler";
47 export function compileClassDeclaration(compiler: Compiler, stmt: ts.ClassLikeDeclaration) {
48 compiler.pushScope(stmt);
50 let pandaGen = compiler.getPandaGen();
58 let baseVreg = compileHeritageClause(compiler, stmt);
71 compiler.compileExpression(<ts.Expression>prop.getValue());
86 … Literal(LiteralTag.METHOD, compiler.getCompilerDriver().getFuncInternalName(<ts.MethodDeclaration…
93 compiler.compileExpression(<ts.Expression | ts.Identifier>prop.getValue());
110 createClassLiteralBuf(compiler, classBuffer, stmt, [baseVreg, classReg]);
112 compileUnCompiledProperty(compiler, properties, classReg);
[all …]
DreturnStatement.ts18 import { Compiler, ControlFlowChange } from "../compiler";
24 export function compileReturnStatement(stmt: ts.ReturnStatement, compiler: Compiler) {
25 let pandaGen = compiler.getPandaGen();
29 compileReturnInDerivedCtor(stmt, returnValue, compiler);
31 compileNormalReturn(stmt, returnValue, compiler);
36 function compileReturnInDerivedCtor(stmt: ts.ReturnStatement, returnValue: VReg, compiler: Compiler
37 let pandaGen = compiler.getPandaGen();
46 compileNormalReturn(stmt, returnValue, compiler);
54 compiler.compileExpression(expr);
67 compiler.getThis(stmt, thisReg);
[all …]
DswitchStatement.ts22 import { Compiler } from "../compiler";
30 private compiler: Compiler; property in SwitchBase
34 …constructor(stmt: ts.SwitchStatement, compiler: Compiler, caseNums: number, switchEndLabel: Label)…
36 this.compiler = compiler;
37 this.pandaGen = compiler.getPandaGen();
59 this.compiler.compileExpression(this.stmt.expression);
65 this.compiler.compileStatement(statement);
74 this.compiler.compileExpression(caseTarget.expression);
98 export function compileSwitchStatement(stmt: ts.SwitchStatement, compiler: Compiler) {
99 compiler.pushScope(stmt);
[all …]
DtryStatement.ts16 import { Compiler, ControlFlowChange } from "../compiler";
172 protected compiler: Compiler; property in TryBuilderBase
177 constructor(compiler: Compiler, pandaGen: PandaGen, Stmt: ts.Statement) {
178 this.compiler = compiler;
190 // compiler just handle the basic controlFlow
193 constructor(compiler: Compiler, pandaGen: PandaGen, tryStmt: ts.TryStatement) {
194 super(compiler, pandaGen, tryStmt)
204 this.compiler.compileStatement((<ts.TryStatement>this.stmt).tryBlock);
206 // when compiler is out of TryBlock, reset tryStatement
212 this.compiler.compileStatement((<ts.TryStatement>this.stmt).finallyBlock!);
[all …]
DforOfStatement.ts17 import { Compiler } from "src/compiler";
55 export function compileForOfStatement(stmt: ts.ForOfStatement, compiler: Compiler) {
56 compiler.pushScope(stmt);
58 let pandaGen = compiler.getPandaGen();
66 let loopScope = <LoopScope>compiler.getRecorder().getScopeOfNode(stmt);
73 compiler.compileExpression(stmt.expression);
83 …let tryBuilderWithForOf = new TryBuilderWithForOf(compiler, pandaGen, stmt, doneReg, iterator, lab…
85 compiler.constructTry(stmt, tryBuilderWithForOf, nextLabel);
93 compiler.popEnv();
97 compiler.popScope();
/ark/ts2abc/ts2panda/src/expression/
DyieldExpression.ts20 import { Compiler } from "../compiler";
22 export function compileYieldExpression(compiler: Compiler, expr: ts.YieldExpression) {
23 if (!(compiler.getFuncBuilder() instanceof GeneratorFunctionBuilder)) {
27 expr.asteriskToken ? genYieldStarExpr(compiler, expr) : genYieldExpr(compiler, expr);
30 function genYieldExpr(compiler: Compiler, expr: ts.YieldExpression) {
31 let pandaGen = compiler.getPandaGen();
32 let funcBuilder = <GeneratorFunctionBuilder>compiler.getFuncBuilder();
36 compiler.compileExpression(expr.expression);
47 function genYieldStarExpr(compiler: Compiler, expr: ts.YieldExpression) {
48 let funcBuilder = <GeneratorFunctionBuilder>compiler.getFuncBuilder();
[all …]
DobjectLiteralExpression.ts17 import { Compiler } from "src/compiler";
28 export function compileObjectLiteralExpression(compiler: Compiler, expr: ts.ObjectLiteralExpression…
29 let pandaGen = compiler.getPandaGen();
47 hasMethod = compileProperties(compiler, properties, literalBuffer);
49 createObject(expr, pandaGen, objReg, literalBuffer, hasMethod, compiler);
52 setUncompiledProperties(compiler, pandaGen, properties, objReg);
58 function compileProperties(compiler: Compiler, properties: Property[], literalBuffer: LiteralBuffer…
80 let compilerDriver = compiler.getCompilerDriver();
86 …teral(LiteralTag.GENERATOR, compilerDriver.getFuncInternalName(valueNode, compiler.getRecorder()));
88 … Literal(LiteralTag.METHOD, compilerDriver.getFuncInternalName(valueNode, compiler.getRecorder()));
[all …]
DcallExpression.ts19 import { Compiler } from "../compiler";
27 export function compileCallExpression(expr: ts.CallExpression, compiler: Compiler, inTailPos?: bool…
28 let pandaGen = compiler.getPandaGen();
32 …let processed = compiler.compileFunctionReturnThis(<ts.NewExpression | ts.CallExpression>expr.expr…
40 let hasSpread = emitCallArguments(compiler, expr, args);
41 compileSuperCall(compiler, expr, args, hasSpread);
46 let { arguments: args, passThis: passThis } = getHiddenParameters(expr.expression, compiler);
49 emitCall(expr, args, passThis, compiler);
53 export function getHiddenParameters(expr: ts.Expression, compiler: Compiler) {
54 let pandaGen = compiler.getPandaGen();
[all …]
DarrayLiteralExpression.ts17 import { Compiler } from "../compiler";
25 export function compileArrayLiteralExpression(compiler: Compiler, node: ts.ArrayLiteralExpression) {
26 let pandaGen = compiler.getPandaGen();
28 createArrayFromElements(node, compiler, node.elements, arrayObj);
32 export function createArrayFromElements(node: ts.Node, compiler: Compiler, elements: ts.NodeArray<t…
33 let pandaGen = compiler.getPandaGen();
62 compiler.compileExpression(element);
79 storeSpreadElement(compiler, pandaGen, element, arrayObj, indexReg);
84 storeSpreadElement(compiler, pandaGen, element, arrayObj, indexReg);
117 compiler.compileExpression(element);
[all …]
DmemberAccessExpression.ts17 import { Compiler } from "../compiler";
24 …essExpression(node: ts.ElementAccessExpression | ts.PropertyAccessExpression, compiler: Compiler) {
25 let pandaGen = compiler.getPandaGen();
29 let { obj: obj, prop: property } = getObjAndProp(node, objReg, propReg, compiler)
34 compileSuperProperty(compiler, node, thisReg, property);
47 …tAccessExpression | ts.PropertyAccessExpression, objReg: VReg, propReg: VReg, compiler: Compiler) {
48 let pandaGen = compiler.getPandaGen();
54 compiler.compileExpression(node.expression);
91 compiler.compileExpression(node.argumentExpression);
DmetaProperty.ts17 import { Compiler } from "../compiler";
20 export function compileMetaProperty(expr: ts.MetaProperty, compiler: Compiler) {
21 let curScope = compiler.getCurrentScope();
26 compiler.setCallOpt(scope, "4newTarget");
31 compiler.loadTarget(expr, { scope, level, v });
DnewExpression.ts17 import { Compiler } from "../compiler";
22 export function compileNewExpression(expr: ts.NewExpression, compiler: Compiler) {
23 let pandaGen = compiler.getPandaGen();
28 compiler.compileExpression(expr.expression);
36 … createArrayFromElements(expr, compiler, <ts.NodeArray<ts.Expression>>expr.arguments, argRegs);
59 compiler.compileExpression(argExpr);
DcompileCommaListExpression.ts17 import { Compiler } from "../compiler";
20 export function compileCommaListExpression(compiler: Compiler, exprList: ts.CommaListExpression) {
22 compiler.compileExpression(expr);
DregularExpression.ts17 import { Compiler } from "../compiler";
34 export function compileRegularExpressionLiteral(compiler: Compiler, regexp: ts.RegularExpressionLit…
35 let pandaGen = compiler.getPandaGen();
/ark/ts2abc/ts2panda/src/base/
Dlreference.ts18 import { Compiler } from "../compiler";
32 private compiler: Compiler; property in LReference
43 compiler: Compiler,
48 this.compiler = compiler;
57 this.obj = compiler.getPandaGen().getTemp();
58 this.prop = compiler.getPandaGen().getTemp();
63 let pandaGen = this.compiler.getPandaGen();
75 this.compiler.loadTarget(this.node, this.variable!);
85 let pandaGen = this.compiler.getPandaGen();
96 this.compiler.getThis(this.node, thisReg);
[all …]
/ark/ts2abc/ts2panda/src/
Dhoisting.ts19 import { Compiler } from "./compiler";
37 recorder: Recorder, compiler: Compiler) {
45 let compilerDriver = compiler.getCompilerDriver();
46 hoistFunction(decl, variableScope, pandaGen, compiler, compilerDriver);
68 export function hoistFunction(decl: FuncDecl, scope: Scope, pandaGen: PandaGen, compiler: Compiler,…
70 … compilerDriver.getFuncInternalName(<ts.FunctionLikeDeclaration>decl.node, compiler.getRecorder());
71 let env = compiler.getCurrentEnv();
96 …n hoistFunctionInBlock(scope: Scope, pandaGen: PandaGen, strictMode: boolean, compiler: Compiler) {
107 let compilerDriver = compiler.getCompilerDriver();
108 hoistFunction(func, scope, pandaGen, compiler, compilerDriver);
DcompilerUtils.ts27 import { Compiler } from "./compiler";
39 …pileDestructuring(pattern: ts.BindingOrAssignmentPattern, pandaGen: PandaGen, compiler: Compiler) {
44 compileArrayDestructuring(<ts.ArrayBindingOrAssignmentPattern>pattern, pandaGen, compiler);
48 … compileObjectDestructuring(<ts.ObjectBindingOrAssignmentPattern>pattern, pandaGen, compiler);
55 …rayDestructuring(arr: ts.ArrayBindingOrAssignmentPattern, pandaGen: PandaGen, compiler: Compiler) {
98 iterator, nextResult, pandaGen, compiler, isDeclaration);
120 let lRef = LReference.generateLReference(compiler, target, isDeclaration ? true : false);
149 compiler.compileExpression(<ts.Expression>init);
193 pandaGen: PandaGen, compiler: Compiler, isDeclaration: boolean) {
202 let lRef = LReference.generateLReference(compiler, target, isDeclaration);
[all …]
/ark/runtime_core/runtime/
Dstack_walker.cpp60 if (GetBoundaryFrameMethod<FrameKind::COMPILER>(bp) == BYPASS) { in GetTopFrameFromFp()
61 return CreateCFrame(GetPrevFromBoundary<FrameKind::COMPILER>(bp), in GetTopFrameFromFp()
62 GetReturnAddressFromBoundary<FrameKind::COMPILER>(bp), in GetTopFrameFromFp()
63 GetCalleeStackFromBoundary<FrameKind::COMPILER>(bp)); in GetTopFrameFromFp()
88 ASSERT(GetBoundaryFrameMethod<FrameKind::COMPILER>(prev) != FrameBridgeKind::BYPASS); in CreateCFrameForC2IBridge()
209 auto frame_method = GetBoundaryFrameMethod<FrameKind::COMPILER>(prev); in NextFromCFrame()
212 … auto prev_frame = reinterpret_cast<Frame *>(GetPrevFromBoundary<FrameKind::COMPILER>(prev)); in NextFromCFrame()
222 … auto prev_frame = reinterpret_cast<Frame *>(GetPrevFromBoundary<FrameKind::COMPILER>(prev)); in NextFromCFrame()
227 …frame_ = CreateCFrame(reinterpret_cast<SlotType *>(GetPrevFromBoundary<FrameKind::COMPILER>(prev)), in NextFromCFrame()
228 GetReturnAddressFromBoundary<FrameKind::COMPILER>(prev), in NextFromCFrame()
[all …]
/ark/runtime_core/runtime/entrypoints/
Dentrypoints_compiler.inl.erb17 % Compiler::entrypoints.each_with_index do |entrypoint, index|
27 % Compiler::entrypoints.each do |entrypoint|
37 % Compiler::entrypoints.each do |entrypoint|
50 % Compiler::entrypoints.each do |entrypoint|
61 static constexpr uint32_t ENTRYPOINTS_CRC32 = <%= Compiler::entrypoints_crc32 %>;
Dentrypoints_gen.h.erb41 % Compiler::entrypoints.each do |entrypoint|
57 static constexpr uint32_t ENTRYPOINTS_CRC32 = <%= Compiler::entrypoints_crc32 %>;
60 % Compiler::entrypoints.each_with_index do |entrypoint, index|
67 % Compiler::entrypoints.each do |entrypoint|
/ark/js_runtime/docs/
Doverview.md3 ARK is a unified programming platform developed by Huawei. Its key components include a compiler, t…
5 The ARK-JS consists of two parts: JS compiler toolchain and JS runtime. The JS compiler toolchain c…
7 The following figure shows the architecture of the JS compiler toolchain.
11 The ARK-JS source code compiler receives the JS source code, and ts2abc converts the JS source code…
46 The TS Ahead of Time \(AOT\) compiler directly converts the source code into high-quality machine c…
/ark/ts2abc/ts2panda/src/function/
DgeneratorFunctionBuilder.ts19 import { Compiler, ControlFlowChange } from "../compiler";
37 private compiler: Compiler; property in GeneratorFunctionBuilder
41 constructor(pandaGen: PandaGen, compiler: Compiler) {
43 this.compiler = compiler;
132 this.compiler.compileFinallyBeforeCFC(
199 this.compiler.compileFinallyBeforeCFC(
229 this.compiler.compileFinallyBeforeCFC(
/ark/runtime_core/docs/
Dmemory-management-SW-requirements.md9 1. Allocations for the internal usage by Runtime (Allocations for compiler purposes, for GC interna…
30 - Compiler Internal Space (linked list of arenas)
31 - Internal memory space for non-compiler part of runtime (including GC internals)
58 - TLAB API for compiler and interpreter
/ark/runtime_core/runtime/asm_defines/
Dasm_defines.def69 // Interpreter to compiler bridge consts
75 // Compiler to interpreter bridge consts
76 DEFINE_VALUE(COMP_METHOD_OFFSET, BoundaryFrame<FrameKind::COMPILER>::METHOD_OFFSET)
77 DEFINE_VALUE(COMP_FP_OFFSET, BoundaryFrame<FrameKind::COMPILER>::FP_OFFSET)
78 DEFINE_VALUE(COMP_RETURN_OFFSET, BoundaryFrame<FrameKind::COMPILER>::RETURN_OFFSET)
79 DEFINE_VALUE(COMP_CALLEES_OFFSET, BoundaryFrame<FrameKind::COMPILER>::CALLEES_OFFSET)

12345678