OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 5974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5985 | 5985 |
5986 // Try to convert the key to an index. If successful and within | 5986 // Try to convert the key to an index. If successful and within |
5987 // index return the the argument from the frame. | 5987 // index return the the argument from the frame. |
5988 uint32_t index; | 5988 uint32_t index; |
5989 if (raw_key->ToArrayIndex(&index) && index < n) { | 5989 if (raw_key->ToArrayIndex(&index) && index < n) { |
5990 return frame->GetParameter(index); | 5990 return frame->GetParameter(index); |
5991 } | 5991 } |
5992 | 5992 |
5993 HandleScope scope(isolate); | 5993 HandleScope scope(isolate); |
5994 if (raw_key->IsSymbol()) { | 5994 if (raw_key->IsSymbol()) { |
| 5995 Handle<Symbol> symbol = Handle<Symbol>::cast(raw_key); |
| 5996 if (symbol->Equals(isolate->native_context()->iterator_symbol())) { |
| 5997 return isolate->native_context()->array_values_iterator(); |
| 5998 } |
5995 // Lookup in the initial Object.prototype object. | 5999 // Lookup in the initial Object.prototype object. |
5996 Handle<Object> result; | 6000 Handle<Object> result; |
5997 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 6001 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
5998 isolate, result, | 6002 isolate, result, |
5999 Object::GetProperty(isolate->initial_object_prototype(), | 6003 Object::GetProperty(isolate->initial_object_prototype(), |
6000 Handle<Symbol>::cast(raw_key))); | 6004 Handle<Symbol>::cast(raw_key))); |
6001 return *result; | 6005 return *result; |
6002 } | 6006 } |
6003 | 6007 |
6004 // Convert the key to a string. | 6008 // Convert the key to a string. |
(...skipping 9619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15624 } | 15628 } |
15625 return NULL; | 15629 return NULL; |
15626 } | 15630 } |
15627 | 15631 |
15628 | 15632 |
15629 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15633 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15630 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15634 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15631 } | 15635 } |
15632 | 15636 |
15633 } } // namespace v8::internal | 15637 } } // namespace v8::internal |
OLD | NEW |