diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-12-25 20:51:46 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-12-25 20:51:46 -0800 |
commit | 025d25c187f2daf9bb507b72ab85db47904af977 (patch) | |
tree | 5cb052284513e54d767ebefbcd92090b73201df2 /src/library.js | |
parent | 2f8f8a72fffffdd2b9f4114c0d7e7d8bc941c1d2 (diff) |
comments + clean up compiler.js
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index 0d5f2c22..2675b38b 100644 --- a/src/library.js +++ b/src/library.js @@ -1,3 +1,17 @@ +// An implementation of a libc for the web. Basically, implementations of +// the various standard C libraries, that can be called from compiled code, +// and work using the actual JavaScript environment. +// +// We search the Library object when there is an external function. If the +// entry in the Library is a function, we insert it. If it is a string, we +// do another lookup in the library (a simple way to write a function once, +// if it can be called by different names). We also allow dependencies, +// using __deps. +// +// Note that the full function name will be '_' + the name in the Library +// object. For convenience, the short name appears here. Note that if you add a +// new function with an '_', it will not be found. + var Library = { // stdio.h |