[cfe-commits] r39130 - in /cfe/cfe/trunk: NOTES.txt README.txt

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:27:50 PDT 2007


Author: sabre
Date: Wed Jul 11 11:27:50 2007
New Revision: 39130

URL: http://llvm.org/viewvc/llvm-project?rev=39130&view=rev
Log:
move some content around to make README more focused

Modified:
    cfe/cfe/trunk/NOTES.txt
    cfe/cfe/trunk/README.txt

Modified: cfe/cfe/trunk/NOTES.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/NOTES.txt?rev=39130&r1=39129&r2=39130&view=diff

==============================================================================
--- cfe/cfe/trunk/NOTES.txt (original)
+++ cfe/cfe/trunk/NOTES.txt Wed Jul 11 11:27:50 2007
@@ -31,13 +31,85 @@
 
 //===---------------------------------------------------------------------===//
 
-Interesting fact:
-  clang -Eonly INPUTS/carbon-header-C-E.c
+TODO: File Manager Speedup:
+
+ We currently do a lot of stat'ing for files that don't exist, particularly
+ when lots of -I paths exist (e.g. see the <iostream> example, check for
+ failures in stat in FileManager::getFile).  It would be far better to make
+ the following changes:
+   1. FileEntry contains a sys::Path instead of a std::string for Name.
+   2. sys::Path contains timestamp and size, lazily computed.  Eliminate from
+      FileEntry.
+   3. File UIDs are created on request, not when files are opened.
+ These changes make it possible to efficiently have FileEntry objects for
+ files that exist on the file system, but have not been used yet.
+ 
+ Once this is done:
+   1. DirectoryEntry gets a boolean value "has read entries".  When false, not
+      all entries in the directory are in the file mgr, when true, they are.
+   2. Instead of stat'ing the file in FileManager::getFile, check to see if 
+      the dir has been read.  If so, fail immediately, if not, read the dir,
+      then retry.
+   3. Reading the dir uses the getdirentries syscall, creating an FileEntry
+      for all files found.
+
+//===---------------------------------------------------------------------===//
+
+TODO: Fast #Import:
+
+ * Get frameworks that don't use #import to do so, e.g. 
+   DirectoryService, AudioToolbox, CoreFoundation, etc.  Why not using #import?
+   Because they work in C mode? C has #import.
+ * Have the lexer return a token for #import instead of handling it itself.
+   - Create a new preprocessor object with no external state (no -D/U options
+     from the command line, etc).  Alternatively, keep track of exactly which
+     external state is used by a #import: declare it somehow.
+ * When having reading a #import file, keep track of whether we have (and/or
+   which) seen any "configuration" macros.  Various cases:
+   - Uses of target args (__POWERPC__, __i386): Header has to be parsed 
+     multiple times, per-target.  What about #ifndef checks?  How do we know?
+   - "Configuration" preprocessor macros not defined: POWERPC, etc.  What about
+     things like __STDC__ etc?  What is and what isn't allowed.
+ * Special handling for "umbrella" headers, which just contain #import stmts:
+   - Cocoa.h/AppKit.h - Contain pointers to digests instead of entire digests
+     themselves?  Foundation.h isn't pure umbrella!
+ * Frameworks digests:
+   - Can put "digest" of a framework-worth of headers into the framework
+     itself.  To open AppKit, just mmap
+     /System/Library/Frameworks/AppKit.framework/"digest", which provides a
+     symbol table in a well defined format.  Lazily unstream stuff that is
+     needed.  Contains declarations, macros, and debug information.
+   - System frameworks ship with digests.  How do we handle configuration
+     information?  How do we handle stuff like:
+       #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
+     which guards a bunch of decls?  Should there be a couple of default
+     configs, then have the UI fall back to building/caching its own?
+   - GUI automatically builds digests when UI is idle, both of system
+     frameworks if they aren't not available in the right config, and of app
+     frameworks.
+   - GUI builds dependence graph of frameworks/digests based on #imports.  If a
+     digest is out date, dependent digests are automatically invalidated.
+
+ * New constraints on #import for objc-v3:
+   - #imported file must not define non-inline function bodies.
+     - Alternatively, they can, and these bodies get compiled/linked *once*
+       per app into a dylib.  What about building user dylibs?
+   - Restrictions on ObjC grammar: can't #import the body of a for stmt or fn.
+   - Compiler must detect and reject these cases.
+   - #defines defined within a #import have two behaviors:
+     - By default, they escape the header.  These macros *cannot* be #undef'd
+       by other code: this is enforced by the front-end.
+     - Optionally, user can specify what macros escape (whitelist) or can use
+       #undef.
+
+//===---------------------------------------------------------------------===//
+
+TODO: New language feature: Configuration queries:
+  - Instead of #ifdef __POWERPC__, use "if (strcmp(`cpu`, __POWERPC__))", or
+    some other, better, syntax.
+  - Use it to increase the number of "architecture-clean" #import'd files,
+    allowing a single index to be used for all fat slices.
 
-is much faster than:
-  wc -w INPUTS/carbon-header-C-E.c
-!!
-   
 //===---------------------------------------------------------------------===//
 
 The 'portability' model in clang is sufficient to catch translation units (or

Modified: cfe/cfe/trunk/README.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/README.txt?rev=39130&r1=39129&r2=39130&view=diff

==============================================================================
--- cfe/cfe/trunk/README.txt (original)
+++ cfe/cfe/trunk/README.txt Wed Jul 11 11:27:50 2007
@@ -115,25 +115,7 @@
  * Include search paths are hard-coded into the driver.
 
 File Manager:
- * We currently do a lot of stat'ing for files that don't exist, particularly
-   when lots of -I paths exist (e.g. see the <iostream> example, check for
-   failures in stat in FileManager::getFile).  It would be far better to make
-   the following changes:
-     1. FileEntry contains a sys::Path instead of a std::string for Name.
-     2. sys::Path contains timestamp and size, lazily computed.  Eliminate from
-        FileEntry.
-     3. File UIDs are created on request, not when files are opened.
-   These changes make it possible to efficiently have FileEntry objects for
-   files that exist on the file system, but have not been used yet.
-   
-   Once this is done:
-     1. DirectoryEntry gets a boolean value "has read entries".  When false, not
-        all entries in the directory are in the file mgr, when true, they are.
-     2. Instead of stat'ing the file in FileManager::getFile, check to see if 
-        the dir has been read.  If so, fail immediately, if not, read the dir,
-        then retry.
-     3. Reading the dir uses the getdirentries syscall, creating an FileEntry
-        for all files found.
+ * Reduce syscalls, see NOTES.txt.
 
 Lexer:
  * Source character mapping.  GCC supports ASCII and UTF-8.
@@ -149,6 +131,7 @@
  * MSExtension: "L#param" stringizes to a wide string literal.
  * Consider merging the parser's expression parser into the preprocessor to
    eliminate duplicate code.
+ * Add support for -M*
 
 Traditional Preprocessor:
  * All.
@@ -161,6 +144,7 @@
 
 Parser Actions:
  * All that are missing.
+ * SemaActions vs MinimalActions.
  * Would like to either lazily resolve types [refactoring] or aggressively
    resolve them [c compiler].  Need to know whether something is a type or not
    to compile, but don't need to know what it is.
@@ -169,70 +153,4 @@
 AST Builder:
  * Implement more nodes as actions are available.
  * Types.
- * Allow the AST Builder to be subclassed.  This will allow clients to extend it
-   and create their own specialized nodes for specific scenarios.  Maybe the
-   "full loc info" use case is just one extension.
-
-Fast #Import:
- * All.
- * Get frameworks that don't use #import to do so, e.g. 
-   DirectoryService, AudioToolbox, CoreFoundation, etc.  Why not using #import?
-   Because they work in C mode? C has #import.
- * Have the lexer return a token for #import instead of handling it itself.
-   - Create a new preprocessor object with no external state (no -D/U options
-     from the command line, etc).  Alternatively, keep track of exactly which
-     external state is used by a #import: declare it somehow.
- * When having reading a #import file, keep track of whether we have (and/or
-   which) seen any "configuration" macros.  Various cases:
-   - Uses of target args (__POWERPC__, __i386): Header has to be parsed 
-     multiple times, per-target.  What about #ifndef checks?  How do we know?
-   - "Configuration" preprocessor macros not defined: POWERPC, etc.  What about
-     things like __STDC__ etc?  What is and what isn't allowed.
- * Special handling for "umbrella" headers, which just contain #import stmts:
-   - Cocoa.h/AppKit.h - Contain pointers to digests instead of entire digests
-     themselves?  Foundation.h isn't pure umbrella!
- * Frameworks digests:
-   - Can put "digest" of a framework-worth of headers into the framework
-     itself.  To open AppKit, just mmap
-     /System/Library/Frameworks/AppKit.framework/"digest", which provides a
-     symbol table in a well defined format.  Lazily unstream stuff that is
-     needed.  Contains declarations, macros, and debug information.
-   - System frameworks ship with digests.  How do we handle configuration
-     information?  How do we handle stuff like:
-       #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
-     which guards a bunch of decls?  Should there be a couple of default
-     configs, then have the UI fall back to building/caching its own?
-   - GUI automatically builds digests when UI is idle, both of system
-     frameworks if they aren't not available in the right config, and of app
-     frameworks.
-   - GUI builds dependence graph of frameworks/digests based on #imports.  If a
-     digest is out date, dependent digests are automatically invalidated.
-
- * New constraints on #import for objc-v3:
-   - #imported file must not define non-inline function bodies.
-     - Alternatively, they can, and these bodies get compiled/linked *once*
-       per app into a dylib.  What about building user dylibs?
-   - Restrictions on ObjC grammar: can't #import the body of a for stmt or fn.
-   - Compiler must detect and reject these cases.
-   - #defines defined within a #import have two behaviors:
-     - By default, they escape the header.  These macros *cannot* be #undef'd
-       by other code: this is enforced by the front-end.
-     - Optionally, user can specify what macros escape (whitelist) or can use
-       #undef.
-
-New language feature: Configuration queries:
-  - Instead of #ifdef __POWERPC__, use "if (strcmp(`cpu`, __POWERPC__))", or
-    some other, better, syntax.
-  - Use it to increase the number of "architecture-clean" #import'd files,
-    allowing a single index to be used for all fat slices.
-
-Cocoa GUI Front-end:
- * All.
- * Start with very simple "textedit" GUI.
- * Trivial project model: list of files, list of cmd line options.
- * Build simple developer examples.
- * Tight integration with compiler components.
- * Primary advantage: batch compiles, keeping digests in memory, dependency mgmt
-   between app frameworks, building code/digests in the background, etc.
- * Interesting idea: http://nickgravgaard.com/elastictabstops/
- 
+ * Decls.





More information about the cfe-commits mailing list