#include "src/v8.h"
#include "src/compilation-cache.h"
+#include "src/deoptimizer.h"
#include "src/execution.h"
#include "src/factory.h"
#include "src/global-handles.h"
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
+ // Get a clean slate regarding optimized functions on the heap.
+ i::Deoptimizer::DeoptimizeAll(isolate);
+ heap->CollectAllGarbage();
+
if (!isolate->use_crankshaft()) return;
HandleScope outer_scope(heap->isolate());
for (int i = 0; i < 3; i++) {