OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 #ifndef V8_LOG_INL_H_ | 5 #ifndef V8_LOG_INL_H_ |
6 #define V8_LOG_INL_H_ | 6 #define V8_LOG_INL_H_ |
7 | 7 |
8 #include "src/log.h" | 8 #include "src/log.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/objects-inl.h" |
10 | 11 |
11 namespace v8 { | 12 namespace v8 { |
12 namespace internal { | 13 namespace internal { |
13 | 14 |
14 Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag, | 15 Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag, |
15 Script* script) { | 16 Script* script) { |
16 if ((tag == FUNCTION_TAG || tag == LAZY_COMPILE_TAG || tag == SCRIPT_TAG) | 17 if ((tag == FUNCTION_TAG || tag == LAZY_COMPILE_TAG || tag == SCRIPT_TAG) |
17 && script->type()->value() == Script::TYPE_NATIVE) { | 18 && script->type()->value() == Script::TYPE_NATIVE) { |
18 switch (tag) { | 19 switch (tag) { |
19 case FUNCTION_TAG: return NATIVE_FUNCTION_TAG; | 20 case FUNCTION_TAG: return NATIVE_FUNCTION_TAG; |
(...skipping 13 matching lines...) Expand all Loading... |
33 if (isolate->event_logger() == DefaultEventLoggerSentinel) { | 34 if (isolate->event_logger() == DefaultEventLoggerSentinel) { |
34 LOG(isolate, TimerEvent(se, name)); | 35 LOG(isolate, TimerEvent(se, name)); |
35 } else if (expose_to_api) { | 36 } else if (expose_to_api) { |
36 isolate->event_logger()(name, se); | 37 isolate->event_logger()(name, se); |
37 } | 38 } |
38 } | 39 } |
39 } | 40 } |
40 } } // namespace v8::internal | 41 } } // namespace v8::internal |
41 | 42 |
42 #endif // V8_LOG_INL_H_ | 43 #endif // V8_LOG_INL_H_ |
OLD | NEW |