Chromium Code Reviews| Index: src/log.cc |
| diff --git a/src/log.cc b/src/log.cc |
| index be76b96e1bdec0a1aadca616e9cadb7023923a7c..1b5e500d956db39454ed001b897e97a581ab91a4 100644 |
| --- a/src/log.cc |
| +++ b/src/log.cc |
| @@ -377,14 +377,12 @@ void Logger::LogRegExpSource(Handle<JSRegExp> regexp) { |
| return; |
| } |
| - if (regexp->type()->IsSmi()) { |
| - switch (regexp->type_tag()) { |
| - case JSRegExp::ATOM: |
| - fprintf(logfile_, "a"); |
| - break; |
| - default: |
| - break; |
| - } |
| + switch (regexp->TypeTag()) { |
| + case JSRegExp::ATOM: |
|
Kasper Lund
2008/10/24 06:42:50
Fix switch indentation. The cases should be indent
|
| + fprintf(logfile_, "a"); |
| + break; |
| + default: |
| + break; |
| } |
| fprintf(logfile_, "/"); |
| LogString(Handle<String>::cast(source)); |
| @@ -409,14 +407,14 @@ void Logger::LogRegExpSource(Handle<JSRegExp> regexp) { |
| #endif // ENABLE_LOGGING_AND_PROFILING |
| -void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp) { |
| +void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) { |
| #ifdef ENABLE_LOGGING_AND_PROFILING |
| if (logfile_ == NULL || !FLAG_log_regexp) return; |
| ScopedLock sl(mutex_); |
| fprintf(logfile_, "regexp-compile,"); |
| LogRegExpSource(regexp); |
| - fprintf(logfile_, "\n"); |
| + fprintf(logfile_, in_cache ? ",hit\n" : ",miss\n"); |
| #endif |
| } |