Home
last modified time | relevance | path

Searched refs:sourceFile (Results 1 – 25 of 83) sorted by relevance

1234

/arkcompiler/ets_frontend/arkguard/test/ut/utils/
DTypeUtils.spec.ts23 let sourceFile: SourceFile; variable
36 sourceFile = createSourceFile('demo.ts', fileContent, ScriptTarget.ES2015, true);
41 const newSource = TypeUtils.createNewSourceFile(sourceFile);
43 assert.strictEqual(sourceFile.statements.length, newSource.statements.length);
44 assert.notStrictEqual(sourceFile.fileName, newSource.fileName);
51 const checker = TypeUtils.createChecker(sourceFile);
DTransformUtil.spec.ts24 let sourceFile: SourceFile; variable
37 sourceFile = createSourceFile('demo.js', fileContent, ScriptTarget.ES2015, true);
42 const nameSets = collectExistNames(sourceFile);
/arkcompiler/ets_frontend/ts2panda/tests/utils/
Dbase.ts150 let sourceFile = creatAstFromSnippet(snippet);
151 jshelpers.bindSourceFile(sourceFile, {});
158 setGlobalStrict(jshelpers.isEffectiveStrictModeSourceFile(sourceFile, compileOptions));
160 CompilerDriver.srcNode = sourceFile;
166 compilerDriver.compileUnitTest(sourceFile, literalBufferArray);
203 return (sourceFile: ts.SourceFile) => {
205 makeNameForGeneratedNode(sourceFile);
207 sourceFile = transformCommonjsModule(sourceFile);
209 jshelpers.bindSourceFile(sourceFile, {});
210 … setGlobalStrict(jshelpers.isEffectiveStrictModeSourceFile(sourceFile, compileOptions));
[all …]
Dasthelper.ts20 let sourceFile = ts.createSourceFile("snippet.ts", snippet, ts.ScriptTarget.ES2015, true);
21 return sourceFile;
28 …let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.…
29 return sourceFile;
/arkcompiler/ets_frontend/arkguard/src/utils/
DTransformUtil.ts40 export function collectExistNames(sourceFile: SourceFile): Set<string> {
51 forEachChild(sourceFile, visit);
62 export function collectIdentifiersAndStructs(sourceFile: SourceFile, context: TransformationContext…
82 visit(sourceFile);
92 export function isCommentedNode(node: Node, sourceFile: SourceFile): boolean {
93 const ranges: CommentRange[] = getLeadingCommentRangesOfNode(node, sourceFile);
DSourceMapUtil.ts33 export function getSourceMapGenerator(sourceFile: string): SourceMapGenerator {
34 if (!sourceFile) {
77 …return createSourceMapGenerator(host, sourceFile, currentDirectory, currentDirectory, generatorOpt…
/arkcompiler/ets_frontend/ets2panda/linter-4.2/src/ts-diagnostics/
DTypeScriptDiagnosticsExtractor.ts48 const sourceFile = program.getSourceFile(fileName); constant
49 return program.getSemanticDiagnostics(sourceFile)
50 .concat(program.getSyntacticDiagnostics(sourceFile))
51 .filter(diag => diag.file === sourceFile);
/arkcompiler/ets_frontend/ets2panda/linter/src/ts-diagnostics/
DTypeScriptDiagnosticsExtractor.ts48 const sourceFile = program.getSourceFile(fileName); constant
49 return program.getSemanticDiagnostics(sourceFile)
50 .concat(program.getSyntacticDiagnostics(sourceFile))
51 .filter(diag => diag.file === sourceFile);
/arkcompiler/runtime_core/static_core/runtime/tooling/inspector/
Ddebug_info_cache.cpp34 void DebugInfoCache::GetSourceLocation(const PtFrame &frame, std::string_view &sourceFile, std::str… in GetSourceLocation() argument
40 sourceFile = debugInfo.GetSourceFile(method->GetFileId()); in GetSourceLocation()
85 …d_set<PtLocation, HashLocation> DebugInfoCache::GetContinueToLocations(std::string_view sourceFile, in GetContinueToLocations() argument
91 …[sourceFile](auto, auto &debugInfo, auto methodId) { return debugInfo.GetSourceFile(methodId) == s… in GetContinueToLocations()
143 std::set<size_t> DebugInfoCache::GetValidLineNumbers(std::string_view sourceFile, size_t startLine,… in GetValidLineNumbers() argument
156 auto methodFilter = [sourceFile, startLine](auto, auto &debugInfo, auto methodId) { in GetValidLineNumbers()
157 if (debugInfo.GetSourceFile(methodId) != sourceFile) { in GetValidLineNumbers()
182 [sourceFile](auto, auto &debugInfo, auto methodId) { in GetValidLineNumbers()
183 return (debugInfo.GetSourceFile(methodId) == sourceFile); in GetValidLineNumbers()
319 std::string DebugInfoCache::GetSourceCode(std::string_view sourceFile) in GetSourceCode() argument
[all …]
Dinspector_server.cpp114 …orServer::CallDebuggerScriptParsed(PtThread thread, ScriptId scriptId, std::string_view sourceFile) in CallDebuggerScriptParsed() argument
117 … server_.Call(sessionId, "Debugger.scriptParsed", [&sourceFile, &thread, &scriptId](auto &params) { in CallDebuggerScriptParsed()
120 params.AddProperty("url", sourceFile.data()); in CallDebuggerScriptParsed()
274 auto sourceFile = sourceManager_.GetSourceFileName(*scriptId); in OnCallDebuggerGetScriptSource() local
275 result.AddProperty("scriptSource", handler(sourceFile)); in OnCallDebuggerGetScriptSource()
345 auto sourceFile = sourceManager_.GetSourceFileName(location->GetScriptId()); in OnCallDebuggerSetBreakpoint() local
349 thread, [sourceFile](auto fileName) { return fileName == sourceFile; }, in OnCallDebuggerSetBreakpoint()
378 …sourceFileFilter = [sourceFile = url->find("file://") == 0 ? url->substr(std::strlen("file://")) :… in OnCallDebuggerSetBreakpointByUrl()
379 auto fileName) { return fileName == sourceFile; }; in OnCallDebuggerSetBreakpointByUrl()
546 …[this, thread, &callFrames](auto frameId, auto methodName, auto sourceFile, auto lineNumber, auto … in EnumerateCallFrames() argument
[all …]
Ddebug_info_cache.h41 …void GetSourceLocation(const PtFrame &frame, std::string_view &sourceFile, std::string_view &metho…
44 …std::unordered_set<PtLocation, HashLocation> GetContinueToLocations(std::string_view sourceFile, s…
47 …std::set<size_t> GetValidLineNumbers(std::string_view sourceFile, size_t startLine, size_t endLine,
52 std::string GetSourceCode(std::string_view sourceFile);
Dinspector.cpp237 std::set<size_t> Inspector::GetPossibleBreakpoints(std::string_view sourceFile, size_t startLine, s… in GetPossibleBreakpoints() argument
240 return debugInfoCache_.GetValidLineNumbers(sourceFile, startLine, endLine, restrictToFunction); in GetPossibleBreakpoints()
308 void Inspector::ContinueToLocation(PtThread thread, std::string_view sourceFile, size_t lineNumber) in ContinueToLocation() argument
312 it->second.ContinueTo(debugInfoCache_.GetContinueToLocations(sourceFile, lineNumber)); in ContinueToLocation()
348 std::string Inspector::GetSourceCode(std::string_view sourceFile) in GetSourceCode() argument
350 return debugInfoCache_.GetSourceCode(sourceFile); in GetSourceCode()
364 std::string_view sourceFile; in DebuggableThreadPostSuspend() local
367 debugInfoCache_.GetSourceLocation(frame, sourceFile, methodName, lineNumber); in DebuggableThreadPostSuspend()
374 handler(frameId++, methodName, sourceFile, lineNumber, scopeChain); in DebuggableThreadPostSuspend()
Dinspector.h76 …std::set<size_t> GetPossibleBreakpoints(std::string_view sourceFile, size_t startLine, size_t endL…
88 void ContinueToLocation(PtThread thread, std::string_view sourceFile, size_t lineNumber);
93 std::string GetSourceCode(std::string_view sourceFile);
/arkcompiler/ets_frontend/ts2panda/tests/
Dlexenv.test.ts67 let sourceFile = creatAstFromSnippet(source); variable
69 let globalScope = new GlobalScope(sourceFile);
70 let recorder = new Recorder(sourceFile, globalScope, compilerDriver, false, false, true);
77 …expect(globalScope.getBindingNode() === sourceFile, "functionblock.node should equal to sourceFile…
95 let sourceFile = creatAstFromSnippet(source); variable
97 let globalScope = new GlobalScope(sourceFile);
98 let recorder = new Recorder(sourceFile, globalScope, compilerDriver, false, false, true);
107 … expect(bindingNode, "functionblock.root should equal to sourceFile").to.be.deep.equal(sourceFile);
142 let sourceFile = creatAstFromSnippet(source); variable
144 let globalScope = new GlobalScope(sourceFile);
[all …]
/arkcompiler/ets_frontend/ts2panda/src/
Djshelpers.js42 function bindSourceFile(sourceFile, options) { argument
43 ts.bindSourceFile(sourceFile, options);
62 function getErrorSpanForNode(sourceFile, node) { argument
63 return ts.getErrorSpanForNode(sourceFile, node);
66 function getSpanOfTokenAtPosition(sourceFile, pos) { argument
67 return ts.getSpanOfTokenAtPosition(sourceFile, pos);
86 function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { argument
87 return ts.getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);
Dlog.ts38 export function printAstRecursively(node: ts.Node, indentLevel: number, sourceFile: ts.SourceFile):…
49 printAstRecursively(child, indentLevel + 1, sourceFile)
Dindex.ts45 function checkIsGlobalDeclaration(sourceFile: ts.SourceFile): boolean {
46 for (let statement of sourceFile.statements) {
82 for (let sourceFile of program.getSourceFiles()) {
89 …if (sourceFile.isDeclarationFile && !program.isSourceFileDefaultLibrary(sourceFile) && originFileN…
90 setGlobalDeclare(checkIsGlobalDeclaration(sourceFile));
91 generateDTs(sourceFile, options);
392 …let sourceFile = ts.createSourceFile(fileName, fs.readFileSync(jsFileName).toString(), ts.ScriptTa…
393 let jsFileDiagnostics = watchedProgram.getSyntacticDiagnostics(sourceFile);
415 if (path.basename(node.fileName) === fileName) { node = sourceFile; }
Djshelpers.d.ts24 export function bindSourceFile(sourceFile: ts.SourceFile, options: ts.CompilerOptions);
30 export function getErrorSpanForNode(sourceFile: ts.SourceFile, node: ts.Node): ts.TextSpan;
31 export function getSpanOfTokenAtPosition(sourceFile: ts.SourceFile, pos: number): ts.TextSpan;
36 export function getSourceTextOfNodeFromSourceFile(sourceFile: ts.SourceFile, node: ts.Node, include…
/arkcompiler/ets_frontend/ets2panda/parser/program/
Dprogram.h171 void SetSource(const panda::es2panda::SourceFile &sourceFile) in SetSource() argument
173 sourceCode_ = util::UString(sourceFile.source, Allocator()).View(); in SetSource()
174 sourceFilePath_ = util::Path(sourceFile.filePath, Allocator()); in SetSource()
175 sourceFileFolder_ = util::UString(sourceFile.fileFolder, Allocator()).View(); in SetSource()
177 resolvedFilePath_ = util::UString(sourceFile.resolvedPath, Allocator()).View(); in SetSource()
/arkcompiler/ets_frontend/arkguard/src/transformers/layout/
DDisableHilogTransformer.ts63 let sourceFile: SourceFile;
71 sourceFile = node;
102 if (isCommentedNode(child, sourceFile)) {
/arkcompiler/ets_runtime/ecmascript/debugger/tests/
Dhot_reload_manager_test.cpp67 std::string sourceFile = DEBUGGER_JS_DIR "patch/index.js"; in HWTEST_F_L0() local
85 [[maybe_unused]] auto patchExtractors = hotReloadManager->GetPatchExtractors(sourceFile); in HWTEST_F_L0()
95 EXPECT_TRUE(hotReloadManager->GetPatchExtractors(sourceFile).empty()); in HWTEST_F_L0()
/arkcompiler/ets_frontend/es2panda/compiler/core/
DcompilerContext.cpp25 bool isRecordSource, std::string sourceFile, std::string pkgName, in CompilerContext() argument
29 …isRecordSource_(isRecordSource), sourceFile_(sourceFile), pkgName_(pkgName), recordName_(recordNam… in CompilerContext()
/arkcompiler/ets_runtime/ecmascript/jspandafile/
Ddebug_info_extractor.cpp234 static const std::string sourceFile = ""; in GetSourceFile() local
239 return sourceFile; in GetSourceFile()
241 return methods_[methodId.GetOffset()].sourceFile; in GetSourceFile()
244 return iter->second.sourceFile; in GetSourceFile()
303 const char *sourceFile = ""; in ExtractorMethodDebugInfo() local
305 sourceFile = reinterpret_cast<const char *>(handler.GetFile()); in ExtractorMethodDebugInfo()
313 MethodDebugInfo methodDebugInfo = {sourceFile, sourceCode, handler.GetLineNumberTable(), in ExtractorMethodDebugInfo()
/arkcompiler/ets_frontend/ets2panda/aot/
Dmain.cpp146 std::string_view sourceFile; in Run() local
149 sourceFile = "etsstdlib.ets"; in Run()
152 sourceFile = options->SourceFile(); in Run()
155 es2panda::SourceFile input(sourceFile, parserInput, options->ParseModule()); in Run()
/arkcompiler/ets_runtime/ecmascript/debugger/
Djs_pt_location.h31 const std::string &sourceFile = "") : jsPandaFile_(jsPandaFile), methodId_(methodId), in jsPandaFile_()
32 bytecodeOffset_(bytecodeOffset), sourceFile_(sourceFile) in jsPandaFile_()

1234