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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 out.AddFormatted(", %s", Code::StubType2String(type)); | 209 out.AddFormatted(", %s", Code::StubType2String(type)); |
210 } | 210 } |
211 } else if (kind == Code::STUB || kind == Code::HANDLER) { | 211 } else if (kind == Code::STUB || kind == Code::HANDLER) { |
212 // Get the STUB key and extract major and minor key. | 212 // Get the STUB key and extract major and minor key. |
213 uint32_t key = code->stub_key(); | 213 uint32_t key = code->stub_key(); |
214 uint32_t minor_key = CodeStub::MinorKeyFromKey(key); | 214 uint32_t minor_key = CodeStub::MinorKeyFromKey(key); |
215 CodeStub::Major major_key = CodeStub::GetMajorKey(code); | 215 CodeStub::Major major_key = CodeStub::GetMajorKey(code); |
216 DCHECK(major_key == CodeStub::MajorKeyFromKey(key)); | 216 DCHECK(major_key == CodeStub::MajorKeyFromKey(key)); |
217 out.AddFormatted(" %s, %s, ", Code::Kind2String(kind), | 217 out.AddFormatted(" %s, %s, ", Code::Kind2String(kind), |
218 CodeStub::MajorName(major_key, false)); | 218 CodeStub::MajorName(major_key, false)); |
219 switch (major_key) { | 219 out.AddFormatted("minor: %d", minor_key); |
220 case CodeStub::CallFunction: { | |
221 int argc = CallFunctionStub::ExtractArgcFromMinorKey(minor_key); | |
222 out.AddFormatted("argc = %d", argc); | |
223 break; | |
224 } | |
225 default: | |
226 out.AddFormatted("minor: %d", minor_key); | |
227 } | |
228 } else { | 220 } else { |
229 out.AddFormatted(" %s", Code::Kind2String(kind)); | 221 out.AddFormatted(" %s", Code::Kind2String(kind)); |
230 } | 222 } |
231 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | 223 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { |
232 out.AddFormatted(" (id = %d)", static_cast<int>(relocinfo.data())); | 224 out.AddFormatted(" (id = %d)", static_cast<int>(relocinfo.data())); |
233 } | 225 } |
234 } else if (RelocInfo::IsRuntimeEntry(rmode) && | 226 } else if (RelocInfo::IsRuntimeEntry(rmode) && |
235 isolate->deoptimizer_data() != NULL) { | 227 isolate->deoptimizer_data() != NULL) { |
236 // A runtime entry reloinfo might be a deoptimization bailout. | 228 // A runtime entry reloinfo might be a deoptimization bailout. |
237 Address addr = relocinfo.target_address(); | 229 Address addr = relocinfo.target_address(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 282 |
291 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 283 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
292 byte* end, Code* code) { | 284 byte* end, Code* code) { |
293 return 0; | 285 return 0; |
294 } | 286 } |
295 | 287 |
296 #endif // ENABLE_DISASSEMBLER | 288 #endif // ENABLE_DISASSEMBLER |
297 | 289 |
298 } // namespace internal | 290 } // namespace internal |
299 } // namespace v8 | 291 } // namespace v8 |
OLD | NEW |