OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } | 251 } |
252 } else if (kind == Code::STUB) { | 252 } else if (kind == Code::STUB) { |
253 // Reverse lookup required as the minor key cannot be retrieved | 253 // Reverse lookup required as the minor key cannot be retrieved |
254 // from the code object. | 254 // from the code object. |
255 Object* obj = Heap::code_stubs()->SlowReverseLookup(code); | 255 Object* obj = Heap::code_stubs()->SlowReverseLookup(code); |
256 if (obj != Heap::undefined_value()) { | 256 if (obj != Heap::undefined_value()) { |
257 ASSERT(obj->IsSmi()); | 257 ASSERT(obj->IsSmi()); |
258 // Get the STUB key and extract major and minor key. | 258 // Get the STUB key and extract major and minor key. |
259 uint32_t key = Smi::cast(obj)->value(); | 259 uint32_t key = Smi::cast(obj)->value(); |
260 uint32_t minor_key = CodeStub::MinorKeyFromKey(key); | 260 uint32_t minor_key = CodeStub::MinorKeyFromKey(key); |
261 ASSERT(code->major_key() == CodeStub::MajorKeyFromKey(key)); | 261 CodeStub::Major major_key = CodeStub::GetMajorKey(code); |
| 262 ASSERT(major_key == CodeStub::MajorKeyFromKey(key)); |
262 out.AddFormatted(" %s, %s, ", | 263 out.AddFormatted(" %s, %s, ", |
263 Code::Kind2String(kind), | 264 Code::Kind2String(kind), |
264 CodeStub::MajorName(code->major_key(), false)); | 265 CodeStub::MajorName(major_key, false)); |
265 switch (code->major_key()) { | 266 switch (major_key) { |
266 case CodeStub::CallFunction: | 267 case CodeStub::CallFunction: |
267 out.AddFormatted("argc = %d", minor_key); | 268 out.AddFormatted("argc = %d", minor_key); |
268 break; | 269 break; |
269 default: | 270 default: |
270 out.AddFormatted("minor: %d", minor_key); | 271 out.AddFormatted("minor: %d", minor_key); |
271 } | 272 } |
272 } | 273 } |
273 } else { | 274 } else { |
274 out.AddFormatted(" %s", Code::Kind2String(kind)); | 275 out.AddFormatted(" %s", Code::Kind2String(kind)); |
275 } | 276 } |
(...skipping 27 matching lines...) Expand all Loading... |
303 | 304 |
304 #else // ENABLE_DISASSEMBLER | 305 #else // ENABLE_DISASSEMBLER |
305 | 306 |
306 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} | 307 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} |
307 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; } | 308 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; } |
308 void Disassembler::Decode(FILE* f, Code* code) {} | 309 void Disassembler::Decode(FILE* f, Code* code) {} |
309 | 310 |
310 #endif // ENABLE_DISASSEMBLER | 311 #endif // ENABLE_DISASSEMBLER |
311 | 312 |
312 } } // namespace v8::internal | 313 } } // namespace v8::internal |
OLD | NEW |