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

Unified Diff: src/arguments.h

Issue 15855015: Array access fix: g++ darwin 4.2.1 compiler clamped array index to 0 when confronted with negative … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arguments.h
diff --git a/src/arguments.h b/src/arguments.h
index e13ddc9ec83f0f69e1bdb53d00a18ca9b5522310..4eac1136ca30e5d86a9f57a6e3938c6247c812a3 100644
--- a/src/arguments.h
+++ b/src/arguments.h
@@ -52,7 +52,8 @@ class Arguments BASE_EMBEDDED {
Object*& operator[] (int index) {
ASSERT(0 <= index && index < length_);
- return arguments_[-index];
+ return *(reinterpret_cast<Object**>(reinterpret_cast<intptr_t>(arguments_) -
Jakob Kummerow 2013/06/10 14:43:38 The minus at the end of the line looks weird. I'd
+ index * kPointerSize));
}
template <class S> Handle<S> at(int index) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698