OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 12 matching lines...) Expand all Loading... |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #include "accessors.h" | 30 #include "accessors.h" |
31 #include "api.h" | 31 #include "api.h" |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "deoptimizer.h" |
33 #include "execution.h" | 34 #include "execution.h" |
34 #include "global-handles.h" | 35 #include "global-handles.h" |
35 #include "ic-inl.h" | 36 #include "ic-inl.h" |
36 #include "natives.h" | 37 #include "natives.h" |
37 #include "platform.h" | 38 #include "platform.h" |
38 #include "runtime.h" | 39 #include "runtime.h" |
39 #include "serialize.h" | 40 #include "serialize.h" |
40 #include "snapshot.h" | 41 #include "snapshot.h" |
41 #include "stub-cache.h" | 42 #include "stub-cache.h" |
42 #include "v8threads.h" | 43 #include "v8threads.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 49, | 521 49, |
521 "address_of_has_pending_message"); | 522 "address_of_has_pending_message"); |
522 Add(ExternalReference::address_of_pending_message_script(isolate).address(), | 523 Add(ExternalReference::address_of_pending_message_script(isolate).address(), |
523 UNCLASSIFIED, | 524 UNCLASSIFIED, |
524 50, | 525 50, |
525 "pending_message_script"); | 526 "pending_message_script"); |
526 Add(ExternalReference::get_make_code_young_function(isolate).address(), | 527 Add(ExternalReference::get_make_code_young_function(isolate).address(), |
527 UNCLASSIFIED, | 528 UNCLASSIFIED, |
528 51, | 529 51, |
529 "Code::MakeCodeYoung"); | 530 "Code::MakeCodeYoung"); |
| 531 |
| 532 // Add a small set of deopt entry addresses to encoder without generating the |
| 533 // deopt table code, which isn't possible at deserialization time. |
| 534 HandleScope scope(Isolate::Current()); |
| 535 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { |
| 536 Address address = Deoptimizer::GetDeoptimizationEntry( |
| 537 entry, |
| 538 Deoptimizer::LAZY, |
| 539 Deoptimizer::CALCULATE_ENTRY_ADDRESS); |
| 540 Add(address, LAZY_DEOPTIMIZATION, 52 + entry, "lazy_deopt"); |
| 541 } |
530 } | 542 } |
531 | 543 |
532 | 544 |
533 ExternalReferenceEncoder::ExternalReferenceEncoder() | 545 ExternalReferenceEncoder::ExternalReferenceEncoder() |
534 : encodings_(Match), | 546 : encodings_(Match), |
535 isolate_(Isolate::Current()) { | 547 isolate_(Isolate::Current()) { |
536 ExternalReferenceTable* external_references = | 548 ExternalReferenceTable* external_references = |
537 ExternalReferenceTable::instance(isolate_); | 549 ExternalReferenceTable::instance(isolate_); |
538 for (int i = 0; i < external_references->size(); ++i) { | 550 for (int i = 0; i < external_references->size(); ++i) { |
539 Put(external_references->address(i), i); | 551 Put(external_references->address(i), i); |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 | 1635 |
1624 bool SnapshotByteSource::AtEOF() { | 1636 bool SnapshotByteSource::AtEOF() { |
1625 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; | 1637 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; |
1626 for (int x = position_; x < length_; x++) { | 1638 for (int x = position_; x < length_; x++) { |
1627 if (data_[x] != SerializerDeserializer::nop()) return false; | 1639 if (data_[x] != SerializerDeserializer::nop()) return false; |
1628 } | 1640 } |
1629 return true; | 1641 return true; |
1630 } | 1642 } |
1631 | 1643 |
1632 } } // namespace v8::internal | 1644 } } // namespace v8::internal |
OLD | NEW |