Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feature(rome_js_semantic): extraction of reference (read) events #2725

Merged
merged 7 commits into from
Jun 20, 2022

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Jun 17, 2022

This PR is the part that matches declarations and scopes of the main PR (#2489).
For more details: #2488

Now we are matching references and declarations on the naive case.

This is the first time we need to match the content of the code, so to avoid allocating strings and spreading a lifetime everywhere, I am storing only the hash of the &str.

In theory, we could use interning, but I don´t need the values of string slices (yet), no this is actually faster.

var and hoisting will be dealt in the next PR.

@xunilrj xunilrj temporarily deployed to aws June 17, 2022 10:06 Inactive
@github-actions
Copy link

github-actions bot commented Jun 17, 2022

@github-actions
Copy link

github-actions bot commented Jun 17, 2022

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 45878 45878 0
Passed 44938 44938 0
Failed 940 940 0
Panics 0 0 0
Coverage 97.95% 97.95% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 39 39 0
Passed 36 36 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.31% 92.31% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 5946 5946 0
Passed 350 400 ✅ ⏫ +50
Failed 5596 5546 ✅ ⏬ -50
Panics 0 0 0
Coverage 5.89% 6.73% +0.84%
🔥 Regression (28):
anonymousDefaultExportsAmd.symbols
anonymousDefaultExportsCommonjs.symbols
anonymousDefaultExportsSystem.symbols
anonymousDefaultExportsUmd.symbols
bindingPatternOmittedExpressionNesting.symbols
declFileTypeAnnotationBuiltInType.symbols
declarationEmitDefaultExportWithTempVarName.symbols
declarationEmitDefaultExportWithTempVarNameWithBundling.symbols
doNotEmitTripleSlashCommentsInEmptyFile.symbols
duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.symbols
es5-commonjs7.symbols
exportDefaultParenthesize.symbols
jsDeclarationsTypedefDescriptionsPreserved.symbols
keepImportsInDts1.symbols
keepImportsInDts2.symbols
keepImportsInDts3.symbols
keepImportsInDts4.symbols
library-reference-4.symbols
moduleAugmentationInDependency.symbols
moduleResolutionWithExtensions_unexpected.symbols
moduleResolutionWithExtensions_unexpected2.symbols
moduleResolution_noLeadingDot.symbols
tupleElementTypes1.symbols
tupleElementTypes3.symbols
tupleElementTypes4.symbols
typeofThisWithImplicitThis.symbols
typeofUndefined.symbols
typingsLookup2.symbols
🎉 Fixed (78):
YieldExpression19_es6.symbols
YieldExpression7_es6.symbols
argumentsObjectIterator03_ES6.symbols
asyncFunctionDeclaration14_es2017.symbols
asyncFunctionDeclaration14_es5.symbols
asyncFunctionDeclaration14_es6.symbols
asyncFunctionDeclaration1_es2017.symbols
asyncFunctionDeclaration1_es5.symbols
asyncFunctionDeclaration1_es6.symbols
commentOnAmbientfunction.symbols
commentsAfterCaseClauses1.symbols
commentsAfterCaseClauses2.symbols
commentsAfterCaseClauses3.symbols
contextualTyping13.symbols
contextualTyping28.symbols
contextualTyping29.symbols
contextualTyping31.symbols
contextualTyping32.symbols
declarationEmitModuleWithScopeMarker.symbols
destructuringVoid.symbols
emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.symbols
emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.symbols
emptyAssignmentPatterns01_ES5.symbols
emptyAssignmentPatterns01_ES5iterable.symbols
emptyAssignmentPatterns01_ES6.symbols
emptyAssignmentPatterns03_ES5.symbols
emptyAssignmentPatterns03_ES5iterable.symbols
emptyAssignmentPatterns03_ES6.symbols
es5-asyncFunction.symbols
es5-asyncFunctionDoStatements.symbols
es5-asyncFunctionIfStatements.symbols
es5-asyncFunctionNestedLoops.symbols
es5-asyncFunctionNewExpressions.symbols
es5-asyncFunctionReturnStatements.symbols
es5-asyncFunctionSwitchStatements.symbols
es5-asyncFunctionWhileStatements.symbols
es5-importHelpersAsyncFunctions.symbols
es5ExportDefaultFunctionDeclaration4.symbols
es5ExportDefaultIdentifier.symbols
es6ExportDefaultIdentifier.symbols
exportDefaultVariable.symbols
functionOnlyHasThrow.symbols
functionReturningItself.symbols
functionWithNoBestCommonType1.symbols
functionWithThrowButNoReturn1.symbols
generatorReturnTypeFallback.5.symbols
generatorTransformFinalLabel.symbols
generatorTypeCheck1.symbols
generatorTypeCheck10.symbols
generatorTypeCheck11.symbols
generatorTypeCheck12.symbols
generatorTypeCheck13.symbols
generatorTypeCheck2.symbols
generatorTypeCheck3.symbols
globalThisTypeIndexAccess.symbols
implicitAnyDeclareFunctionWithoutFormalType2.symbols
iterableArrayPattern30.symbols
jsdocTypeGenericInstantiationAttempt.symbols
jsdocTypeReferenceToValue.symbols
libReferenceDeclarationEmit.symbols
libReferenceDeclarationEmitBundle.symbols
moduleResolution_automaticTypeDirectiveNames.symbols
nestedBlockScopedBindings11.symbols
nestedBlockScopedBindings9.symbols
noErrorUsingImportExportModuleAugmentationInDeclarationFile1.symbols
noUsedBeforeDefinedErrorInAmbientContext1.symbols
parenthesizedTypes.symbols
parseLinkTag.symbols
restParameterNoTypeAnnotation.symbols
spreadObjectWithIndexDoesNotAddUndefinedToLocalIndex.symbols
switchCaseWithIntersectionTypes01.symbols
taggedTemplateStringWithSymbolExpression01.symbols
targetTypeCalls.symbols
typeofStrictNull.symbols
unmatchedParameterPositions.symbols
verifyDefaultLib_dom.symbols
verifyDefaultLib_webworker.symbols
voidReturnLambdaValue.symbols

ts/babel

Test result main count This PR count Difference
Total 588 588 0
Passed 519 519 0
Failed 69 69 0
Panics 0 0 0
Coverage 88.27% 88.27% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16257 16257 0
Passed 12393 12393 0
Failed 3864 3864 0
Panics 0 0 0
Coverage 76.23% 76.23% 0.00%

@IWANABETHATGUY
Copy link
Contributor

Also I noticed that we have 178 regression here? Is that accetable?

@xunilrj
Copy link
Contributor Author

xunilrj commented Jun 17, 2022

Also I noticed that we have 178 regression here? Is that accetable?

No. Before the refactoring to please clippy it was actually passing more. Not sure what happened.

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jun 17, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c505334
Status: ✅  Deploy successful!
Preview URL: https://1b7600a4.tools-8rn.pages.dev
Branch Preview URL: https://feature-js-semantic-read-ref.tools-8rn.pages.dev

View logs

@xunilrj xunilrj temporarily deployed to aws June 17, 2022 12:19 Inactive
@xunilrj xunilrj temporarily deployed to aws June 17, 2022 12:45 Inactive
@xunilrj xunilrj force-pushed the feature/js-semantic-read-reference branch from f289d99 to a5465b2 Compare June 17, 2022 12:55
@xunilrj xunilrj temporarily deployed to aws June 17, 2022 12:55 Inactive
@xunilrj xunilrj temporarily deployed to aws June 17, 2022 13:11 Inactive
crates/rome_js_semantic/src/events.rs Show resolved Hide resolved
crates/rome_js_semantic/src/events.rs Outdated Show resolved Hide resolved
crates/rome_js_semantic/src/events.rs Show resolved Hide resolved
crates/rome_js_semantic/src/events.rs Show resolved Hide resolved
crates/rome_js_semantic/src/events.rs Outdated Show resolved Hide resolved
crates/rome_js_semantic/src/events.rs Show resolved Hide resolved
crates/rome_js_semantic/src/events.rs Show resolved Hide resolved
crates/rome_js_semantic/src/events.rs Show resolved Hide resolved
@xunilrj xunilrj temporarily deployed to aws June 17, 2022 18:12 Inactive
@xunilrj xunilrj merged commit cf4189c into main Jun 20, 2022
@xunilrj xunilrj deleted the feature/js-semantic-read-reference branch June 20, 2022 17:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants