| 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 "src/builtins.h" | 5 #include "src/builtins.h" |
| 6 | 6 |
| 7 #include "src/api-arguments.h" | 7 #include "src/api-arguments.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 inline bool HasOnlySimpleReceiverElements(Isolate* isolate, | 266 inline bool HasOnlySimpleReceiverElements(Isolate* isolate, |
| 267 JSObject* receiver) { | 267 JSObject* receiver) { |
| 268 // Check that we have no accessors on the receiver's elements. | 268 // Check that we have no accessors on the receiver's elements. |
| 269 if (!HasSimpleElements(receiver)) return false; | 269 if (!HasSimpleElements(receiver)) return false; |
| 270 return PrototypeHasNoElements(isolate, receiver); | 270 return PrototypeHasNoElements(isolate, receiver); |
| 271 } | 271 } |
| 272 | 272 |
| 273 inline bool HasOnlySimpleElements(Isolate* isolate, JSReceiver* receiver) { | 273 inline bool HasOnlySimpleElements(Isolate* isolate, JSReceiver* receiver) { |
| 274 DisallowHeapAllocation no_gc; | 274 DisallowHeapAllocation no_gc; |
| 275 PrototypeIterator iter(isolate, receiver, | 275 PrototypeIterator iter(isolate, receiver, kStartAtReceiver); |
| 276 PrototypeIterator::START_AT_RECEIVER); | |
| 277 for (; !iter.IsAtEnd(); iter.Advance()) { | 276 for (; !iter.IsAtEnd(); iter.Advance()) { |
| 278 if (iter.GetCurrent()->IsJSProxy()) return false; | 277 if (iter.GetCurrent()->IsJSProxy()) return false; |
| 279 JSObject* current = iter.GetCurrent<JSObject>(); | 278 JSObject* current = iter.GetCurrent<JSObject>(); |
| 280 if (!HasSimpleElements(current)) return false; | 279 if (!HasSimpleElements(current)) return false; |
| 281 } | 280 } |
| 282 return true; | 281 return true; |
| 283 } | 282 } |
| 284 | 283 |
| 285 // Returns |false| if not applicable. | 284 // Returns |false| if not applicable. |
| 286 MUST_USE_RESULT | 285 MUST_USE_RESULT |
| (...skipping 5647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5934 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) | 5933 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) |
| 5935 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 5934 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 5936 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 5935 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 5937 #undef DEFINE_BUILTIN_ACCESSOR_C | 5936 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 5938 #undef DEFINE_BUILTIN_ACCESSOR_A | 5937 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 5939 #undef DEFINE_BUILTIN_ACCESSOR_T | 5938 #undef DEFINE_BUILTIN_ACCESSOR_T |
| 5940 #undef DEFINE_BUILTIN_ACCESSOR_H | 5939 #undef DEFINE_BUILTIN_ACCESSOR_H |
| 5941 | 5940 |
| 5942 } // namespace internal | 5941 } // namespace internal |
| 5943 } // namespace v8 | 5942 } // namespace v8 |
| OLD | NEW |