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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 Debug::k_after_break_target_address << kDebugIdShift, | 230 Debug::k_after_break_target_address << kDebugIdShift, |
231 "Debug::after_break_target_address()"); | 231 "Debug::after_break_target_address()"); |
232 Add(Debug_Address(Debug::k_debug_break_slot_address).address(), | 232 Add(Debug_Address(Debug::k_debug_break_slot_address).address(), |
233 DEBUG_ADDRESS, | 233 DEBUG_ADDRESS, |
234 Debug::k_debug_break_slot_address << kDebugIdShift, | 234 Debug::k_debug_break_slot_address << kDebugIdShift, |
235 "Debug::debug_break_slot_address()"); | 235 "Debug::debug_break_slot_address()"); |
236 Add(Debug_Address(Debug::k_debug_break_return_address).address(), | 236 Add(Debug_Address(Debug::k_debug_break_return_address).address(), |
237 DEBUG_ADDRESS, | 237 DEBUG_ADDRESS, |
238 Debug::k_debug_break_return_address << kDebugIdShift, | 238 Debug::k_debug_break_return_address << kDebugIdShift, |
239 "Debug::debug_break_return_address()"); | 239 "Debug::debug_break_return_address()"); |
240 Add(Debug_Address(Debug::k_restarter_frame_function_pointer).address(), | |
241 DEBUG_ADDRESS, | |
242 Debug::k_restarter_frame_function_pointer << kDebugIdShift, | |
243 "Debug::restarter_frame_function_pointer_address()"); | |
244 const char* debug_register_format = "Debug::register_address(%i)"; | 240 const char* debug_register_format = "Debug::register_address(%i)"; |
245 int dr_format_length = StrLength(debug_register_format); | 241 int dr_format_length = StrLength(debug_register_format); |
246 for (int i = 0; i < kNumJSCallerSaved; ++i) { | 242 for (int i = 0; i < kNumJSCallerSaved; ++i) { |
247 Vector<char> name = Vector<char>::New(dr_format_length + 1); | 243 Vector<char> name = Vector<char>::New(dr_format_length + 1); |
248 OS::SNPrintF(name, debug_register_format, i); | 244 OS::SNPrintF(name, debug_register_format, i); |
249 Add(Debug_Address(Debug::k_register_address, i).address(), | 245 Add(Debug_Address(Debug::k_register_address, i).address(), |
250 DEBUG_ADDRESS, | 246 DEBUG_ADDRESS, |
251 Debug::k_register_address << kDebugIdShift | i, | 247 Debug::k_register_address << kDebugIdShift | i, |
252 name.start()); | 248 name.start()); |
253 } | 249 } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 ExternalReferenceTable* external_references = | 471 ExternalReferenceTable* external_references = |
476 ExternalReferenceTable::instance(); | 472 ExternalReferenceTable::instance(); |
477 for (int i = 0; i < external_references->size(); ++i) { | 473 for (int i = 0; i < external_references->size(); ++i) { |
478 Put(external_references->address(i), i); | 474 Put(external_references->address(i), i); |
479 } | 475 } |
480 } | 476 } |
481 | 477 |
482 | 478 |
483 uint32_t ExternalReferenceEncoder::Encode(Address key) const { | 479 uint32_t ExternalReferenceEncoder::Encode(Address key) const { |
484 int index = IndexOf(key); | 480 int index = IndexOf(key); |
485 ASSERT(key == NULL || index >= 0); | |
486 return index >=0 ? ExternalReferenceTable::instance()->code(index) : 0; | 481 return index >=0 ? ExternalReferenceTable::instance()->code(index) : 0; |
487 } | 482 } |
488 | 483 |
489 | 484 |
490 const char* ExternalReferenceEncoder::NameOfAddress(Address key) const { | 485 const char* ExternalReferenceEncoder::NameOfAddress(Address key) const { |
491 int index = IndexOf(key); | 486 int index = IndexOf(key); |
492 return index >=0 ? ExternalReferenceTable::instance()->name(index) : NULL; | 487 return index >=0 ? ExternalReferenceTable::instance()->name(index) : NULL; |
493 } | 488 } |
494 | 489 |
495 | 490 |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1452 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
1458 } | 1453 } |
1459 } | 1454 } |
1460 int allocation_address = fullness_[space]; | 1455 int allocation_address = fullness_[space]; |
1461 fullness_[space] = allocation_address + size; | 1456 fullness_[space] = allocation_address + size; |
1462 return allocation_address; | 1457 return allocation_address; |
1463 } | 1458 } |
1464 | 1459 |
1465 | 1460 |
1466 } } // namespace v8::internal | 1461 } } // namespace v8::internal |
OLD | NEW |