Commit Graph
14 Commits
Author SHA1 Message Date
Jon Meow ffa4e76ede Add underscores to private data members (#898)
This is the last PR I plan to have focused on #720
2021-10-19 14:27:10 -07:00
Jon MeowandGeoff Romer 9007bfcb88 Run clang-tidy on the interpreter directory (#885)
`// NOLINT` is added on type aliases in stack.h and dictionary.h to allow lower_snake_case naming -- this didn't feel like a check worth disabling in spite of false positives.

Co-authored-by: Geoff Romer <gromer@google.com>
2021-10-15 08:54:53 -07:00
Jon Meow 47325be112 Switch interpreter Stacks to Ptr (#763)
This also eliminates the ctad wrapper for Stack: I think the leaning is to remove it. It felt worth keeping the constructor because constructing with a single element is a common use-case.

Adds a single-argument constructor for Scope because the `std::list<std::string>()` is common, and eliding it is consistent with what we've done for things like tuples.

I was considering a vector constructor due to the double-Push on line 1139, but thought the Push() semantics may mean that it's better not to provide.
2021-08-19 11:34:03 -07:00
Jon Meow 50cfda0e1c Split Stack and Dictionary, moving ListNode into Dictionary (#757)
I think Stack used to use ListNode, but you'd previously removed that dependency. This finalizes the split, and merges ListNode so that we don't accidentally accrue more dependencies. In part I think we'll eventually want to change how Dictionary is set up.
2021-08-18 14:05:14 -07:00
Geoff Romer d4ed6b1083 Enable some additional warnings. (#675) 2021-07-26 11:42:38 -07:00
Geoff Romer 08a2d44570 Simplify the API and implementation of Stack (#667) 2021-07-20 14:27:41 -07:00
Jon Meow 1ddb1a264a Restructure CHECK to provide a stream (#660) 2021-07-20 11:52:24 -07:00
Geoff Romer 69b4b0086f Fix infinite recursion in PrintList. (#642)
Also make `Stack`'s single-argument constructor explicit, which would have helped catch this at compile time.
2021-07-13 09:57:22 -07:00
Jon Meow 6c259dd5de Switch from assert to a CHECK macro to run in all build modes. (#595) 2021-06-24 12:32:01 -07:00
Geoff RomerandDave Abrahams 98a6477233 Change Doxygen-style /// comments to // (see https://google.github.io/styleguide/cppguide.html#Comment_Style) (#330)
Co-authored-by: Dave Abrahams <dabrahams@google.com>
2021-04-05 10:11:48 -07:00
Jeremy G. Siek cd18e24176 Create a Dictionary abstraction over the raw Cons list. (#327)
* Create a Dictionary abstraction over the raw Cons list.

* renamed Cons and some methods of Dictionary, various other cleanup
2021-03-03 13:03:23 -05:00
Dave Abrahams f5300a84e5 Revert "improve abstraction for AssocList, fix bug in optional else (#315)" (#320)
This reverts commit bf6bb800c4.
2021-03-01 12:26:56 -05:00
Jeremy G. Siek bf6bb800c4 improve abstraction for AssocList, fix bug in optional else (#315)
* improve abstraction for AssocList, fix bug in optional else

* add flag for tracing output, clean up code for output

* turned off tracing by default, updated goldens, removed two examples that use pointers, shouldn't have been there yet
2021-03-01 10:00:02 -05:00
Dave Abrahams 29a59944fa Executable Semantics: 1st-class stacks (#296)
Replaces low-level uses of `Cons` with a first-class `Stack` data structure.  Also removes an unused algorithm.
Co-authored-by: Jeremy Siek <jsiek@indiana.edu>

Possible next step: use `std::stack` instead.
2021-02-26 09:46:32 -08:00