| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 // It's called UnboundScript in the API but it's a SharedFunctionInfo. | 2133 // It's called UnboundScript in the API but it's a SharedFunctionInfo. |
| 2134 SharedFunctionInfo* shared = | 2134 SharedFunctionInfo* shared = |
| 2135 event->script.IsEmpty() ? NULL : *Utils::OpenHandle(*event->script); | 2135 event->script.IsEmpty() ? NULL : *Utils::OpenHandle(*event->script); |
| 2136 AddCode(builder.Finalize(), code, shared, lineinfo); | 2136 AddCode(builder.Finalize(), code, shared, lineinfo); |
| 2137 break; | 2137 break; |
| 2138 } | 2138 } |
| 2139 case v8::JitCodeEvent::CODE_MOVED: | 2139 case v8::JitCodeEvent::CODE_MOVED: |
| 2140 // Enabling the GDB JIT interface should disable code compaction. | 2140 // Enabling the GDB JIT interface should disable code compaction. |
| 2141 UNREACHABLE(); | 2141 UNREACHABLE(); |
| 2142 break; | 2142 break; |
| 2143 case v8::JitCodeEvent::CODE_REMOVED: | |
| 2144 // Do nothing. Instead, adding code causes eviction of any entry whose | |
| 2145 // address range intersects the address range of the added code. | |
| 2146 break; | |
| 2147 case v8::JitCodeEvent::CODE_ADD_LINE_POS_INFO: { | 2143 case v8::JitCodeEvent::CODE_ADD_LINE_POS_INFO: { |
| 2148 LineInfo* line_info = reinterpret_cast<LineInfo*>(event->user_data); | 2144 LineInfo* line_info = reinterpret_cast<LineInfo*>(event->user_data); |
| 2149 line_info->SetPosition(static_cast<intptr_t>(event->line_info.offset), | 2145 line_info->SetPosition(static_cast<intptr_t>(event->line_info.offset), |
| 2150 static_cast<int>(event->line_info.pos), | 2146 static_cast<int>(event->line_info.pos), |
| 2151 event->line_info.position_type == | 2147 event->line_info.position_type == |
| 2152 v8::JitCodeEvent::STATEMENT_POSITION); | 2148 v8::JitCodeEvent::STATEMENT_POSITION); |
| 2153 break; | 2149 break; |
| 2154 } | 2150 } |
| 2155 case v8::JitCodeEvent::CODE_START_LINE_INFO_RECORDING: { | 2151 case v8::JitCodeEvent::CODE_START_LINE_INFO_RECORDING: { |
| 2156 v8::JitCodeEvent* mutable_event = const_cast<v8::JitCodeEvent*>(event); | 2152 v8::JitCodeEvent* mutable_event = const_cast<v8::JitCodeEvent*>(event); |
| 2157 mutable_event->user_data = new LineInfo(); | 2153 mutable_event->user_data = new LineInfo(); |
| 2158 break; | 2154 break; |
| 2159 } | 2155 } |
| 2160 case v8::JitCodeEvent::CODE_END_LINE_INFO_RECORDING: { | 2156 case v8::JitCodeEvent::CODE_END_LINE_INFO_RECORDING: { |
| 2161 LineInfo* line_info = reinterpret_cast<LineInfo*>(event->user_data); | 2157 LineInfo* line_info = reinterpret_cast<LineInfo*>(event->user_data); |
| 2162 PutLineInfo(reinterpret_cast<Address>(event->code_start), line_info); | 2158 PutLineInfo(reinterpret_cast<Address>(event->code_start), line_info); |
| 2163 break; | 2159 break; |
| 2164 } | 2160 } |
| 2165 } | 2161 } |
| 2166 } | 2162 } |
| 2167 #endif | 2163 #endif |
| 2168 } // namespace GDBJITInterface | 2164 } // namespace GDBJITInterface |
| 2169 } // namespace internal | 2165 } // namespace internal |
| 2170 } // namespace v8 | 2166 } // namespace v8 |
| OLD | NEW |