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

Side by Side Diff: runtime/vm/unit_test.h

Issue 1023753006: First step towards splitting a full snapshot into a vm isolate snapshot and a (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_UNIT_TEST_H_ 5 #ifndef VM_UNIT_TEST_H_
6 #define VM_UNIT_TEST_H_ 6 #define VM_UNIT_TEST_H_
7 7
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 9
10 #include "platform/globals.h" 10 #include "platform/globals.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 211
212 namespace dart { 212 namespace dart {
213 213
214 // Forward declarations. 214 // Forward declarations.
215 class Assembler; 215 class Assembler;
216 class CodeGenerator; 216 class CodeGenerator;
217 class VirtualMemory; 217 class VirtualMemory;
218 218
219 219
220 // snapshot_buffer points to a snapshot if we link in a snapshot otherwise
221 // it is initialized to NULL.
222 namespace bin { 220 namespace bin {
223 extern const uint8_t* snapshot_buffer; 221 // vm_isolate_snapshot_buffer points to a snapshot for the vm isolate if we
222 // link in a snapshot otherwise it is initialized to NULL.
223 extern const uint8_t* vm_isolate_snapshot_buffer;
224
225 // isolate_snapshot_buffer points to a snapshot for an isolate if we link in a
226 // snapshot otherwise it is initialized to NULL.
227 extern const uint8_t* isolate_snapshot_buffer;
224 } 228 }
225 229
226 230
227 class TestCaseBase { 231 class TestCaseBase {
228 public: 232 public:
229 explicit TestCaseBase(const char* name); 233 explicit TestCaseBase(const char* name);
230 virtual ~TestCaseBase() { } 234 virtual ~TestCaseBase() { }
231 235
232 const char* name() const { return name_; } 236 const char* name() const { return name_; }
233 237
(...skipping 28 matching lines...) Expand all
262 266
263 static Dart_Handle LoadCoreTestScript(const char* script, 267 static Dart_Handle LoadCoreTestScript(const char* script,
264 Dart_NativeEntryResolver resolver); 268 Dart_NativeEntryResolver resolver);
265 static Dart_Handle lib(); 269 static Dart_Handle lib();
266 static const char* url() { return USER_TEST_URI; } 270 static const char* url() { return USER_TEST_URI; }
267 static Dart_Isolate CreateTestIsolateFromSnapshot( 271 static Dart_Isolate CreateTestIsolateFromSnapshot(
268 uint8_t* buffer, const char* name = NULL) { 272 uint8_t* buffer, const char* name = NULL) {
269 return CreateIsolate(buffer, name); 273 return CreateIsolate(buffer, name);
270 } 274 }
271 static Dart_Isolate CreateTestIsolate(const char* name = NULL) { 275 static Dart_Isolate CreateTestIsolate(const char* name = NULL) {
272 return CreateIsolate(bin::snapshot_buffer, name); 276 return CreateIsolate(bin::isolate_snapshot_buffer, name);
273 } 277 }
274 static Dart_Handle library_handler(Dart_LibraryTag tag, 278 static Dart_Handle library_handler(Dart_LibraryTag tag,
275 Dart_Handle library, 279 Dart_Handle library,
276 Dart_Handle url); 280 Dart_Handle url);
277 static char* BigintToHexValue(Dart_CObject* bigint); 281 static char* BigintToHexValue(Dart_CObject* bigint);
278 282
279 virtual void Run(); 283 virtual void Run();
280 284
281 private: 285 private:
282 static Dart_Isolate CreateIsolate(const uint8_t* buffer, 286 static Dart_Isolate CreateIsolate(const uint8_t* buffer,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } \ 423 } \
420 } else { \ 424 } else { \
421 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ 425 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \
422 #handle); \ 426 #handle); \
423 } \ 427 } \
424 } while (0) 428 } while (0)
425 429
426 } // namespace dart 430 } // namespace dart
427 431
428 #endif // VM_UNIT_TEST_H_ 432 #endif // VM_UNIT_TEST_H_
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698