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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 byte TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId id) { | 630 byte TypeFeedbackOracle::ToBooleanTypes(TypeFeedbackId id) { |
631 Handle<Object> object = GetInfo(id); | 631 Handle<Object> object = GetInfo(id); |
632 return object->IsCode() ? Handle<Code>::cast(object)->to_boolean_state() : 0; | 632 return object->IsCode() ? Handle<Code>::cast(object)->to_boolean_state() : 0; |
633 } | 633 } |
634 | 634 |
635 | 635 |
636 byte TypeFeedbackOracle::CompareNilTypes(TypeFeedbackId id) { | 636 byte TypeFeedbackOracle::CompareNilTypes(TypeFeedbackId id) { |
637 Handle<Object> object = GetInfo(id); | 637 Handle<Object> object = GetInfo(id); |
638 if (object->IsCode() && | 638 if (object->IsCode() && |
639 Handle<Code>::cast(object)->is_compare_nil_ic_stub()) { | 639 Handle<Code>::cast(object)->is_compare_nil_ic_stub()) { |
640 return Handle<Code>::cast(object)->compare_nil_state(); | 640 return Handle<Code>::cast(object)->compare_nil_types(); |
641 } else { | 641 } else { |
642 return CompareNilICStub::kFullCompare; | 642 return CompareNilICStub::Types::FullCompare().ToIntegral(); |
643 } | 643 } |
644 } | 644 } |
645 | 645 |
646 | 646 |
647 // Things are a bit tricky here: The iterator for the RelocInfos and the infos | 647 // Things are a bit tricky here: The iterator for the RelocInfos and the infos |
648 // themselves are not GC-safe, so we first get all infos, then we create the | 648 // themselves are not GC-safe, so we first get all infos, then we create the |
649 // dictionary (possibly triggering GC), and finally we relocate the collected | 649 // dictionary (possibly triggering GC), and finally we relocate the collected |
650 // infos before we process them. | 650 // infos before we process them. |
651 void TypeFeedbackOracle::BuildDictionary(Handle<Code> code) { | 651 void TypeFeedbackOracle::BuildDictionary(Handle<Code> code) { |
652 AssertNoAllocation no_allocation; | 652 AssertNoAllocation no_allocation; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 USE(maybe_result); | 773 USE(maybe_result); |
774 #ifdef DEBUG | 774 #ifdef DEBUG |
775 Object* result = NULL; | 775 Object* result = NULL; |
776 // Dictionary has been allocated with sufficient size for all elements. | 776 // Dictionary has been allocated with sufficient size for all elements. |
777 ASSERT(maybe_result->ToObject(&result)); | 777 ASSERT(maybe_result->ToObject(&result)); |
778 ASSERT(*dictionary_ == result); | 778 ASSERT(*dictionary_ == result); |
779 #endif | 779 #endif |
780 } | 780 } |
781 | 781 |
782 } } // namespace v8::internal | 782 } } // namespace v8::internal |
OLD | NEW |