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 15687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15698 | 15698 |
15699 Maybe<bool> JSObject::HasRealNamedCallbackProperty(Handle<JSObject> object, | 15699 Maybe<bool> JSObject::HasRealNamedCallbackProperty(Handle<JSObject> object, |
15700 Handle<Name> name) { | 15700 Handle<Name> name) { |
15701 LookupIterator it = LookupIterator::PropertyOrElement( | 15701 LookupIterator it = LookupIterator::PropertyOrElement( |
15702 name->GetIsolate(), object, name, LookupIterator::OWN_SKIP_INTERCEPTOR); | 15702 name->GetIsolate(), object, name, LookupIterator::OWN_SKIP_INTERCEPTOR); |
15703 Maybe<PropertyAttributes> maybe_result = GetPropertyAttributes(&it); | 15703 Maybe<PropertyAttributes> maybe_result = GetPropertyAttributes(&it); |
15704 return maybe_result.IsJust() ? Just(it.state() == LookupIterator::ACCESSOR) | 15704 return maybe_result.IsJust() ? Just(it.state() == LookupIterator::ACCESSOR) |
15705 : Nothing<bool>(); | 15705 : Nothing<bool>(); |
15706 } | 15706 } |
15707 | 15707 |
| 15708 int FixedArrayBase::GetMaxLengthForNewSpaceAllocation(ElementsKind kind) { |
| 15709 return ((Page::kMaxRegularHeapObjectSize - FixedArrayBase::kHeaderSize) >> |
| 15710 ElementsKindToShiftSize(kind)); |
| 15711 } |
15708 | 15712 |
15709 void FixedArray::SwapPairs(FixedArray* numbers, int i, int j) { | 15713 void FixedArray::SwapPairs(FixedArray* numbers, int i, int j) { |
15710 Object* temp = get(i); | 15714 Object* temp = get(i); |
15711 set(i, get(j)); | 15715 set(i, get(j)); |
15712 set(j, temp); | 15716 set(j, temp); |
15713 if (this != numbers) { | 15717 if (this != numbers) { |
15714 temp = numbers->get(i); | 15718 temp = numbers->get(i); |
15715 numbers->set(i, Smi::cast(numbers->get(j))); | 15719 numbers->set(i, Smi::cast(numbers->get(j))); |
15716 numbers->set(j, Smi::cast(temp)); | 15720 numbers->set(j, Smi::cast(temp)); |
15717 } | 15721 } |
(...skipping 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19200 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, | 19204 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, |
19201 PrototypeIterator::END_AT_NULL); | 19205 PrototypeIterator::END_AT_NULL); |
19202 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { | 19206 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { |
19203 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; | 19207 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; |
19204 } | 19208 } |
19205 return false; | 19209 return false; |
19206 } | 19210 } |
19207 | 19211 |
19208 } // namespace internal | 19212 } // namespace internal |
19209 } // namespace v8 | 19213 } // namespace v8 |
OLD | NEW |