| OLD | NEW | 
|     1 // Copyright 2010 the V8 project authors. All rights reserved. |     1 // Copyright 2010 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   670  |   670  | 
|   671  |   671  | 
|   672   void WriteHeader(Writer* w) { |   672   void WriteHeader(Writer* w) { | 
|   673     ASSERT(w->position() == 0); |   673     ASSERT(w->position() == 0); | 
|   674     Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>(); |   674     Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>(); | 
|   675 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM) |   675 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM) | 
|   676     const uint8_t ident[16] = |   676     const uint8_t ident[16] = | 
|   677         { 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |   677         { 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | 
|   678 #elif defined(V8_TARGET_ARCH_X64) |   678 #elif defined(V8_TARGET_ARCH_X64) | 
|   679     const uint8_t ident[16] = |   679     const uint8_t ident[16] = | 
|   680         { 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0 , 0, 0, 0, 0, 0, 0}; |   680         { 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | 
|   681 #else |   681 #else | 
|   682 #error Unsupported target architecture. |   682 #error Unsupported target architecture. | 
|   683 #endif |   683 #endif | 
|   684     memcpy(header->ident, ident, 16); |   684     memcpy(header->ident, ident, 16); | 
|   685     header->type = 1; |   685     header->type = 1; | 
|   686 #if defined(V8_TARGET_ARCH_IA32) |   686 #if defined(V8_TARGET_ARCH_IA32) | 
|   687     header->machine = 3; |   687     header->machine = 3; | 
|   688 #elif defined(V8_TARGET_ARCH_X64) |   688 #elif defined(V8_TARGET_ARCH_X64) | 
|   689     // Processor identification value for x64 is 62 as defined in |   689     // Processor identification value for x64 is 62 as defined in | 
|   690     //    System V ABI, AMD64 Supplement |   690     //    System V ABI, AMD64 Supplement | 
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1103       w->WriteULEB128(2); |  1103       w->WriteULEB128(2); | 
|  1104       w->WriteString(desc_->name()); |  1104       w->WriteString(desc_->name()); | 
|  1105       w->Write<intptr_t>(desc_->CodeStart()); |  1105       w->Write<intptr_t>(desc_->CodeStart()); | 
|  1106       w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize()); |  1106       w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize()); | 
|  1107       Writer::Slot<uint32_t> fb_block_size = w->CreateSlotHere<uint32_t>(); |  1107       Writer::Slot<uint32_t> fb_block_size = w->CreateSlotHere<uint32_t>(); | 
|  1108       uintptr_t fb_block_start = w->position(); |  1108       uintptr_t fb_block_start = w->position(); | 
|  1109 #if defined(V8_TARGET_ARCH_IA32) |  1109 #if defined(V8_TARGET_ARCH_IA32) | 
|  1110       w->Write<uint8_t>(DW_OP_reg5);  // The frame pointer's here on ia32 |  1110       w->Write<uint8_t>(DW_OP_reg5);  // The frame pointer's here on ia32 | 
|  1111 #elif defined(V8_TARGET_ARCH_X64) |  1111 #elif defined(V8_TARGET_ARCH_X64) | 
|  1112       w->Write<uint8_t>(DW_OP_reg6);  // and here on x64. |  1112       w->Write<uint8_t>(DW_OP_reg6);  // and here on x64. | 
 |  1113 #elif defined(V8_TARGET_ARCH_ARM) | 
 |  1114       UNIMPLEMENTED(); | 
|  1113 #else |  1115 #else | 
|  1114 #error Unsupported target architecture. |  1116 #error Unsupported target architecture. | 
|  1115 #endif |  1117 #endif | 
|  1116       fb_block_size.set(static_cast<uint32_t>(w->position() - fb_block_start)); |  1118       fb_block_size.set(static_cast<uint32_t>(w->position() - fb_block_start)); | 
|  1117  |  1119  | 
|  1118       int params = scope->num_parameters(); |  1120       int params = scope->num_parameters(); | 
|  1119       int slots = scope->num_stack_slots(); |  1121       int slots = scope->num_stack_slots(); | 
|  1120       int context_slots = scope->ContextLocalCount(); |  1122       int context_slots = scope->ContextLocalCount(); | 
|  1121       // The real slot ID is internal_slots + context_slot_id. |  1123       // The real slot ID is internal_slots + context_slot_id. | 
|  1122       int internal_slots = Context::MIN_CONTEXT_SLOTS; |  1124       int internal_slots = Context::MIN_CONTEXT_SLOTS; | 
| (...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2160   ScopedLock lock(mutex.Pointer()); |  2162   ScopedLock lock(mutex.Pointer()); | 
|  2161   ASSERT(!IsLineInfoTagged(line_info)); |  2163   ASSERT(!IsLineInfoTagged(line_info)); | 
|  2162   HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); |  2164   HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); | 
|  2163   ASSERT(e->value == NULL); |  2165   ASSERT(e->value == NULL); | 
|  2164   e->value = TagLineInfo(line_info); |  2166   e->value = TagLineInfo(line_info); | 
|  2165 } |  2167 } | 
|  2166  |  2168  | 
|  2167  |  2169  | 
|  2168 } }  // namespace v8::internal |  2170 } }  // namespace v8::internal | 
|  2169 #endif |  2171 #endif | 
| OLD | NEW |