Ensure cadence don't access unexpected operations while parsing (part 3)#3359
Ensure cadence don't access unexpected operations while parsing (part 3)#3359
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3359 +/- ##
==========================================
+ Coverage 55.00% 55.02% +0.02%
==========================================
Files 734 694 -40
Lines 67341 65398 -1943
==========================================
- Hits 37040 35985 -1055
+ Misses 27264 26412 -852
+ Partials 3037 3001 -36
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
FVM Benchstat comparisonThis branch with compared with the base branch onflow:master commit 4cd3c83 The command Collapsed results for better readability
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2f77bd3 to
0deefba
Compare
| } | ||
|
|
||
| return callback(arg) | ||
| } |
There was a problem hiding this comment.
iirc golang does not have plan to support generic variadic functions. i'm thinking combining https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source and "text/template" may save us some typing here. but just for entertainment purposes, it is too hacky for production.
There was a problem hiding this comment.
not supporting adhoc (i.e., overloading / variadic) polymorphism is the correct thing to do from the language designer's perspective. unlike parametric polymorphism, there's no solid theoretical foundation for adhoc polymorphism.
There was a problem hiding this comment.
this is why i hate C++ ;)
0deefba to
6e6782f
Compare
|
bors merge |
janezpodhostnik
left a comment
There was a problem hiding this comment.
Hmmm... It might be time to unify opCode, SpanName and common.ComputationKind and use a operation wrapper like the parseRestricted to not only check for IsParseRestricted but also do:
defer info.tracer.StartSpanFromRoot(opCode).End()
err := info.meter.MeterComputation(opCode, intensity())
|
yeah, that's reasonable. |
|
+1
|
No description provided.