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

Unified Diff: runtime/vm/zone.h

Issue 10377104: Compute assigned variables and dominance frontiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/intermediate_language.cc ('K') | « runtime/vm/vm_sources.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone.h
diff --git a/runtime/vm/zone.h b/runtime/vm/zone.h
index 8c5677a3ccd7770ea0950321ef0f02b8bccead29..291d44f7653f12e216b7cc92d46a898d56e234e4 100644
--- a/runtime/vm/zone.h
+++ b/runtime/vm/zone.h
@@ -108,6 +108,12 @@ class Zone : public StackResource {
// allocating new segments of memory on demand using 'new'.
uword Allocate(intptr_t size) { return zone_.Allocate(size); }
+ // Allocate space for an array of 'length' elements of type T.
+ template <typename T>
+ T* AllocateArray(intptr_t length) {
+ return reinterpret_cast<T*>(Allocate(length * sizeof(T)));
+ }
srdjan 2012/05/12 00:00:55 Remove this code. Do the appropriate allocation co
Kevin Millikin (Google) 2012/05/15 11:51:44 OK, but I'm not sure why. Avoiding reinterpret_ca
srdjan 2012/05/15 22:05:32 I think there is only one place that needs it, the
+
// Allocate 'new_size' bytes of memory and copies 'old_size' bytes from
// 'data' into new allocated memory. Uses current zone.
uword Reallocate(uword data, intptr_t old_size, intptr_t new_size) {
« runtime/vm/intermediate_language.cc ('K') | « runtime/vm/vm_sources.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698