forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit static funcs instead of C++ lambdas
Summary: In a production compiler, every function would probably be compiled into IR separately, and there would be no need to match compilation order with output order. Approximate this model by maintaining multiple text buffers: one for the file, one for main(), and one per emitted function. These buffers (except the file one) can then be written out in any order. Remove the unnecessary template from Compiler and use Box<dyn Write> instead. Reviewed By: avp Differential Revision: D37260945 fbshipit-source-id: 7d1d565b22c732bee4e44543177769388944b468
- Loading branch information
1 parent
0dc6ff3
commit fa0dfdb
Showing
1 changed file
with
115 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters