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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 int space = source_->Get(); | 1010 int space = source_->Get(); |
1011 pages_[space].Add(last_object_address_); | 1011 pages_[space].Add(last_object_address_); |
1012 if (space == CODE_SPACE) { | 1012 if (space == CODE_SPACE) { |
1013 CPU::FlushICache(last_object_address_, Page::kPageSize); | 1013 CPU::FlushICache(last_object_address_, Page::kPageSize); |
1014 } | 1014 } |
1015 break; | 1015 break; |
1016 } | 1016 } |
1017 | 1017 |
1018 case kNativesStringResource: { | 1018 case kNativesStringResource: { |
1019 int index = source_->Get(); | 1019 int index = source_->Get(); |
1020 Vector<const char> source_vector = Natives::GetScriptSource(index); | 1020 Vector<const char> source_vector = Natives::GetRawScriptSource(index); |
1021 NativesExternalStringResource* resource = | 1021 NativesExternalStringResource* resource = |
1022 new NativesExternalStringResource( | 1022 new NativesExternalStringResource(isolate->bootstrapper(), |
1023 isolate->bootstrapper(), source_vector.start()); | 1023 source_vector.start(), |
| 1024 source_vector.length()); |
1024 *current++ = reinterpret_cast<Object*>(resource); | 1025 *current++ = reinterpret_cast<Object*>(resource); |
1025 break; | 1026 break; |
1026 } | 1027 } |
1027 | 1028 |
1028 case kSynchronize: { | 1029 case kSynchronize: { |
1029 // If we get here then that indicates that you have a mismatch between | 1030 // If we get here then that indicates that you have a mismatch between |
1030 // the number of GC roots when serializing and deserializing. | 1031 // the number of GC roots when serializing and deserializing. |
1031 UNREACHABLE(); | 1032 UNREACHABLE(); |
1032 } | 1033 } |
1033 | 1034 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1566 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
1566 } | 1567 } |
1567 } | 1568 } |
1568 int allocation_address = fullness_[space]; | 1569 int allocation_address = fullness_[space]; |
1569 fullness_[space] = allocation_address + size; | 1570 fullness_[space] = allocation_address + size; |
1570 return allocation_address; | 1571 return allocation_address; |
1571 } | 1572 } |
1572 | 1573 |
1573 | 1574 |
1574 } } // namespace v8::internal | 1575 } } // namespace v8::internal |
OLD | NEW |