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

Unified Diff: runtime/platform/allocation.h

Issue 2715463003: Add option to gen_snapshot for creating a Makefile describing a snapshot's dependencies. (Closed)
Patch Set: . Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice/loader.dart ('k') | runtime/platform/growable_array.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/allocation.h
diff --git a/runtime/platform/allocation.h b/runtime/platform/allocation.h
new file mode 100644
index 0000000000000000000000000000000000000000..40f2fd1315616df31eb9b5e3516d536c1f10040e
--- /dev/null
+++ b/runtime/platform/allocation.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_PLATFORM_ALLOCATION_H_
+#define RUNTIME_PLATFORM_ALLOCATION_H_
+
+#include "platform/assert.h"
+
+namespace dart {
+
+// Stack allocated objects subclass from this base class. Objects of this type
+// cannot be allocated on either the C or object heaps. Destructors for objects
+// of this type will not be run unless the stack is unwound through normal
+// program control flow.
+class ValueObject {
+ public:
+ ValueObject() {}
+ ~ValueObject() {}
+
+ private:
+ DISALLOW_ALLOCATION();
+ DISALLOW_COPY_AND_ASSIGN(ValueObject);
+};
+
+
+// Static allocated classes only contain static members and can never
+// be instantiated in the heap or on the stack.
+class AllStatic {
+ private:
+ DISALLOW_ALLOCATION();
+ DISALLOW_IMPLICIT_CONSTRUCTORS(AllStatic);
+};
+
+} // namespace dart
+
+#endif // RUNTIME_PLATFORM_ALLOCATION_H_
« no previous file with comments | « runtime/bin/vmservice/loader.dart ('k') | runtime/platform/growable_array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698