Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: runtime/bin/run_vm_tests.cc

Issue 2901163002: Use assembly instead of C array literals to link the core snapshot into the VM. (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "bin/dartutils.h" 7 #include "bin/dartutils.h"
8 #include "bin/file.h" 8 #include "bin/file.h"
9 #include "bin/loader.h" 9 #include "bin/loader.h"
10 #include "bin/platform.h" 10 #include "bin/platform.h"
11 #include "bin/snapshot_utils.h" 11 #include "bin/snapshot_utils.h"
12 #include "platform/assert.h" 12 #include "platform/assert.h"
13 #include "vm/benchmark_test.h" 13 #include "vm/benchmark_test.h"
14 #include "vm/dart.h" 14 #include "vm/dart.h"
15 #include "vm/unit_test.h" 15 #include "vm/unit_test.h"
16 16
17 extern "C" {
18 extern const uint8_t kDartVmSnapshotData[];
19 extern const uint8_t kDartVmSnapshotInstructions[];
20 extern const uint8_t kDartCoreIsolateSnapshotData[];
21 extern const uint8_t kDartCoreIsolateSnapshotInstructions[];
22 }
17 23
18 // TODO(iposva, asiva): This is a placeholder for the real unittest framework. 24 // TODO(iposva, asiva): This is a placeholder for the real unittest framework.
19 namespace dart { 25 namespace dart {
20 26
21 // Defined in vm/os_thread_win.cc 27 // Defined in vm/os_thread_win.cc
22 extern bool private_flag_windows_run_tls_destructors; 28 extern bool private_flag_windows_run_tls_destructors;
23 29
24 // vm_snapshot_data_buffer points to a snapshot for the vm isolate if we 30 // Snapshot pieces when we link in a snapshot.
25 // link in a snapshot otherwise it is initialized to NULL. 31 const uint8_t* bin::vm_snapshot_data = kDartVmSnapshotData;
zra 2017/05/24 16:20:25 #if defined(DART_NO_SNAPSHOT) #error "run_vm_tests
rmacnak 2017/05/24 19:26:45 Done.
26 extern const uint8_t* bin::vm_snapshot_data; 32 const uint8_t* bin::vm_snapshot_instructions = kDartVmSnapshotInstructions;
27 extern const uint8_t* bin::vm_snapshot_instructions; 33 const uint8_t* bin::core_isolate_snapshot_data = kDartCoreIsolateSnapshotData;
34 const uint8_t* bin::core_isolate_snapshot_instructions =
35 kDartCoreIsolateSnapshotInstructions;
28 36
29 // Only run tests that match the filter string. The default does not match any 37 // Only run tests that match the filter string. The default does not match any
30 // tests. 38 // tests.
31 static const char* const kNone = "No Test or Benchmarks"; 39 static const char* const kNone = "No Test or Benchmarks";
32 static const char* const kList = "List all Tests and Benchmarks"; 40 static const char* const kList = "List all Tests and Benchmarks";
33 static const char* const kAllBenchmarks = "All Benchmarks"; 41 static const char* const kAllBenchmarks = "All Benchmarks";
34 static const char* run_filter = kNone; 42 static const char* run_filter = kNone;
35 static const char* kernel_snapshot = NULL; 43 static const char* kernel_snapshot = NULL;
36 44
37 static int run_matches = 0; 45 static int run_matches = 0;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 263 }
256 return 0; 264 return 0;
257 } 265 }
258 266
259 } // namespace dart 267 } // namespace dart
260 268
261 269
262 int main(int argc, const char** argv) { 270 int main(int argc, const char** argv) {
263 dart::bin::Platform::Exit(dart::Main(argc, argv)); 271 dart::bin::Platform::Exit(dart::Main(argc, argv));
264 } 272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698