| 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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 default: | 961 default: |
| 962 break; | 962 break; |
| 963 } | 963 } |
| 964 msg->Append('/'); | 964 msg->Append('/'); |
| 965 msg->AppendDetailed(*Handle<String>::cast(source), false); | 965 msg->AppendDetailed(*Handle<String>::cast(source), false); |
| 966 msg->Append('/'); | 966 msg->Append('/'); |
| 967 | 967 |
| 968 // global flag | 968 // global flag |
| 969 Handle<Object> global = | 969 Handle<Object> global = |
| 970 JSReceiver::GetProperty(isolate, regexp, "global").ToHandleChecked(); | 970 JSReceiver::GetProperty(isolate, regexp, "global").ToHandleChecked(); |
| 971 if (global->IsTrue()) { | 971 if (global->IsTrue(isolate)) { |
| 972 msg->Append('g'); | 972 msg->Append('g'); |
| 973 } | 973 } |
| 974 // ignorecase flag | 974 // ignorecase flag |
| 975 Handle<Object> ignorecase = | 975 Handle<Object> ignorecase = |
| 976 JSReceiver::GetProperty(isolate, regexp, "ignoreCase").ToHandleChecked(); | 976 JSReceiver::GetProperty(isolate, regexp, "ignoreCase").ToHandleChecked(); |
| 977 if (ignorecase->IsTrue()) { | 977 if (ignorecase->IsTrue(isolate)) { |
| 978 msg->Append('i'); | 978 msg->Append('i'); |
| 979 } | 979 } |
| 980 // multiline flag | 980 // multiline flag |
| 981 Handle<Object> multiline = | 981 Handle<Object> multiline = |
| 982 JSReceiver::GetProperty(isolate, regexp, "multiline").ToHandleChecked(); | 982 JSReceiver::GetProperty(isolate, regexp, "multiline").ToHandleChecked(); |
| 983 if (multiline->IsTrue()) { | 983 if (multiline->IsTrue(isolate)) { |
| 984 msg->Append('m'); | 984 msg->Append('m'); |
| 985 } | 985 } |
| 986 } | 986 } |
| 987 } // namespace | 987 } // namespace |
| 988 | 988 |
| 989 | 989 |
| 990 void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) { | 990 void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) { |
| 991 if (!log_->IsEnabled() || !FLAG_log_regexp) return; | 991 if (!log_->IsEnabled() || !FLAG_log_regexp) return; |
| 992 Log::MessageBuilder msg(log_); | 992 Log::MessageBuilder msg(log_); |
| 993 msg.Append("regexp-compile,"); | 993 msg.Append("regexp-compile,"); |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 removeCodeEventListener(jit_logger_); | 1895 removeCodeEventListener(jit_logger_); |
| 1896 delete jit_logger_; | 1896 delete jit_logger_; |
| 1897 jit_logger_ = NULL; | 1897 jit_logger_ = NULL; |
| 1898 } | 1898 } |
| 1899 | 1899 |
| 1900 return log_->Close(); | 1900 return log_->Close(); |
| 1901 } | 1901 } |
| 1902 | 1902 |
| 1903 } // namespace internal | 1903 } // namespace internal |
| 1904 } // namespace v8 | 1904 } // namespace v8 |
| OLD | NEW |