Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Lazy[T], Documentation changes, etc #82

Closed
wants to merge 4 commits into from
Closed

Implemented Lazy[T], Documentation changes, etc #82

wants to merge 4 commits into from

Conversation

AzureKitsune
Copy link
Contributor

  • Implemented Lazy[T] in lazy.nim
  • Documentation changes to events.nim

* Also added 'containsHandler' to events.nim

I don't know why the koch changes are included in this though.

@Araq Araq closed this Dec 31, 2011
krux02 pushed a commit to krux02/Nim that referenced this pull request Jan 11, 2022
82: compiler analysis tracing debugutils r=haxscramper a=saem

This should easy testing and allow people to learn how the compiler does
things by applying tracing to sections of code. A rather clever usage is to
apply this to various parts of the test spec.


- use `addInNimDebugUtils` or create a specialized one for a proc you
  want to trace
- use `nimCompilderDebugRegion` along with the `nimDebugUtils` define
  in order to get traces for regions of code
- learn how the compiler does things... or doesn't as the case maybe

system has a template `nimCompilerDebugRegion` which is available when
compiling with `nimDebugUtils` defined. use this template as a block
and all code under it will then emit debug trace output from semExpr
and a number of other key procs within the compiler.

spam is kept to the point by creating delta stacktraces and nested
(indented) rendering of messages is used to convey the recursive nature
of this process.

the tracing facility is templatized and can be extended to add output
for additional situations if the present hooks do not suffice.

as part of this work the debugutils module was heavily gutted as it was
overwraught. there was an extension made to the compiler config to track
a small seq for delta stacktrace and output indentation tracking.

backstory:
- started with existing debugutils module, but it was over engineered
- removed most of the code and instead have a template to inject tracing

Future improvements:

- messages themselves need some love
- more things need traces

Co-authored-by: Saem Ghani <saemghani+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants