| 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 15852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15863 Maybe<bool> JSObject::HasRealNamedCallbackProperty(Handle<JSObject> object, | 15863 Maybe<bool> JSObject::HasRealNamedCallbackProperty(Handle<JSObject> object, |
| 15864 Handle<Name> name) { | 15864 Handle<Name> name) { |
| 15865 LookupIterator it = LookupIterator::PropertyOrElement( | 15865 LookupIterator it = LookupIterator::PropertyOrElement( |
| 15866 name->GetIsolate(), object, name, LookupIterator::OWN_SKIP_INTERCEPTOR); | 15866 name->GetIsolate(), object, name, LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 15867 Maybe<PropertyAttributes> maybe_result = GetPropertyAttributes(&it); | 15867 Maybe<PropertyAttributes> maybe_result = GetPropertyAttributes(&it); |
| 15868 return maybe_result.IsJust() ? Just(it.state() == LookupIterator::ACCESSOR) | 15868 return maybe_result.IsJust() ? Just(it.state() == LookupIterator::ACCESSOR) |
| 15869 : Nothing<bool>(); | 15869 : Nothing<bool>(); |
| 15870 } | 15870 } |
| 15871 | 15871 |
| 15872 int FixedArrayBase::GetMaxLengthForNewSpaceAllocation(ElementsKind kind) { | 15872 int FixedArrayBase::GetMaxLengthForNewSpaceAllocation(ElementsKind kind) { |
| 15873 return ((Page::kMaxRegularHeapObjectSize - FixedArrayBase::kHeaderSize) >> | 15873 return ((kMaxRegularHeapObjectSize - FixedArrayBase::kHeaderSize) >> |
| 15874 ElementsKindToShiftSize(kind)); | 15874 ElementsKindToShiftSize(kind)); |
| 15875 } | 15875 } |
| 15876 | 15876 |
| 15877 void FixedArray::SwapPairs(FixedArray* numbers, int i, int j) { | 15877 void FixedArray::SwapPairs(FixedArray* numbers, int i, int j) { |
| 15878 Object* temp = get(i); | 15878 Object* temp = get(i); |
| 15879 set(i, get(j)); | 15879 set(i, get(j)); |
| 15880 set(j, temp); | 15880 set(j, temp); |
| 15881 if (this != numbers) { | 15881 if (this != numbers) { |
| 15882 temp = numbers->get(i); | 15882 temp = numbers->get(i); |
| 15883 numbers->set(i, Smi::cast(numbers->get(j))); | 15883 numbers->set(i, Smi::cast(numbers->get(j))); |
| (...skipping 3533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19417 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, | 19417 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, |
| 19418 PrototypeIterator::END_AT_NULL); | 19418 PrototypeIterator::END_AT_NULL); |
| 19419 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { | 19419 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { |
| 19420 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; | 19420 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; |
| 19421 } | 19421 } |
| 19422 return false; | 19422 return false; |
| 19423 } | 19423 } |
| 19424 | 19424 |
| 19425 } // namespace internal | 19425 } // namespace internal |
| 19426 } // namespace v8 | 19426 } // namespace v8 |
| OLD | NEW |