/arkcompiler/ets_runtime/ecmascript/extractortool/src/ |
H A D | zip_file_reader_io.cpp | 23 std::string ZipFileReaderIo::ReadBuffer(size_t startPos, size_t bufferSize) in ReadBuffer() argument 26 if (fd_ < 0 || startPos + bufferSize > fileLen_) { in ReadBuffer() 31 if (!ReadBuffer(reinterpret_cast<uint8_t*>(result.data()), startPos, bufferSize)) { in ReadBuffer() 38 bool ZipFileReaderIo::ReadBuffer(uint8_t *dst, size_t startPos, size_t bufferSize) in ReadBuffer() argument 40 if (dst == nullptr || fd_ < 0 || startPos + bufferSize > fileLen_) { in ReadBuffer() 44 auto const readCount = pread(fd_, dst, bufferSize, startPos); in ReadBuffer()
|
H A D | zip_file_reader_mem.cpp | 47 std::string ZipFileReaderMem::ReadBuffer(size_t startPos, size_t bufferSize) in ReadBuffer() argument 49 if (startPos + bufferSize > fileContent_.length()) { in ReadBuffer() 53 return fileContent_.substr(startPos, bufferSize); in ReadBuffer() 56 bool ZipFileReaderMem::ReadBuffer(uint8_t *dst, size_t startPos, size_t bufferSize) in ReadBuffer() argument 58 if (!dst || startPos + bufferSize > fileContent_.length()) { in ReadBuffer() 62 if (memcpy_s(dst, bufferSize, fileContent_.data() + startPos, bufferSize) != EOK) { in ReadBuffer()
|
H A D | file_path_utils.cpp | 81 size_t startPos = pos; in SplitString() local 83 while ((endPos = str.find_first_of(seps, startPos)) != std::string::npos) { in SplitString() 84 if (endPos > startPos) { in SplitString() 85 out.emplace_back(str.substr(startPos, endPos - startPos)); in SplitString() 87 startPos = endPos + 1; in SplitString() 90 if (startPos < str.length()) { in SplitString() 91 out.emplace_back(str.substr(startPos)); in SplitString() 111 size_t startPos = str.find_first_not_of(charSet); in StripString() local 112 if (startPos in StripString() [all...] |
H A D | zip_file_reader_io.h | 30 std::string ReadBuffer(size_t startPos, size_t bufferSize) override; 31 bool ReadBuffer(uint8_t *dst, size_t startPos, size_t bufferSize) override;
|
H A D | zip_file_reader_mem.h | 30 std::string ReadBuffer(size_t startPos, size_t bufferSize) override; 31 bool ReadBuffer(uint8_t *dst, size_t startPos, size_t bufferSize) override;
|
H A D | zip_file_reader.h | 36 virtual std::string ReadBuffer(size_t startPos, size_t bufferSize) = 0; 37 virtual bool ReadBuffer(uint8_t *dst, size_t startPos, size_t bufferSize) = 0;
|
H A D | zip_file.cpp | 398 auto startPos = fileStartPos_ + zipEntry.localHeaderOffset; in CheckCoherencyLocalHeader() local 400 auto buff = zipFileReader_->ReadBuffer(startPos, buffSize); in CheckCoherencyLocalHeader() 442 auto startPos = GetEntryStart(zipEntry, extraSize); in UnzipWithStore() local 446 std::string readBuffer = zipFileReader_->ReadBuffer(startPos, readLen); in UnzipWithStore() 451 startPos += readLen; in UnzipWithStore() 485 size_t &startPos) const in ReadZStream() 489 if (!zipFileReader_->ReadBuffer(buffer, startPos, remainBytes)) { in ReadZStream() 494 startPos += remainBytes; in ReadZStream() 508 auto startPos = GetEntryStart(zipEntry, extraSize); in UnzipWithInflated() local 519 if (!ReadZStream(bufIn, zstream, remainCompressedSize, startPos)) { in UnzipWithInflated() [all...] |
H A D | zip_file.h | 314 bool ReadZStream(const BytePtr &buffer, z_stream &zstream, uint32_t &remainCompressedSize, size_t &startPos) const;
|
/arkcompiler/toolchain/websocket/ |
H A D | http.cpp | 23 auto startPos = headersText.find(headerName); in DecodeHeader() local 24 if (startPos != std::string::npos) { in DecodeHeader() 25 auto endOfLinePos = headersText.find(EOL, startPos); in DecodeHeader() 26 startPos += headerName.size(); in DecodeHeader() 27 if (startPos < headersText.size() && startPos < endOfLinePos) { in DecodeHeader() 28 return headersText.substr(startPos, endOfLinePos - startPos); in DecodeHeader()
|
/arkcompiler/ets_frontend/es2panda/typescript/core/ |
H A D | typeElaborationContext.h | 35 const lexer::SourcePosition &startPos) in ElaborationContext() 40 startPos_(startPos), in ElaborationContext() 62 const lexer::SourcePosition &startPos) in ArrayElaborationContext() 63 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ArrayElaborationContext() 77 const lexer::SourcePosition &startPos) in ObjectElaborationContext() 78 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ObjectElaborationContext() 34 ElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, const lexer::SourcePosition &startPos) ElaborationContext() argument 61 ArrayElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, const lexer::SourcePosition &startPos) ArrayElaborationContext() argument 76 ObjectElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, const lexer::SourcePosition &startPos) ObjectElaborationContext() argument
|
/arkcompiler/ets_frontend/ets2panda/checker/ts/ |
H A D | typeElaborationContext.h | 35 const lexer::SourcePosition &startPos) in ElaborationContext() 40 startPos_(startPos), in ElaborationContext() 64 const lexer::SourcePosition &startPos) in ArrayElaborationContext() 65 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ArrayElaborationContext() 79 const lexer::SourcePosition &startPos) in ObjectElaborationContext() 80 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ObjectElaborationContext() 34 ElaborationContext(TSChecker *checker, Type *targetType, Type *sourceType, ir::Expression *sourceNode, const lexer::SourcePosition &startPos) ElaborationContext() argument 63 ArrayElaborationContext(TSChecker *checker, Type *targetType, Type *sourceType, ir::Expression *sourceNode, const lexer::SourcePosition &startPos) ArrayElaborationContext() argument 78 ObjectElaborationContext(TSChecker *checker, Type *targetType, Type *sourceType, ir::Expression *sourceNode, const lexer::SourcePosition &startPos) ObjectElaborationContext() argument
|
/arkcompiler/ets_frontend/ets2panda/evaluate/ |
H A D | helpers.cpp | 90 auto startPos = typeSignature.find_last_of('/'); in ReferenceToTypeNode() local 91 if (startPos == std::string_view::npos) { in ReferenceToTypeNode() 92 startPos = 1; in ReferenceToTypeNode() 94 startPos += 1; in ReferenceToTypeNode() 96 return ClassReferenceToTypeNode(typeSignature.substr(startPos, typeSignature.size() - 1 - startPos), in ReferenceToTypeNode() 203 auto startPos = typeSignature.find_last_of('/'); in ReferenceToName() local 204 if (startPos == std::string_view::npos) { in ReferenceToName() 205 startPos = 1; in ReferenceToName() 207 startPos in ReferenceToName() [all...] |
/arkcompiler/toolchain/tooling/client/manager/ |
H A D | source_manager.cpp | 110 std::string::size_type startPos = 0; in SetFileSource() local 113 std::string line = fileSource.substr(startPos, endPos - startPos); in SetFileSource() 115 startPos = endPos + IGNOR_NEWLINE_FLAG; // ignore "\r\n" in SetFileSource() 116 endPos = fileSource.find("\r\n", startPos); in SetFileSource() 118 it->second.second.push_back(fileSource.substr(startPos)); in SetFileSource()
|
/arkcompiler/ets_frontend/ets2panda/lexer/ |
H A D | keywordsUtil.cpp | 209 size_t startPos = lexer_->GetToken().Start().index; in ScanIdContinue() local 213 startPos = Iterator().Index(); in ScanIdContinue() 216 auto escapeEnd = startPos; in ScanIdContinue() 248 lexer_->GetToken().src_ = lexer_->SourceView(startPos, Iterator().Index()); in ScanIdContinue()
|
H A D | lexer.h | 355 const auto startPos = Iterator().Index(); in ScanString() local 356 auto escapeEnd = startPos; in ScanString() 432 GetToken().src_ = SourceView(startPos, Iterator().Index()); in ScanString()
|
/arkcompiler/ets_frontend/es2panda/lexer/ |
H A D | keywordsUtil.cpp | 213 size_t startPos = lexer_->GetToken().Start().index; in ScanIdContinue() local 217 startPos = Iterator().Index(); in ScanIdContinue() 220 auto escapeEnd = startPos; in ScanIdContinue() 252 lexer_->GetToken().src_ = lexer_->SourceView(startPos, Iterator().Index()); in ScanIdContinue()
|
H A D | lexer.h | 220 const auto startPos = Iterator().Index(); in ScanString() local 221 auto escapeEnd = startPos; in ScanString() 297 GetToken().src_ = SourceView(startPos, Iterator().Index()); in ScanString()
|
/arkcompiler/ets_frontend/ets2panda/lexer/regexp/ |
H A D | regexp.cpp | 776 auto startPos = iter_; in ParseBracedQuantifier() local 780 iter_ = startPos; in ParseBracedQuantifier() 828 iter_ = startPos; in ParseBracedQuantifier()
|
/arkcompiler/ets_frontend/es2panda/lexer/regexp/ |
H A D | regexp.cpp | 755 auto startPos = iter_; in ParseBracedQuantifier() local 759 iter_ = startPos; in ParseBracedQuantifier() 807 iter_ = startPos; in ParseBracedQuantifier()
|
/arkcompiler/ets_frontend/es2panda/parser/ |
H A D | expressionParser.cpp | 191 const auto startPos = lexer_->Save(); in ParseExpression() local 202 lexer_->Rewind(startPos); in ParseExpression() 647 const auto startPos = lexer_->Save(); in ParseCoverParenthesizedExpressionAndArrowParameterList() local 657 lexer_->Rewind(startPos); in ParseCoverParenthesizedExpressionAndArrowParameterList() 663 lexer_->Rewind(startPos); in ParseCoverParenthesizedExpressionAndArrowParameterList() 880 const auto startPos = lexer_->Save(); in ParseTemplateLiteral() local 888 lexer_->Rewind(startPos); in ParseTemplateLiteral() 893 element->SetRange({lexer::SourcePosition {startPos.iterator.Index(), startPos.line}, in ParseTemplateLiteral() 1694 const lexer::SourcePosition &startPos in ParsePostPrimaryExpression() local 1713 const lexer::SourcePosition &startPos = returnExpression->Start(); ParsePostPrimaryExpression() local 2037 ParseShorthandProperty(const lexer::LexerPosition *startPos) ParseShorthandProperty() argument 2245 const auto startPos = lexer_->Save(); ParsePropertyDefinition() local [all...] |
H A D | parserImpl.cpp | 500 const auto startPos = lexer_->Save(); in ParseTsTemplateLiteralType() local 505 lexer_->Rewind(startPos); in ParseTsTemplateLiteralType() 509 element->SetRange({lexer::SourcePosition{startPos.iterator.Index(), startPos.line}, in ParseTsTemplateLiteralType() 946 lexer::SourcePosition startPos = lexer_->GetToken().Start(); in ParseTsTupleElement() local 988 element->SetRange({startPos, elementType->End()}); in ParseTsTupleElement() 1001 element->SetRange({startPos, endPos}); in ParseTsTupleElement() 1289 lexer::SourcePosition startPos = lexer_->GetToken().Start(); in ParseTsTypePredicate() local 1317 result->SetRange({startPos, endPos}); in ParseTsTypePredicate() 1329 result->SetRange({startPos, endPo in ParseTsTypePredicate() 1815 const auto startPos = lexer_->Save(); IsTsFunctionType() local 3519 const auto startPos = lexer_->Save(); ParseEnumComputedPropertyKey() local [all...] |
/arkcompiler/ets_frontend/ets2panda/parser/ |
H A D | ASparser.cpp | 528 const auto startPos = Lexer()->Save(); in ParseParenthesizedOrFunctionType() local 536 Lexer()->Rewind(startPos); in ParseParenthesizedOrFunctionType() 552 Lexer()->Rewind(startPos); in ParseParenthesizedOrFunctionType() 564 Lexer()->Rewind(startPos); in ParseParenthesizedOrFunctionType() 719 const lexer::SourcePosition &startPos = type->Start(); in ParseTypeAnnotationTokenLeftSquareBracket() local 732 type->SetRange({startPos, Lexer()->GetToken().End()}); in ParseTypeAnnotationTokenLeftSquareBracket() 1474 lexer::SourcePosition startPos = Lexer()->GetToken().Start(); in ParsePrefixAssertionExpression() local 1488 node->SetRange({startPos, Lexer()->GetToken().End()}); in ParsePrefixAssertionExpression()
|
H A D | ETSparserTypes.cpp | 468 const lexer::SourcePosition &startPos = Lexer()->GetToken().Start(); in ParseTypeAnnotation() local 486 typeAnnotation->SetRange({startPos, Lexer()->GetToken().End()}); in ParseTypeAnnotation()
|
H A D | expressionParser.cpp | 727 const auto startPos = lexer_->Save(); in ParseTemplateLiteral() local 732 lexer_->Rewind(startPos); in ParseTemplateLiteral() 736 element->SetRange({lexer::SourcePosition {startPos.Iterator().Index(), startPos.Line()}, in ParseTemplateLiteral() 1914 ir::Property *ParserImpl::ParseShorthandProperty(const lexer::LexerPosition *startPos) in ParseShorthandProperty() argument 1921 lexer_->Rewind(*startPos); in ParseShorthandProperty() 2120 const auto startPos = lexer_->Save(); in ParsePropertyDefinition() local 2130 return ParseShorthandProperty(&startPos); in ParsePropertyDefinition()
|
H A D | statementParser.cpp | 628 const auto startPos = lexer_->Save(); in ParseExpressionStatement() local 638 startPos.GetToken().Start()); in ParseExpressionStatement() 640 lexer_->Rewind(startPos); in ParseExpressionStatement() 652 functionDecl->SetStart(startPos.GetToken().Start()); in ParseExpressionStatement() 657 lexer_->Rewind(startPos); in ParseExpressionStatement() 665 exprStatementNode->SetRange({startPos.GetToken().Start(), endPos}); in ParseExpressionStatement()
|