core/vm: port GEVM performance optimisations #2143
Quality Gate failed
Failed conditions
1 Security Hotspot
3.4% Duplication on New Code (required ≤ 3%)
Annotations
Check failure on line 36 in core/vm/interpreter_dispatch.go
sonarqubecloud / SonarCloud Code Analysis
Refactor this method to reduce its Cognitive Complexity from 428 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLszr0W7c9DDrRz&open=AZz7UQLszr0W7c9DDrRz&pullRequest=2143
Check warning on line 4 in core/vm/dispatch_bench_test.go
sonarqubecloud / SonarCloud Code Analysis
Add a comment explaining why this blank import is needed.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLzzr0W7c9DDrR2&open=AZz7UQLzzr0W7c9DDrR2&pullRequest=2143
Check failure on line 127 in core/vm/stack_test.go
sonarqubecloud / SonarCloud Code Analysis
Refactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLDzr0W7c9DDrRu&open=AZz7UQLDzr0W7c9DDrRu&pullRequest=2143
Check failure on line 321 in core/vm/gen_dispatch/main.go
sonarqubecloud / SonarCloud Code Analysis
Define a constant instead of duplicating this literal "return nil, &ErrStackOverflow{stackLen: stack.top, limit: 1024}\n" 4 times.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLhzr0W7c9DDrRw&open=AZz7UQLhzr0W7c9DDrRw&pullRequest=2143
Check failure on line 320 in core/vm/gen_dispatch/main.go
sonarqubecloud / SonarCloud Code Analysis
Define a constant instead of duplicating this literal "if stack.top >= 1024 {\n" 3 times.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLhzr0W7c9DDrRx&open=AZz7UQLhzr0W7c9DDrRx&pullRequest=2143
Check failure on line 57 in core/vm/dispatch_bench_test.go
sonarqubecloud / SonarCloud Code Analysis
Add a nested comment explaining why this function is empty or complete the implementation.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLzzr0W7c9DDrR1&open=AZz7UQLzzr0W7c9DDrR1&pullRequest=2143
Check warning on line 329 in core/vm/gen_dispatch/main.go
sonarqubecloud / SonarCloud Code Analysis
This branch's code block is the same as the block for the branch on line 307.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLhzr0W7c9DDrRy&open=AZz7UQLhzr0W7c9DDrRy&pullRequest=2143
Check warning on line 60 in core/vm/interpreter_dispatch.go
sonarqubecloud / SonarCloud Code Analysis
Reduce the number of switch branches from 71 to at most 30.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQLszr0W7c9DDrR0&open=AZz7UQLszr0W7c9DDrR0&pullRequest=2143
Check failure on line 182 in core/vm/dispatch_test.go
sonarqubecloud / SonarCloud Code Analysis
Add a nested comment explaining why this function is empty or complete the implementation.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQEqzr0W7c9DDrRr&open=AZz7UQEqzr0W7c9DDrRr&pullRequest=2143
Check failure on line 282 in core/vm/dispatch_test.go
sonarqubecloud / SonarCloud Code Analysis
Refactor this method to reduce its Cognitive Complexity from 32 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=0xPolygon_bor&issues=AZz7UQEqzr0W7c9DDrRs&open=AZz7UQEqzr0W7c9DDrRs&pullRequest=2143