| 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 30, | 459 30, |
| 460 "HandleScope::next"); | 460 "HandleScope::next"); |
| 461 Add(ExternalReference::handle_scope_limit_address().address(), | 461 Add(ExternalReference::handle_scope_limit_address().address(), |
| 462 UNCLASSIFIED, | 462 UNCLASSIFIED, |
| 463 31, | 463 31, |
| 464 "HandleScope::limit"); | 464 "HandleScope::limit"); |
| 465 Add(ExternalReference::handle_scope_level_address().address(), | 465 Add(ExternalReference::handle_scope_level_address().address(), |
| 466 UNCLASSIFIED, | 466 UNCLASSIFIED, |
| 467 32, | 467 32, |
| 468 "HandleScope::level"); | 468 "HandleScope::level"); |
| 469 Add(ExternalReference::new_deoptimizer_function().address(), |
| 470 UNCLASSIFIED, |
| 471 33, |
| 472 "Deoptimizer::New()"); |
| 473 Add(ExternalReference::compute_output_frames_function().address(), |
| 474 UNCLASSIFIED, |
| 475 34, |
| 476 "Deoptimizer::ComputeOutputFrames()"); |
| 477 Add(ExternalReference::address_of_min_int().address(), |
| 478 UNCLASSIFIED, |
| 479 35, |
| 480 "LDoubleConstant::min_int"); |
| 481 Add(ExternalReference::address_of_one_half().address(), |
| 482 UNCLASSIFIED, |
| 483 36, |
| 484 "LDoubleConstant::one_half"); |
| 469 Add(ExternalReference::isolate_address().address(), | 485 Add(ExternalReference::isolate_address().address(), |
| 470 UNCLASSIFIED, | 486 UNCLASSIFIED, |
| 471 33, | 487 37, |
| 472 "isolate"); | 488 "isolate"); |
| 473 } | 489 } |
| 474 | 490 |
| 475 | 491 |
| 476 ExternalReferenceEncoder::ExternalReferenceEncoder() | 492 ExternalReferenceEncoder::ExternalReferenceEncoder() |
| 477 : encodings_(Match), | 493 : encodings_(Match), |
| 478 isolate_(Isolate::Current()) { | 494 isolate_(Isolate::Current()) { |
| 479 ExternalReferenceTable* external_references = | 495 ExternalReferenceTable* external_references = |
| 480 ExternalReferenceTable::instance(isolate_); | 496 ExternalReferenceTable::instance(isolate_); |
| 481 for (int i = 0; i < external_references->size(); ++i) { | 497 for (int i = 0; i < external_references->size(); ++i) { |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 | 1410 |
| 1395 | 1411 |
| 1396 void Serializer::ObjectSerializer::VisitCodeEntry(Address entry_address) { | 1412 void Serializer::ObjectSerializer::VisitCodeEntry(Address entry_address) { |
| 1397 Code* target = Code::cast(Code::GetObjectFromEntryAddress(entry_address)); | 1413 Code* target = Code::cast(Code::GetObjectFromEntryAddress(entry_address)); |
| 1398 OutputRawData(entry_address); | 1414 OutputRawData(entry_address); |
| 1399 serializer_->SerializeObject(target, kPlain, kFirstInstruction); | 1415 serializer_->SerializeObject(target, kPlain, kFirstInstruction); |
| 1400 bytes_processed_so_far_ += kPointerSize; | 1416 bytes_processed_so_far_ += kPointerSize; |
| 1401 } | 1417 } |
| 1402 | 1418 |
| 1403 | 1419 |
| 1420 void Serializer::ObjectSerializer::VisitGlobalPropertyCell(RelocInfo* rinfo) { |
| 1421 // We shouldn't have any global property cell references in code |
| 1422 // objects in the snapshot. |
| 1423 UNREACHABLE(); |
| 1424 } |
| 1425 |
| 1426 |
| 1404 void Serializer::ObjectSerializer::VisitExternalAsciiString( | 1427 void Serializer::ObjectSerializer::VisitExternalAsciiString( |
| 1405 v8::String::ExternalAsciiStringResource** resource_pointer) { | 1428 v8::String::ExternalAsciiStringResource** resource_pointer) { |
| 1406 Address references_start = reinterpret_cast<Address>(resource_pointer); | 1429 Address references_start = reinterpret_cast<Address>(resource_pointer); |
| 1407 OutputRawData(references_start); | 1430 OutputRawData(references_start); |
| 1408 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { | 1431 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { |
| 1409 Object* source = HEAP->natives_source_cache()->get(i); | 1432 Object* source = HEAP->natives_source_cache()->get(i); |
| 1410 if (!source->IsUndefined()) { | 1433 if (!source->IsUndefined()) { |
| 1411 ExternalAsciiString* string = ExternalAsciiString::cast(source); | 1434 ExternalAsciiString* string = ExternalAsciiString::cast(source); |
| 1412 typedef v8::String::ExternalAsciiStringResource Resource; | 1435 typedef v8::String::ExternalAsciiStringResource Resource; |
| 1413 Resource* resource = string->resource(); | 1436 Resource* resource = string->resource(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1537 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
| 1515 } | 1538 } |
| 1516 } | 1539 } |
| 1517 int allocation_address = fullness_[space]; | 1540 int allocation_address = fullness_[space]; |
| 1518 fullness_[space] = allocation_address + size; | 1541 fullness_[space] = allocation_address + size; |
| 1519 return allocation_address; | 1542 return allocation_address; |
| 1520 } | 1543 } |
| 1521 | 1544 |
| 1522 | 1545 |
| 1523 } } // namespace v8::internal | 1546 } } // namespace v8::internal |
| OLD | NEW |