OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { | 1557 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { |
1558 Object* source = HEAP->natives_source_cache()->get(i); | 1558 Object* source = HEAP->natives_source_cache()->get(i); |
1559 if (!source->IsUndefined()) { | 1559 if (!source->IsUndefined()) { |
1560 ExternalAsciiString* string = ExternalAsciiString::cast(source); | 1560 ExternalAsciiString* string = ExternalAsciiString::cast(source); |
1561 typedef v8::String::ExternalAsciiStringResource Resource; | 1561 typedef v8::String::ExternalAsciiStringResource Resource; |
1562 const Resource* resource = string->resource(); | 1562 const Resource* resource = string->resource(); |
1563 if (resource == *resource_pointer) { | 1563 if (resource == *resource_pointer) { |
1564 sink_->Put(kNativesStringResource, "NativesStringResource"); | 1564 sink_->Put(kNativesStringResource, "NativesStringResource"); |
1565 sink_->PutSection(i, "NativesStringResourceEnd"); | 1565 sink_->PutSection(i, "NativesStringResourceEnd"); |
1566 bytes_processed_so_far_ += sizeof(resource); | 1566 bytes_processed_so_far_ += sizeof(resource); |
| 1567 string->clear_data_cache(); |
1567 return; | 1568 return; |
1568 } | 1569 } |
1569 } | 1570 } |
1570 } | 1571 } |
1571 // One of the strings in the natives cache should match the resource. We | 1572 // One of the strings in the natives cache should match the resource. We |
1572 // can't serialize any other kinds of external strings. | 1573 // can't serialize any other kinds of external strings. |
1573 UNREACHABLE(); | 1574 UNREACHABLE(); |
1574 } | 1575 } |
1575 | 1576 |
1576 | 1577 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1664 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
1664 } | 1665 } |
1665 } | 1666 } |
1666 int allocation_address = fullness_[space]; | 1667 int allocation_address = fullness_[space]; |
1667 fullness_[space] = allocation_address + size; | 1668 fullness_[space] = allocation_address + size; |
1668 return allocation_address; | 1669 return allocation_address; |
1669 } | 1670 } |
1670 | 1671 |
1671 | 1672 |
1672 } } // namespace v8::internal | 1673 } } // namespace v8::internal |
OLD | NEW |