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

Unified Diff: src/arguments.h

Issue 314123003: Field layout in class Arguments is incompatible w\ 64-bit archs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 7a6f533e19b417c9090397acc4ba30a95a8885b2..320b6ad6d7d89a264e6593cdb5e0b8556f503da2 100644
--- a/src/arguments.h
+++ b/src/arguments.h
@@ -21,6 +21,9 @@ namespace internal {
// Object* Runtime_function(Arguments args) {
// ... use args[i] here ...
// }
+//
+// Note that length_ (whose value is in the integer range) is defined
+// as intptr_t to provide endian-neutrality on 64-bit archs.
class Arguments BASE_EMBEDDED {
public:
@@ -50,12 +53,12 @@ class Arguments BASE_EMBEDDED {
}
// Get the total number of arguments including the receiver.
- int length() const { return length_; }
+ int length() const { return static_cast<int>(length_); }
Object** arguments() { return arguments_; }
private:
- int length_;
+ intptr_t length_;
Object** arguments_;
};
« 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