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

Unified Diff: src/arguments.h

Issue 7003114: Added two convenience methods to access an int/double argument from within a (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arguments.h
===================================================================
--- src/arguments.h (revision 8259)
+++ src/arguments.h (working copy)
@@ -63,6 +63,14 @@
return Handle<S>(reinterpret_cast<S**>(value));
}
+ int smi_at(int index) {
+ return Smi::cast((*this)[index])->value();
+ }
+
+ double number_at(int index) {
+ return (*this)[index]->Number();
+ }
+
// Get the total number of arguments including the receiver.
int length() const { return length_; }
« no previous file with comments | « no previous file | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698