OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 PropertyDetails original_details = property_dictionary->DetailsAt(entry); | 1276 PropertyDetails original_details = property_dictionary->DetailsAt(entry); |
1277 int enumeration_index = original_details.dictionary_index(); | 1277 int enumeration_index = original_details.dictionary_index(); |
1278 DCHECK(enumeration_index > 0); | 1278 DCHECK(enumeration_index > 0); |
1279 details = details.set_index(enumeration_index); | 1279 details = details.set_index(enumeration_index); |
1280 property_dictionary->SetEntry(entry, name, value, details); | 1280 property_dictionary->SetEntry(entry, name, value, details); |
1281 } | 1281 } |
1282 } | 1282 } |
1283 } | 1283 } |
1284 | 1284 |
1285 | 1285 |
1286 bool Object::HasInPrototypeChain(Isolate* isolate, Object* target) { | 1286 Maybe<bool> Object::HasInPrototypeChain(Isolate* isolate, Handle<Object> object, |
1287 PrototypeIterator iter(isolate, this, PrototypeIterator::START_AT_RECEIVER); | 1287 Handle<Object> proto) { |
| 1288 PrototypeIterator iter(isolate, object, PrototypeIterator::START_AT_RECEIVER); |
1288 while (true) { | 1289 while (true) { |
1289 iter.AdvanceIgnoringProxies(); | 1290 if (!iter.AdvanceFollowingProxies()) return Nothing<bool>(); |
1290 if (iter.IsAtEnd()) return false; | 1291 if (iter.IsAtEnd()) return Just(false); |
1291 if (iter.IsAtEnd(target)) return true; | 1292 if (iter.IsAtEnd(proto)) return Just(true); |
1292 } | 1293 } |
1293 } | 1294 } |
1294 | 1295 |
1295 | 1296 |
1296 Map* Object::GetRootMap(Isolate* isolate) { | 1297 Map* Object::GetRootMap(Isolate* isolate) { |
1297 DisallowHeapAllocation no_alloc; | 1298 DisallowHeapAllocation no_alloc; |
1298 if (IsSmi()) { | 1299 if (IsSmi()) { |
1299 Context* native_context = isolate->context()->native_context(); | 1300 Context* native_context = isolate->context()->native_context(); |
1300 return native_context->number_function()->initial_map(); | 1301 return native_context->number_function()->initial_map(); |
1301 } | 1302 } |
(...skipping 17767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19069 if (cell->value() != *new_value) { | 19070 if (cell->value() != *new_value) { |
19070 cell->set_value(*new_value); | 19071 cell->set_value(*new_value); |
19071 Isolate* isolate = cell->GetIsolate(); | 19072 Isolate* isolate = cell->GetIsolate(); |
19072 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19073 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19073 isolate, DependentCode::kPropertyCellChangedGroup); | 19074 isolate, DependentCode::kPropertyCellChangedGroup); |
19074 } | 19075 } |
19075 } | 19076 } |
19076 | 19077 |
19077 } // namespace internal | 19078 } // namespace internal |
19078 } // namespace v8 | 19079 } // namespace v8 |
OLD | NEW |