Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index fc7fcb9ced74fb9863870617170cda4870d60679..f2be02e1cec964f55554568613a3a974104a4fdb 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -893,64 +893,6 @@ void Logger::LeaveExternal(Isolate* isolate) { |
TIMER_EVENTS_LIST(V) |
#undef V |
- |
-namespace { |
-// Emits the source code of a regexp. Used by regexp events. |
-void LogRegExpSource(Handle<JSRegExp> regexp, Isolate* isolate, |
- Log::MessageBuilder* msg) { |
- // Prints "/" + re.source + "/" + |
- // (re.global?"g":"") + (re.ignorecase?"i":"") + (re.multiline?"m":"") |
- |
- Handle<Object> source = |
- JSReceiver::GetProperty(isolate, regexp, "source").ToHandleChecked(); |
- if (!source->IsString()) { |
- msg->Append("no source"); |
- return; |
- } |
- |
- switch (regexp->TypeTag()) { |
- case JSRegExp::ATOM: |
- msg->Append('a'); |
- break; |
- default: |
- break; |
- } |
- msg->Append('/'); |
- msg->AppendDetailed(*Handle<String>::cast(source), false); |
- msg->Append('/'); |
- |
- // global flag |
- Handle<Object> global = |
- JSReceiver::GetProperty(isolate, regexp, "global").ToHandleChecked(); |
- if (global->IsTrue(isolate)) { |
- msg->Append('g'); |
- } |
- // ignorecase flag |
- Handle<Object> ignorecase = |
- JSReceiver::GetProperty(isolate, regexp, "ignoreCase").ToHandleChecked(); |
- if (ignorecase->IsTrue(isolate)) { |
- msg->Append('i'); |
- } |
- // multiline flag |
- Handle<Object> multiline = |
- JSReceiver::GetProperty(isolate, regexp, "multiline").ToHandleChecked(); |
- if (multiline->IsTrue(isolate)) { |
- msg->Append('m'); |
- } |
-} |
-} // namespace |
- |
- |
-void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) { |
- if (!log_->IsEnabled() || !FLAG_log_regexp) return; |
- Log::MessageBuilder msg(log_); |
- msg.Append("regexp-compile,"); |
- LogRegExpSource(regexp, isolate_, &msg); |
- msg.Append(in_cache ? ",hit" : ",miss"); |
- msg.WriteToLogFile(); |
-} |
- |
- |
void Logger::ApiNamedPropertyAccess(const char* tag, |
JSObject* holder, |
Object* name) { |