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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 15, | 727 15, |
728 "div_two_doubles"); | 728 "div_two_doubles"); |
729 Add(ExternalReference::double_fp_operation(Token::MOD).address(), | 729 Add(ExternalReference::double_fp_operation(Token::MOD).address(), |
730 UNCLASSIFIED, | 730 UNCLASSIFIED, |
731 16, | 731 16, |
732 "mod_two_doubles"); | 732 "mod_two_doubles"); |
733 Add(ExternalReference::compare_doubles().address(), | 733 Add(ExternalReference::compare_doubles().address(), |
734 UNCLASSIFIED, | 734 UNCLASSIFIED, |
735 17, | 735 17, |
736 "compare_doubles"); | 736 "compare_doubles"); |
737 #ifdef V8_NATIVE_REGEXP | |
738 Add(ExternalReference::re_case_insensitive_compare_uc16().address(), | |
739 UNCLASSIFIED, | |
740 17, | |
Erik Corry
2009/08/28 09:47:03
Seems like you shouldn't be reusing 17 here.
Lasse Reichstein
2009/08/28 11:43:15
Whoops.
| |
741 "NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()"); | |
742 Add(ExternalReference::re_check_stack_guard_state().address(), | |
743 UNCLASSIFIED, | |
744 18, | |
745 "RegExpMacroAssembler*::CheckStackGuardState()"); | |
746 Add(ExternalReference::re_grow_stack().address(), | |
747 UNCLASSIFIED, | |
748 19, | |
749 "NativeRegExpMacroAssembler::GrowStack()"); | |
750 #endif | |
737 } | 751 } |
738 | 752 |
739 | 753 |
740 ExternalReferenceEncoder::ExternalReferenceEncoder() | 754 ExternalReferenceEncoder::ExternalReferenceEncoder() |
741 : encodings_(Match) { | 755 : encodings_(Match) { |
742 ExternalReferenceTable* external_references = | 756 ExternalReferenceTable* external_references = |
743 ExternalReferenceTable::instance(); | 757 ExternalReferenceTable::instance(); |
744 for (int i = 0; i < external_references->size(); ++i) { | 758 for (int i = 0; i < external_references->size(); ++i) { |
745 Put(external_references->address(i), i); | 759 Put(external_references->address(i), i); |
746 } | 760 } |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1112 | 1126 |
1113 | 1127 |
1114 void Serializer::PutHeader() { | 1128 void Serializer::PutHeader() { |
1115 PutFlags(); | 1129 PutFlags(); |
1116 writer_->PutC('D'); | 1130 writer_->PutC('D'); |
1117 #ifdef DEBUG | 1131 #ifdef DEBUG |
1118 writer_->PutC(FLAG_debug_serialization ? '1' : '0'); | 1132 writer_->PutC(FLAG_debug_serialization ? '1' : '0'); |
1119 #else | 1133 #else |
1120 writer_->PutC('0'); | 1134 writer_->PutC('0'); |
1121 #endif | 1135 #endif |
1136 #ifdef V8_NATIVE_REGEXP | |
1137 writer_->PutC('N'); | |
1138 #else // Interpreted regexp | |
1139 writer_->PutC('I'); | |
1140 #endif | |
1122 // Write sizes of paged memory spaces. Allocate extra space for the old | 1141 // Write sizes of paged memory spaces. Allocate extra space for the old |
1123 // and code spaces, because objects in new space will be promoted to them. | 1142 // and code spaces, because objects in new space will be promoted to them. |
1124 writer_->PutC('S'); | 1143 writer_->PutC('S'); |
1125 writer_->PutC('['); | 1144 writer_->PutC('['); |
1126 writer_->PutInt(Heap::old_pointer_space()->Size() + | 1145 writer_->PutInt(Heap::old_pointer_space()->Size() + |
1127 Heap::new_space()->Size()); | 1146 Heap::new_space()->Size()); |
1128 writer_->PutC('|'); | 1147 writer_->PutC('|'); |
1129 writer_->PutInt(Heap::old_data_space()->Size() + Heap::new_space()->Size()); | 1148 writer_->PutInt(Heap::old_data_space()->Size() + Heap::new_space()->Size()); |
1130 writer_->PutC('|'); | 1149 writer_->PutC('|'); |
1131 writer_->PutInt(Heap::code_space()->Size() + Heap::new_space()->Size()); | 1150 writer_->PutInt(Heap::code_space()->Size() + Heap::new_space()->Size()); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1468 | 1487 |
1469 void Deserializer::GetHeader() { | 1488 void Deserializer::GetHeader() { |
1470 reader_.ExpectC('D'); | 1489 reader_.ExpectC('D'); |
1471 #ifdef DEBUG | 1490 #ifdef DEBUG |
1472 expect_debug_information_ = reader_.GetC() == '1'; | 1491 expect_debug_information_ = reader_.GetC() == '1'; |
1473 #else | 1492 #else |
1474 // In release mode, don't attempt to read a snapshot containing | 1493 // In release mode, don't attempt to read a snapshot containing |
1475 // synchronization tags. | 1494 // synchronization tags. |
1476 if (reader_.GetC() != '0') FATAL("Snapshot contains synchronization tags."); | 1495 if (reader_.GetC() != '0') FATAL("Snapshot contains synchronization tags."); |
1477 #endif | 1496 #endif |
1497 #ifdef V8_NATIVE_REGEXP | |
1498 reader_.ExpectC('N'); | |
1499 #else // Interpreted regexp. | |
1500 reader_.ExpectC('I'); | |
1501 #endif | |
1478 // Ensure sufficient capacity in paged memory spaces to avoid growth | 1502 // Ensure sufficient capacity in paged memory spaces to avoid growth |
1479 // during deserialization. | 1503 // during deserialization. |
1480 reader_.ExpectC('S'); | 1504 reader_.ExpectC('S'); |
1481 reader_.ExpectC('['); | 1505 reader_.ExpectC('['); |
1482 InitPagedSpace(Heap::old_pointer_space(), | 1506 InitPagedSpace(Heap::old_pointer_space(), |
1483 reader_.GetInt(), | 1507 reader_.GetInt(), |
1484 &old_pointer_pages_); | 1508 &old_pointer_pages_); |
1485 reader_.ExpectC('|'); | 1509 reader_.ExpectC('|'); |
1486 InitPagedSpace(Heap::old_data_space(), reader_.GetInt(), &old_data_pages_); | 1510 InitPagedSpace(Heap::old_data_space(), reader_.GetInt(), &old_data_pages_); |
1487 reader_.ExpectC('|'); | 1511 reader_.ExpectC('|'); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1657 ASSERT(index < large_objects_.length()); | 1681 ASSERT(index < large_objects_.length()); |
1658 } | 1682 } |
1659 return large_objects_[index]; // s.page_offset() is ignored. | 1683 return large_objects_[index]; // s.page_offset() is ignored. |
1660 } | 1684 } |
1661 UNREACHABLE(); | 1685 UNREACHABLE(); |
1662 return NULL; | 1686 return NULL; |
1663 } | 1687 } |
1664 | 1688 |
1665 | 1689 |
1666 } } // namespace v8::internal | 1690 } } // namespace v8::internal |
OLD | NEW |