| 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 3758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 return NULL; | 3769 return NULL; |
| 3770 } | 3770 } |
| 3771 | 3771 |
| 3772 | 3772 |
| 3773 static void CheckVectorIC(Handle<JSFunction> f, int slot_index, | 3773 static void CheckVectorIC(Handle<JSFunction> f, int slot_index, |
| 3774 InlineCacheState desired_state) { | 3774 InlineCacheState desired_state) { |
| 3775 Handle<TypeFeedbackVector> vector = | 3775 Handle<TypeFeedbackVector> vector = |
| 3776 Handle<TypeFeedbackVector>(f->feedback_vector()); | 3776 Handle<TypeFeedbackVector>(f->feedback_vector()); |
| 3777 FeedbackVectorHelper helper(vector); | 3777 FeedbackVectorHelper helper(vector); |
| 3778 FeedbackVectorSlot slot = helper.slot(slot_index); | 3778 FeedbackVectorSlot slot = helper.slot(slot_index); |
| 3779 if (vector->GetKind(slot) == FeedbackVectorSlotKind::LOAD_IC) { | 3779 if (vector->IsLoadIC(slot)) { |
| 3780 LoadICNexus nexus(vector, slot); | 3780 LoadICNexus nexus(vector, slot); |
| 3781 CHECK(nexus.StateFromFeedback() == desired_state); | 3781 CHECK(nexus.StateFromFeedback() == desired_state); |
| 3782 } else { | 3782 } else { |
| 3783 CHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, vector->GetKind(slot)); | 3783 CHECK(vector->IsKeyedLoadIC(slot)); |
| 3784 KeyedLoadICNexus nexus(vector, slot); | 3784 KeyedLoadICNexus nexus(vector, slot); |
| 3785 CHECK(nexus.StateFromFeedback() == desired_state); | 3785 CHECK(nexus.StateFromFeedback() == desired_state); |
| 3786 } | 3786 } |
| 3787 } | 3787 } |
| 3788 | 3788 |
| 3789 TEST(IncrementalMarkingPreservesMonomorphicConstructor) { | 3789 TEST(IncrementalMarkingPreservesMonomorphicConstructor) { |
| 3790 if (!i::FLAG_incremental_marking) return; | 3790 if (!i::FLAG_incremental_marking) return; |
| 3791 if (i::FLAG_always_opt) return; | 3791 if (i::FLAG_always_opt) return; |
| 3792 CcTest::InitializeVM(); | 3792 CcTest::InitializeVM(); |
| 3793 v8::HandleScope scope(CcTest::isolate()); | 3793 v8::HandleScope scope(CcTest::isolate()); |
| (...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7125 CHECK(!heap->code_space()->FirstPage()->Contains(code->address())); | 7125 CHECK(!heap->code_space()->FirstPage()->Contains(code->address())); |
| 7126 | 7126 |
| 7127 // Ensure it's not in large object space. | 7127 // Ensure it's not in large object space. |
| 7128 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address()); | 7128 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address()); |
| 7129 CHECK(chunk->owner()->identity() != LO_SPACE); | 7129 CHECK(chunk->owner()->identity() != LO_SPACE); |
| 7130 CHECK(chunk->NeverEvacuate()); | 7130 CHECK(chunk->NeverEvacuate()); |
| 7131 } | 7131 } |
| 7132 | 7132 |
| 7133 } // namespace internal | 7133 } // namespace internal |
| 7134 } // namespace v8 | 7134 } // namespace v8 |
| OLD | NEW |