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

无法同时处理多个文件 #18

Open
huangguiyang opened this issue Nov 30, 2016 · 8 comments
Open

无法同时处理多个文件 #18

huangguiyang opened this issue Nov 30, 2016 · 8 comments

Comments

@huangguiyang
Copy link

for example:
wgtcc -S 1.c 2.c

@wgtdkp
Copy link
Owner

wgtdkp commented Nov 30, 2016

yes, it is. Once upon a time, it supported multiple files. I disabled it(the code is simplified also) for convenience of debugging, i will reenable it later.

(ps: we better in English because i occasionally found that there are some foreigners looking at this repo :)

There is another friend that is working on an interesting compiler project https://github.com/thinkermao/LL-Script, a small interpreted language.

@huangguiyang
Copy link
Author

wgtcc是单进程程序吧?而且遇到错误就退出了,因此是如何支持处理多个文件的呢?第一个文件语法错误导致进程退出,这样第二个文件不就没被处理了么?

@wgtdkp
Copy link
Owner

wgtdkp commented Dec 1, 2016

A single source file is a translation unit.Which means we could fork(),so every child process handle a source file :)

@huangguiyang
Copy link
Author

huangguiyang commented Dec 1, 2016

这样不好迁移到windows了,因为windows创建子进程要用文件,如果用一个函数的话,只能通过windows的POSIX子系统,然而这个子系统已经不维护了 :)
最开始我为了简单起见,也是单个二进制+fork,迁移到windows发现不大好了

@huangguiyang
Copy link
Author

We'd better talk in QQ. Can you send your QQ to my email? Thx.

@wgtdkp
Copy link
Owner

wgtdkp commented Dec 1, 2016

Yeah, my pleasure~~

@wgtdkp
Copy link
Owner

wgtdkp commented Dec 1, 2016

But, where do i get your email? :)

@huangguiyang
Copy link
Author

I've updated my github profile :->

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

No branches or pull requests

2 participants