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

Side by Side Diff: runtime/include/dart_api.h

Issue 1569833003: Adds strict compilation flags to Dart_IsolateFlags (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a 3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file. 4 * BSD-style license that can be found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef INCLUDE_DART_API_H_ 7 #ifndef INCLUDE_DART_API_H_
8 #define INCLUDE_DART_API_H_ 8 #define INCLUDE_DART_API_H_
9 9
10 /** \mainpage Dart Embedding API Reference 10 /** \mainpage Dart Embedding API Reference
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 * Current version of flags is encoded in a 32-bit integer with 16 bits used 576 * Current version of flags is encoded in a 32-bit integer with 16 bits used
577 * for each part. 577 * for each part.
578 */ 578 */
579 579
580 #define DART_FLAGS_CURRENT_VERSION (0x00000001) 580 #define DART_FLAGS_CURRENT_VERSION (0x00000001)
581 581
582 typedef struct { 582 typedef struct {
583 int32_t version; 583 int32_t version;
584 bool enable_type_checks; 584 bool enable_type_checks;
585 bool enable_asserts; 585 bool enable_asserts;
586 bool enable_error_on_bad_type;
587 bool enable_error_on_bad_override;
586 } Dart_IsolateFlags; 588 } Dart_IsolateFlags;
587 589
588 /** 590 /**
589 * An isolate creation and initialization callback function. 591 * An isolate creation and initialization callback function.
590 * 592 *
591 * This callback, provided by the embedder, is called when the vm 593 * This callback, provided by the embedder, is called when the vm
592 * needs to create an isolate. The callback should create an isolate 594 * needs to create an isolate. The callback should create an isolate
593 * by calling Dart_CreateIsolate and load any scripts required for 595 * by calling Dart_CreateIsolate and load any scripts required for
594 * execution. 596 * execution.
595 * 597 *
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 * Exits an isolate. After this call, Dart_CurrentIsolate will 903 * Exits an isolate. After this call, Dart_CurrentIsolate will
902 * return NULL. 904 * return NULL.
903 * 905 *
904 * Requires there to be a current isolate. 906 * Requires there to be a current isolate.
905 */ 907 */
906 DART_EXPORT void Dart_ExitIsolate(); 908 DART_EXPORT void Dart_ExitIsolate();
907 /* TODO(turnidge): We don't want users of the api to be able to exit a 909 /* TODO(turnidge): We don't want users of the api to be able to exit a
908 * "pure" dart isolate. Implement and document. */ 910 * "pure" dart isolate. Implement and document. */
909 911
910 /** 912 /**
911 * Enables/Disables strict compilation for the current Isolate.
912 * Strict compilation includes:
913 * - type-checking
914 * - asserts
915 * - errors on bad types
916 * - errors on bad overrides
917 *
918 * This call requires there to be a current isolate, and requires that there has
919 * not yet been any compilation for the current Isolate.
920 */
921 DART_EXPORT Dart_Handle Dart_IsolateSetStrictCompilation(bool value);
922
923 /**
924 * Creates a full snapshot of the current isolate heap. 913 * Creates a full snapshot of the current isolate heap.
925 * 914 *
926 * A full snapshot is a compact representation of the dart vm isolate heap 915 * A full snapshot is a compact representation of the dart vm isolate heap
927 * and dart isolate heap states. These snapshots are used to initialize 916 * and dart isolate heap states. These snapshots are used to initialize
928 * the vm isolate on startup and fast initialization of an isolate. 917 * the vm isolate on startup and fast initialization of an isolate.
929 * A Snapshot of the heap is created before any dart code has executed. 918 * A Snapshot of the heap is created before any dart code has executed.
930 * 919 *
931 * Requires there to be a current isolate. 920 * Requires there to be a current isolate.
932 * 921 *
933 * \param buffer Returns a pointer to a buffer containing the 922 * \param buffer Returns a pointer to a buffer containing the
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 intptr_t* vm_isolate_snapshot_size, 2805 intptr_t* vm_isolate_snapshot_size,
2817 uint8_t** isolate_snapshot_buffer, 2806 uint8_t** isolate_snapshot_buffer,
2818 intptr_t* isolate_snapshot_size, 2807 intptr_t* isolate_snapshot_size,
2819 uint8_t** instructions_snapshot_buffer, 2808 uint8_t** instructions_snapshot_buffer,
2820 intptr_t* instructions_snapshot_size); 2809 intptr_t* instructions_snapshot_size);
2821 2810
2822 2811
2823 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); 2812 DART_EXPORT bool Dart_IsRunningPrecompiledCode();
2824 2813
2825 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2814 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698