| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/log.h" | 5 #include "src/log.h" |
| 6 | 6 |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 default: | 960 default: |
| 961 break; | 961 break; |
| 962 } | 962 } |
| 963 msg->Append('/'); | 963 msg->Append('/'); |
| 964 msg->AppendDetailed(*Handle<String>::cast(source), false); | 964 msg->AppendDetailed(*Handle<String>::cast(source), false); |
| 965 msg->Append('/'); | 965 msg->Append('/'); |
| 966 | 966 |
| 967 // global flag | 967 // global flag |
| 968 Handle<Object> global = | 968 Handle<Object> global = |
| 969 JSReceiver::GetProperty(isolate, regexp, "global").ToHandleChecked(); | 969 JSReceiver::GetProperty(isolate, regexp, "global").ToHandleChecked(); |
| 970 if (global->IsTrue(isolate)) { | 970 if (global->IsTrue()) { |
| 971 msg->Append('g'); | 971 msg->Append('g'); |
| 972 } | 972 } |
| 973 // ignorecase flag | 973 // ignorecase flag |
| 974 Handle<Object> ignorecase = | 974 Handle<Object> ignorecase = |
| 975 JSReceiver::GetProperty(isolate, regexp, "ignoreCase").ToHandleChecked(); | 975 JSReceiver::GetProperty(isolate, regexp, "ignoreCase").ToHandleChecked(); |
| 976 if (ignorecase->IsTrue(isolate)) { | 976 if (ignorecase->IsTrue()) { |
| 977 msg->Append('i'); | 977 msg->Append('i'); |
| 978 } | 978 } |
| 979 // multiline flag | 979 // multiline flag |
| 980 Handle<Object> multiline = | 980 Handle<Object> multiline = |
| 981 JSReceiver::GetProperty(isolate, regexp, "multiline").ToHandleChecked(); | 981 JSReceiver::GetProperty(isolate, regexp, "multiline").ToHandleChecked(); |
| 982 if (multiline->IsTrue(isolate)) { | 982 if (multiline->IsTrue()) { |
| 983 msg->Append('m'); | 983 msg->Append('m'); |
| 984 } | 984 } |
| 985 } | 985 } |
| 986 } // namespace | 986 } // namespace |
| 987 | 987 |
| 988 | 988 |
| 989 void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) { | 989 void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) { |
| 990 if (!log_->IsEnabled() || !FLAG_log_regexp) return; | 990 if (!log_->IsEnabled() || !FLAG_log_regexp) return; |
| 991 Log::MessageBuilder msg(log_); | 991 Log::MessageBuilder msg(log_); |
| 992 msg.Append("regexp-compile,"); | 992 msg.Append("regexp-compile,"); |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1908 removeCodeEventListener(jit_logger_); | 1908 removeCodeEventListener(jit_logger_); |
| 1909 delete jit_logger_; | 1909 delete jit_logger_; |
| 1910 jit_logger_ = NULL; | 1910 jit_logger_ = NULL; |
| 1911 } | 1911 } |
| 1912 | 1912 |
| 1913 return log_->Close(); | 1913 return log_->Close(); |
| 1914 } | 1914 } |
| 1915 | 1915 |
| 1916 } // namespace internal | 1916 } // namespace internal |
| 1917 } // namespace v8 | 1917 } // namespace v8 |
| OLD | NEW |