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

Unified Diff: src/arguments.h

Issue 308003018: Field layout in class Arguments is incompatible w\ 64-bit archs. Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 6 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
« 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 0e236b40436cb0c4b4383671b207ecd963e4bc8b..b816df77ba87839eb8f22a50b809d920dbb0f3a9 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