| 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 5225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5236 } else if (kind == Code::KEYED_LOAD_IC) { | 5236 } else if (kind == Code::KEYED_LOAD_IC) { |
| 5237 KeyedLoadICNexus nexus(vector, slot); | 5237 KeyedLoadICNexus nexus(vector, slot); |
| 5238 CHECK_EQ(nexus.StateFromFeedback(), state); | 5238 CHECK_EQ(nexus.StateFromFeedback(), state); |
| 5239 } else if (kind == Code::CALL_IC) { | 5239 } else if (kind == Code::CALL_IC) { |
| 5240 CallICNexus nexus(vector, slot); | 5240 CallICNexus nexus(vector, slot); |
| 5241 CHECK_EQ(nexus.StateFromFeedback(), state); | 5241 CHECK_EQ(nexus.StateFromFeedback(), state); |
| 5242 } | 5242 } |
| 5243 } else { | 5243 } else { |
| 5244 Code* ic = FindFirstIC(function->code(), kind); | 5244 Code* ic = FindFirstIC(function->code(), kind); |
| 5245 CHECK(ic->is_inline_cache_stub()); | 5245 CHECK(ic->is_inline_cache_stub()); |
| 5246 CHECK(ic->ic_state() == state); | 5246 CHECK(!IC::ICUseVector(kind)); |
| 5247 CHECK_EQ(state, IC::StateFromCode(ic)); |
| 5247 } | 5248 } |
| 5248 } | 5249 } |
| 5249 | 5250 |
| 5250 | 5251 |
| 5251 TEST(MonomorphicStaysMonomorphicAfterGC) { | 5252 TEST(MonomorphicStaysMonomorphicAfterGC) { |
| 5252 if (FLAG_always_opt) return; | 5253 if (FLAG_always_opt) return; |
| 5253 CcTest::InitializeVM(); | 5254 CcTest::InitializeVM(); |
| 5254 Isolate* isolate = CcTest::i_isolate(); | 5255 Isolate* isolate = CcTest::i_isolate(); |
| 5255 Heap* heap = isolate->heap(); | 5256 Heap* heap = isolate->heap(); |
| 5256 v8::HandleScope scope(CcTest::isolate()); | 5257 v8::HandleScope scope(CcTest::isolate()); |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6755 CHECK(marking->IsComplete()); | 6756 CHECK(marking->IsComplete()); |
| 6756 intptr_t size_before = heap->SizeOfObjects(); | 6757 intptr_t size_before = heap->SizeOfObjects(); |
| 6757 CcTest::heap()->CollectAllGarbage(); | 6758 CcTest::heap()->CollectAllGarbage(); |
| 6758 intptr_t size_after = heap->SizeOfObjects(); | 6759 intptr_t size_after = heap->SizeOfObjects(); |
| 6759 // Live size does not increase after garbage collection. | 6760 // Live size does not increase after garbage collection. |
| 6760 CHECK_LE(size_after, size_before); | 6761 CHECK_LE(size_after, size_before); |
| 6761 } | 6762 } |
| 6762 | 6763 |
| 6763 } // namespace internal | 6764 } // namespace internal |
| 6764 } // namespace v8 | 6765 } // namespace v8 |
| OLD | NEW |