Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: src/gdb-jit.cc

Issue 7374002: Refactor allocation policies. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/func-name-inferrer.cc ('k') | src/globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize()); 1087 w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize());
1088 w->Write<uint32_t>(0); 1088 w->Write<uint32_t>(0);
1089 1089
1090 uint32_t ty_offset = static_cast<uint32_t>(w->position() - cu_start); 1090 uint32_t ty_offset = static_cast<uint32_t>(w->position() - cu_start);
1091 w->WriteULEB128(3); 1091 w->WriteULEB128(3);
1092 w->Write<uint8_t>(kPointerSize); 1092 w->Write<uint8_t>(kPointerSize);
1093 w->WriteString("v8value"); 1093 w->WriteString("v8value");
1094 1094
1095 if (desc_->IsInfoAvailable()) { 1095 if (desc_->IsInfoAvailable()) {
1096 CompilationInfo* info = desc_->info(); 1096 CompilationInfo* info = desc_->info();
1097 ScopeInfo<FreeStoreAllocationPolicy> scope_info(info->scope()); 1097 ScopeInfo<FreeStoreAllocator> scope_info(info->scope());
1098 w->WriteULEB128(2); 1098 w->WriteULEB128(2);
1099 w->WriteString(desc_->name()); 1099 w->WriteString(desc_->name());
1100 w->Write<intptr_t>(desc_->CodeStart()); 1100 w->Write<intptr_t>(desc_->CodeStart());
1101 w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize()); 1101 w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize());
1102 Writer::Slot<uint32_t> fb_block_size = w->CreateSlotHere<uint32_t>(); 1102 Writer::Slot<uint32_t> fb_block_size = w->CreateSlotHere<uint32_t>();
1103 uintptr_t fb_block_start = w->position(); 1103 uintptr_t fb_block_start = w->position();
1104 #if defined(V8_TARGET_ARCH_IA32) 1104 #if defined(V8_TARGET_ARCH_IA32)
1105 w->Write<uint8_t>(DW_OP_reg5); // The frame pointer's here on ia32 1105 w->Write<uint8_t>(DW_OP_reg5); // The frame pointer's here on ia32
1106 #elif defined(V8_TARGET_ARCH_X64) 1106 #elif defined(V8_TARGET_ARCH_X64)
1107 w->Write<uint8_t>(DW_OP_reg6); // and here on x64. 1107 w->Write<uint8_t>(DW_OP_reg6); // and here on x64.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 w->WriteULEB128(DW_FORM_ADDR); 1299 w->WriteULEB128(DW_FORM_ADDR);
1300 w->WriteULEB128(DW_AT_HIGH_PC); 1300 w->WriteULEB128(DW_AT_HIGH_PC);
1301 w->WriteULEB128(DW_FORM_ADDR); 1301 w->WriteULEB128(DW_FORM_ADDR);
1302 w->WriteULEB128(DW_AT_STMT_LIST); 1302 w->WriteULEB128(DW_AT_STMT_LIST);
1303 w->WriteULEB128(DW_FORM_DATA4); 1303 w->WriteULEB128(DW_FORM_DATA4);
1304 w->WriteULEB128(0); 1304 w->WriteULEB128(0);
1305 w->WriteULEB128(0); 1305 w->WriteULEB128(0);
1306 1306
1307 if (extra_info) { 1307 if (extra_info) {
1308 CompilationInfo* info = desc_->info(); 1308 CompilationInfo* info = desc_->info();
1309 ScopeInfo<FreeStoreAllocationPolicy> scope_info(info->scope()); 1309 ScopeInfo<FreeStoreAllocator> scope_info(info->scope());
1310 int params = scope_info.number_of_parameters(); 1310 int params = scope_info.number_of_parameters();
1311 int slots = scope_info.number_of_stack_slots(); 1311 int slots = scope_info.number_of_stack_slots();
1312 int context_slots = scope_info.number_of_context_slots(); 1312 int context_slots = scope_info.number_of_context_slots();
1313 // The real slot ID is internal_slots + context_slot_id. 1313 // The real slot ID is internal_slots + context_slot_id.
1314 int internal_slots = Context::MIN_CONTEXT_SLOTS; 1314 int internal_slots = Context::MIN_CONTEXT_SLOTS;
1315 int locals = scope_info.NumberOfLocals(); 1315 int locals = scope_info.NumberOfLocals();
1316 int total_children = 1316 int total_children =
1317 params + slots + context_slots + internal_slots + locals + 2; 1317 params + slots + context_slots + internal_slots + locals + 2;
1318 1318
1319 // The extra duplication below seems to be necessary to keep 1319 // The extra duplication below seems to be necessary to keep
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 ScopedLock lock(mutex_); 2149 ScopedLock lock(mutex_);
2150 ASSERT(!IsLineInfoTagged(line_info)); 2150 ASSERT(!IsLineInfoTagged(line_info));
2151 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); 2151 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
2152 ASSERT(e->value == NULL); 2152 ASSERT(e->value == NULL);
2153 e->value = TagLineInfo(line_info); 2153 e->value = TagLineInfo(line_info);
2154 } 2154 }
2155 2155
2156 2156
2157 } } // namespace v8::internal 2157 } } // namespace v8::internal
2158 #endif 2158 #endif
OLDNEW
« no previous file with comments | « src/func-name-inferrer.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698