Commit Graph

634 Commits

Author SHA1 Message Date
Chris Lattner cbb6bad435 move the DeltaTree implementation out of line, remove debugging printfs etc.
llvm-svn: 49591
2008-04-12 22:00:40 +00:00
Chris Lattner 0c8d17fc43 remove ifdefs
llvm-svn: 49587
2008-04-12 20:34:05 +00:00
Chris Lattner d154731131 Do an initial hack at replacing one of the incredibly inefficient
(but simple!) datastructures in the rewriter with a more complex but
more efficient one.

This replaces the Deltas vector with a specialized BTree that makes
delta lookups much more efficient.  This speeds up -emit-html on a 500K
.i file from 157.154 to 27.127 seconds on my machine (5.8x).

While this code is functional, it isn't very pretty, I have much 
refactoring planned for it, and will remove the USE_VECTOR ifdef.
Stay tuned.

llvm-svn: 49586
2008-04-12 20:28:24 +00:00
Ted Kremenek f17d5758fc Micro-optimization: Don't use ostringstream when using a C-string literal
will work just fine.

llvm-svn: 49427
2008-04-09 15:40:40 +00:00
Ted Kremenek 5f7ece0bff Don't expand tabs in EscapeText, but rather expand them when writing out
the HTML file.  This should reduce the amount of memory pressure on the
rewriter for files that have a lot of tabs.

llvm-svn: 49406
2008-04-08 22:37:58 +00:00
Ted Kremenek b1f773ca98 When substituting tabs during HTMLification, only add " " when we are
"escaping" spaces.

llvm-svn: 49404
2008-04-08 22:28:15 +00:00
Ted Kremenek a9077ab6b7 Add ids for line numbers, allowing us to jump to arbitrary line numbers within
an HTMLified source file.

llvm-svn: 49359
2008-04-07 23:53:30 +00:00
Ted Kremenek bd1bd88423 Tweak message bubble color (gold)
llvm-svn: 49357
2008-04-07 23:43:44 +00:00
Chris Lattner e8e1e1131d fix css font name, patch by Cédric Venet
llvm-svn: 49260
2008-04-06 04:37:21 +00:00
Ted Kremenek c599179267 Some cleanups in EscapeText and AddLineNumbers. Still investigating performance
issues.

llvm-svn: 49150
2008-04-03 07:12:29 +00:00
Ted Kremenek 84041843af CSS tweaking on blue boxes.
llvm-svn: 49121
2008-04-02 22:50:50 +00:00
Ted Kremenek ab2a52c4bf Blue diagnostic boxes.
llvm-svn: 49117
2008-04-02 21:14:04 +00:00
Ted Kremenek 258493c188 Added path sequence numbers in HTML output of PathDiagnostics.
llvm-svn: 49116
2008-04-02 21:04:20 +00:00
Ted Kremenek 3bcfc6edc0 Better handling for tabs with message bubbles.
llvm-svn: 49001
2008-03-31 23:14:05 +00:00
Ted Kremenek 64b95a024e Minor CSS tweaking (smaller h1 tags).
Bug fix in EscapeText (for std::string) where spaces were not properly emitted.

llvm-svn: 48889
2008-03-27 17:28:58 +00:00
Ted Kremenek 561dfe3153 Add html::EscapeText for std::string; use this function to escape text in message bubbles.
llvm-svn: 48884
2008-03-27 17:15:29 +00:00
Ted Kremenek 8cc4842a76 Added <h3> tag in HTML file output that contains the name of the source file.
llvm-svn: 48869
2008-03-27 07:35:49 +00:00
Ted Kremenek b2f4d3138f Minor CSS tweaking: use webkit style CSS properties for shadows/rounded edges
for message bubbles.

llvm-svn: 48754
2008-03-24 23:38:32 +00:00
Ted Kremenek bc24962566 Added HTML highlighting for ranges.
llvm-svn: 48572
2008-03-19 23:55:53 +00:00
Ted Kremenek 161d16e083 Change colors of HTML message bubble.
llvm-svn: 48563
2008-03-19 22:44:21 +00:00
Ted Kremenek 7ee6a1474f More CSS enhancements to HTML code printing.
llvm-svn: 48557
2008-03-19 22:06:25 +00:00
Ted Kremenek 1651b7cd2d Misc. cleanups to HTML printing: make code rendered using tables; add
better div positioning for messages.

llvm-svn: 48555
2008-03-19 21:59:05 +00:00
Ted Kremenek 216624ce58 Initial experimentation with adding boxed "annotations" to HTMLized source.
llvm-svn: 48540
2008-03-19 07:53:42 +00:00
Ted Kremenek 966da4acc3 Moved generation of html header/footer with builtin CSS to the rewriter library.
llvm-svn: 48537
2008-03-19 06:14:37 +00:00
Ted Kremenek 3f8392626b More cleanups to the HTML rewriter (with line formatting), with better
pretty-printing of line numbers.

llvm-svn: 48533
2008-03-19 05:07:26 +00:00
Ted Kremenek 54d62b6d64 Change "style" to "class" in HTML output.
llvm-svn: 48525
2008-03-19 01:44:27 +00:00
Ted Kremenek 5ddff02861 More cleanups to HTML rewriter API: remove the InsertTag method; was too complicated
and clients can achieve a cleaner design just by inserting tags directly.  Reserve
the "html" namespace for meta-level operations (e.g., escaping text, etc.)

llvm-svn: 48524
2008-03-19 01:30:02 +00:00
Ted Kremenek 8800ae68a0 More HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.
llvm-svn: 48518
2008-03-18 23:55:46 +00:00
Ted Kremenek 5792cebb08 Some cleanups to the HTMLRewrite API. Added support for printing out line
numbers (more work to be done on aesthetics).

llvm-svn: 48512
2008-03-18 23:08:51 +00:00
Ted Kremenek 1b580f98aa Modified "InsertTag" (HTML rewriter) to have an optional "OutermostTag" flag to
indicate whether or not the new tag should be the outermost tag at the specified
location (in the case that other tags have been inserted at the same spot).

llvm-svn: 48506
2008-03-18 21:26:34 +00:00
Ted Kremenek 7dcc82220e Added the beginning of a set of rewriter functions for pretty-printing source
code as HTML.  Added a new driver option "--emit-html" to dump the source
of the main input file as HTML.

llvm-svn: 48505
2008-03-18 21:19:49 +00:00
Ted Kremenek 45467ef372 Added variant of "InsertText" in the Rewriter to support inserting text both
*before* and after a specific location.

llvm-svn: 48504
2008-03-18 21:17:59 +00:00
Ted Kremenek af5b820af3 Bug fix in RewriteBuffer::getMappedOffset: potentially multiple deltas
need to be skipped over when AfterInserts == true, as multiple deltas
may share the same FileLoc.

llvm-svn: 48503
2008-03-18 21:00:57 +00:00
Chris Lattner 7a51313d8a Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.

llvm-svn: 48402
2008-03-15 23:59:48 +00:00