- Fixed regexp logging issue.

- Removed use of std::set.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7529537f
......@@ -25,9 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define _HAS_EXCEPTIONS 0
#include <set>
#include "v8.h"
#include "ast.h"
......@@ -1587,7 +1584,6 @@ FOR_EACH_NODE_TYPE(DECLARE_VISIT)
bool ignore_case_;
HeapStringAllocator alloc_;
StringStream stream_;
std::set<RegExpNode*> seen_;
};
......@@ -1614,9 +1610,8 @@ void DotPrinter::PrintNode(const char* label, RegExpNode* node) {
void DotPrinter::Visit(RegExpNode* node) {
if (seen_.find(node) != seen_.end())
return;
seen_.insert(node);
if (node->info()->visited) return;
node->info()->visited = true;
node->Accept(this);
}
......
......@@ -467,7 +467,8 @@ struct NodeInfo {
at_end(false),
follows_word(UNKNOWN),
follows_newline(UNKNOWN),
follows_start(UNKNOWN) { }
follows_start(UNKNOWN),
visited(false) { }
// Returns true if the interests and assumptions of this node
// matches the given one.
......@@ -566,6 +567,8 @@ struct NodeInfo {
TriBool follows_word: 2;
TriBool follows_newline: 2;
TriBool follows_start: 2;
bool visited: 1;
};
......
......@@ -356,12 +356,14 @@ void Logger::LogString(Handle<String> str) {
len = 256;
for (int i = 0; i < len; i++) {
uc32 c = str->Get(shape, i);
if (c < 32 || (c > 126 && c <= 255)) {
fprintf(logfile_, "\\x%02x", c);
} else if (c > 255) {
if (c > 0xff) {
fprintf(logfile_, "\\u%04x", c);
} else if (c < 32 || c > 126) {
fprintf(logfile_, "\\x%02x", c);
} else if (c == ',') {
fprintf(logfile_, "\\,");
} else if (c == '\\') {
fprintf(logfile_, "\\\\");
} else {
fprintf(logfile_, "%lc", c);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment