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

Side by Side Diff: src/serialize.cc

Issue 8551006: Version 3.7.9. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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/scopes.cc ('k') | src/spaces.cc » ('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 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
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
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
OLDNEW
« no previous file with comments | « src/scopes.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698