Revert "Create isolate from the platform kernel when running VM tests under dartk."

This reverts commit 3e967d3d76aef0e15f433a226c32672444af4b71.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Create isolate from the platform kernel when running VM tests under dartk.
> 
> Status of tests which now start failing has been updated.
> 
> Ability to run the vm tests in strong mode has also been added. The
> status of tests which fail in strong mode will be updated when the vm
> tests are moved under the strong mode tests on the bots.
> 
> Change-Id: I95f94c09dd0ebbf1fe661ee1f6e0c3e7b07509bd
> Reviewed-on: https://dart-review.googlesource.com/40642
> Commit-Queue: Siva Chandra <sivachandra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=sivachandra@google.com,asiva@google.com

Change-Id: I6144bbe882cdf56ee6be3132c6f9dec2cbafcb47
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/41026
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 27c5806..efc087b 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -1137,6 +1137,8 @@
 
   sources = [
               "builtin_nolib.cc",
+              "dfe.cc",
+              "dfe.h",
               "error_exit.cc",
               "error_exit.h",
               "run_vm_tests.cc",
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index 6246c4a..9cc4ada 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -28,6 +28,10 @@
 // TODO(iposva, asiva): This is a placeholder for the real unittest framework.
 namespace dart {
 
+namespace bin {
+DFE dfe;
+}
+
 // Defined in vm/os_thread_win.cc
 extern bool private_flag_windows_run_tls_destructors;
 
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index c2d0b53..ee0eaf1 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -163,7 +163,7 @@
 
 [ $compiler == dartk && $mode == debug && $runtime == vm ]
 cc/InjectNativeFields1: Crash
-cc/PrintJSON: Crash
+cc/InjectNativeFields3: Crash
 cc/Service_TokenStream: Crash
 
 # Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
@@ -174,13 +174,18 @@
 
 [ $compiler == dartk && $mode == release && $runtime == vm ]
 cc/InjectNativeFields1: Fail
+cc/InjectNativeFields3: Fail
 cc/Service_TokenStream: Fail
 
 [ $compiler == dartk && $runtime == vm ]
 cc/CanonicalizationInScriptSnapshots: Fail
 cc/Class_ComputeEndTokenPos: Crash
 cc/DartAPI_CurrentStackTraceInfo: Fail
+cc/DartAPI_ImplicitNativeFieldAccess: Crash
 cc/DartAPI_InjectNativeFields1: Skip
+cc/DartAPI_InjectNativeFields3: Crash
+cc/DartAPI_InjectNativeFields4: Crash
+cc/DartAPI_InjectNativeFieldsSuperClass: Crash
 cc/DartAPI_InvokeNoSuchMethod: Fail
 cc/DartAPI_Invoke_CrossLibrary: Crash
 cc/DartAPI_IsolateShutdownRunDartCode: Skip # Flaky
@@ -195,11 +200,13 @@
 cc/DartAPI_LoadSource_LateLoad: Crash
 cc/DartAPI_LookupLibrary: Crash
 cc/DartAPI_NativeFieldAccess: Fail
+cc/DartAPI_NegativeNativeFieldInIsolateMessage: Crash
 cc/DartAPI_ParsePatchLibrary: Crash
 cc/DartAPI_PropagateError: Fail
 cc/DartAPI_StackOverflowStackTraceInfoArrowFunction: Fail
 cc/DartAPI_StackOverflowStackTraceInfoBraceFunction1: Fail
 cc/DartAPI_StackOverflowStackTraceInfoBraceFunction2: Fail
+cc/DartAPI_TestNativeFieldsAccess: Crash
 cc/DebuggerAPI_BreakpointStubPatching: Fail
 cc/DebuggerAPI_GetClosureInfo: Fail
 cc/DebuggerAPI_InterruptIsolate: SkipSlow
@@ -210,7 +217,6 @@
 cc/Debugger_Rewind_Optimized: SkipSlow
 cc/Debugger_SetBreakpointInPartOfLibrary: Crash
 cc/FunctionSourceFingerprint: Fail
-cc/GenerateSource: Skip # We cannot generate source from kernel data.
 cc/IsolateReload_BadClass: Fail
 cc/IsolateReload_ChangeInstanceFormat1: Skip
 cc/IsolateReload_ChangeInstanceFormat3: Skip
@@ -278,7 +284,7 @@
 cc/SourceReport_CallSites_PolymorphicCall: Fail
 cc/SourceReport_CallSites_SimpleCall: Fail
 cc/SourceReport_Coverage_AllFunctions: Fail
-cc/SourceReport_Coverage_AllFunctions_ForceCompile: Crash
+cc/SourceReport_Coverage_AllFunctions_ForceCompile: Fail
 cc/SourceReport_Coverage_ForceCompile: Fail
 cc/SourceReport_Coverage_NestedFunctions: Fail
 cc/SourceReport_Coverage_NoCalls: Fail
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 99ae8e9..574e44f 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -27,27 +27,13 @@
 using dart::bin::Builtin;
 using dart::bin::DartUtils;
 
-extern "C" {
-extern const uint8_t kPlatformDill[];
-extern const uint8_t kPlatformStrongDill[];
-extern intptr_t kPlatformDillSize;
-extern intptr_t kPlatformStrongDillSize;
-}
-
 namespace dart {
 
-const uint8_t* platform_dill = kPlatformDill;
-const uint8_t* platform_strong_dill = kPlatformStrongDill;
-const intptr_t platform_dill_size = kPlatformDillSize;
-const intptr_t platform_strong_dill_size = kPlatformStrongDillSize;
-
 DEFINE_FLAG(bool,
             use_dart_frontend,
             false,
             "Parse scripts with Dart-to-Kernel parser");
 
-DECLARE_FLAG(bool, strong);
-
 TestCaseBase* TestCaseBase::first_ = NULL;
 TestCaseBase* TestCaseBase::tail_ = NULL;
 
@@ -81,29 +67,13 @@
   }
 }
 
-static void NoopRelease(uint8_t* data) {}
-
-Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer,
-                                     intptr_t len,
-                                     const char* name,
-                                     bool is_snapshot) {
+Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer, const char* name) {
   char* err;
   Dart_IsolateFlags api_flags;
   Isolate::FlagsInitialize(&api_flags);
   api_flags.use_dart_frontend = FLAG_use_dart_frontend;
-  Dart_Isolate isolate = NULL;
-  if (is_snapshot) {
-    isolate =
-        Dart_CreateIsolate(name, NULL, buffer, NULL, &api_flags, NULL, &err);
-  } else {
-    kernel::Program* program = reinterpret_cast<kernel::Program*>(
-        Dart_ReadKernelBinary(buffer, len, NoopRelease));
-    if (program != NULL) {
-      isolate = Dart_CreateIsolateFromKernel(name, NULL, program, &api_flags,
-                                             NULL, &err);
-      delete program;
-    }
-  }
+  Dart_Isolate isolate =
+      Dart_CreateIsolate(name, NULL, buffer, NULL, &api_flags, NULL, &err);
   if (isolate == NULL) {
     OS::Print("Creation of isolate failed '%s'\n", err);
     free(err);
@@ -112,19 +82,6 @@
   return isolate;
 }
 
-Dart_Isolate TestCase::CreateTestIsolate(const char* name) {
-  if (FLAG_use_dart_frontend) {
-    return CreateIsolate(
-        FLAG_strong ? platform_strong_dill : platform_dill,
-        FLAG_strong ? platform_strong_dill_size : platform_dill_size, name,
-        false /* buffer is not a snapshot */);
-  } else {
-    return CreateIsolate(bin::core_isolate_snapshot_data,
-                         0 /* Snapshots have length encoded within them. */,
-                         name, true /* buffer is a snapshot */);
-  }
-}
-
 static const char* kPackageScheme = "package:";
 
 static bool IsPackageSchemeURL(const char* url_name) {
@@ -242,8 +199,7 @@
                                          bool incrementally) {
   Zone* zone = Thread::Current()->zone();
   Dart_KernelCompilationResult compilation_result = Dart_CompileSourcesToKernel(
-      url, FLAG_strong ? platform_strong_dill : platform_dill,
-      FLAG_strong ? platform_strong_dill_size : platform_dill_size,
+      url, NULL /* platform binary can be found at the default location */, 0,
       sourcefiles_count, sourcefiles, incrementally);
 
   if (compilation_result.status != Dart_KernelCompilationStatus_Ok) {
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index 1f745c5..1f7fc8f 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -332,9 +332,11 @@
   static const char* url();
   static Dart_Isolate CreateTestIsolateFromSnapshot(uint8_t* buffer,
                                                     const char* name = NULL) {
-    return CreateIsolate(buffer, 0, name, true);
+    return CreateIsolate(buffer, name);
   }
-  static Dart_Isolate CreateTestIsolate(const char* name = NULL);
+  static Dart_Isolate CreateTestIsolate(const char* name = NULL) {
+    return CreateIsolate(bin::core_isolate_snapshot_data, name);
+  }
   static Dart_Handle library_handler(Dart_LibraryTag tag,
                                      Dart_Handle library,
                                      Dart_Handle url);
@@ -359,14 +361,7 @@
   static const char* GetTestLib(const char* url);
 
  private:
-  // |buffer| can either be snapshot data, or kernel binary data.
-  // If |buffer| is snapshot data, then |is_snapshot| must be true. Otherwise,
-  // buffer will be treated as a kernel binary (but CreateIsolate will not
-  // take ownership of the buffer).
-  static Dart_Isolate CreateIsolate(const uint8_t* buffer,
-                                    intptr_t len,
-                                    const char* name,
-                                    bool is_snapshot);
+  static Dart_Isolate CreateIsolate(const uint8_t* buffer, const char* name);
 
   RunEntry* const run_;
 };
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 8d9b5df..e82a650 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -494,10 +494,6 @@
       args.insert(0, '--dfe=$buildDir/gen/kernel-service.dart.snapshot');
     }
 
-    if (configuration.isStrong) {
-      args.add('--strong');
-    }
-
     args.add(testName);
 
     var command = Command.process(