OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 15675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15686 | 15686 |
15687 Maybe<bool> JSObject::HasRealNamedCallbackProperty(Handle<JSObject> object, | 15687 Maybe<bool> JSObject::HasRealNamedCallbackProperty(Handle<JSObject> object, |
15688 Handle<Name> name) { | 15688 Handle<Name> name) { |
15689 LookupIterator it = LookupIterator::PropertyOrElement( | 15689 LookupIterator it = LookupIterator::PropertyOrElement( |
15690 name->GetIsolate(), object, name, LookupIterator::OWN_SKIP_INTERCEPTOR); | 15690 name->GetIsolate(), object, name, LookupIterator::OWN_SKIP_INTERCEPTOR); |
15691 Maybe<PropertyAttributes> maybe_result = GetPropertyAttributes(&it); | 15691 Maybe<PropertyAttributes> maybe_result = GetPropertyAttributes(&it); |
15692 return maybe_result.IsJust() ? Just(it.state() == LookupIterator::ACCESSOR) | 15692 return maybe_result.IsJust() ? Just(it.state() == LookupIterator::ACCESSOR) |
15693 : Nothing<bool>(); | 15693 : Nothing<bool>(); |
15694 } | 15694 } |
15695 | 15695 |
| 15696 int FixedArrayBase::GetMaxLengthForNewSpaceAllocation(ElementsKind kind) { |
| 15697 return ((Page::kMaxRegularHeapObjectSize - FixedArrayBase::kHeaderSize) >> |
| 15698 ElementsKindToShiftSize(kind)); |
| 15699 } |
15696 | 15700 |
15697 void FixedArray::SwapPairs(FixedArray* numbers, int i, int j) { | 15701 void FixedArray::SwapPairs(FixedArray* numbers, int i, int j) { |
15698 Object* temp = get(i); | 15702 Object* temp = get(i); |
15699 set(i, get(j)); | 15703 set(i, get(j)); |
15700 set(j, temp); | 15704 set(j, temp); |
15701 if (this != numbers) { | 15705 if (this != numbers) { |
15702 temp = numbers->get(i); | 15706 temp = numbers->get(i); |
15703 numbers->set(i, Smi::cast(numbers->get(j))); | 15707 numbers->set(i, Smi::cast(numbers->get(j))); |
15704 numbers->set(j, Smi::cast(temp)); | 15708 numbers->set(j, Smi::cast(temp)); |
15705 } | 15709 } |
(...skipping 3493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19199 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, | 19203 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, |
19200 PrototypeIterator::END_AT_NULL); | 19204 PrototypeIterator::END_AT_NULL); |
19201 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { | 19205 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { |
19202 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; | 19206 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; |
19203 } | 19207 } |
19204 return false; | 19208 return false; |
19205 } | 19209 } |
19206 | 19210 |
19207 } // namespace internal | 19211 } // namespace internal |
19208 } // namespace v8 | 19212 } // namespace v8 |
OLD | NEW |