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

Unified Diff: src/runtime.cc

Issue 342453002: Arguments object has @@iterator (Closed) Base URL: https://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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 927386289ac392254281077665c980768294f946..bbfd443b7505380b9c04d826dcee6d32abeaec8c 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6090,6 +6090,11 @@ RUNTIME_FUNCTION(Runtime_GetArgumentsProperty) {
HandleScope scope(isolate);
if (raw_key->IsSymbol()) {
+ Handle<Symbol> symbol = Handle<Symbol>::cast(raw_key);
+ if (FLAG_harmony_iteration &&
+ symbol->Equals(isolate->native_context()->iterator_symbol())) {
+ return isolate->native_context()->array_values_iterator();
+ }
// Lookup in the initial Object.prototype object.
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
@@ -6141,6 +6146,25 @@ RUNTIME_FUNCTION(Runtime_GetArgumentsProperty) {
}
+RUNTIME_FUNCTION(Runtime_GetArgumentsBoilerplateObject) {
+ HandleScope scope(isolate);
+ ASSERT(args.length() == 1);
+ CONVERT_SMI_ARG_CHECKED(index, 0);
+ RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
+
+ switch (index) {
+ case 0:
+ return isolate->native_context()->sloppy_arguments_boilerplate();
+ case 1:
+ return isolate->native_context()->aliased_arguments_boilerplate();
+ case 2:
+ return isolate->native_context()->strict_arguments_boilerplate();
+ default:
+ return isolate->ThrowIllegalOperation();
+ }
+}
+
+
RUNTIME_FUNCTION(Runtime_ToFastProperties) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);

Powered by Google App Engine
This is Rietveld 408576698