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

Unified Diff: src/codegen.h

Issue 1604002: Simple register allocation for ARM. Only top of expression... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 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
Index: src/codegen.h
===================================================================
--- src/codegen.h (revision 4341)
+++ src/codegen.h (working copy)
@@ -229,7 +229,12 @@
Label entry_label_;
Label exit_label_;
- int registers_[RegisterAllocator::kNumRegisters];
+ // C++ doesn't allow zero length arrays, so we make the array length 1 even
+ // if we don't need it.
+ static const int kRegistersArrayLength =
+ (RegisterAllocator::kNumRegisters == 0) ?
+ 1 : RegisterAllocator::kNumRegisters;
+ int registers_[kRegistersArrayLength];
#ifdef DEBUG
const char* comment_;

Powered by Google App Engine
This is Rietveld 408576698