Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: src/objects.cc

Issue 1494283002: Revert of [proxies] Make Object.prototype.isPrototypeOf work with proxies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 Maybe<bool> Object::HasInPrototypeChain(Isolate* isolate, Handle<Object> object, 1286 bool Object::HasInPrototypeChain(Isolate* isolate, Object* target) {
1287 Handle<Object> proto) { 1287 PrototypeIterator iter(isolate, this, PrototypeIterator::START_AT_RECEIVER);
1288 PrototypeIterator iter(isolate, object, PrototypeIterator::START_AT_RECEIVER);
1289 while (true) { 1288 while (true) {
1290 if (!iter.AdvanceFollowingProxies()) return Nothing<bool>(); 1289 iter.AdvanceIgnoringProxies();
1291 if (iter.IsAtEnd()) return Just(false); 1290 if (iter.IsAtEnd()) return false;
1292 if (iter.IsAtEnd(proto)) return Just(true); 1291 if (iter.IsAtEnd(target)) return true;
1293 } 1292 }
1294 } 1293 }
1295 1294
1296 1295
1297 Map* Object::GetRootMap(Isolate* isolate) { 1296 Map* Object::GetRootMap(Isolate* isolate) {
1298 DisallowHeapAllocation no_alloc; 1297 DisallowHeapAllocation no_alloc;
1299 if (IsSmi()) { 1298 if (IsSmi()) {
1300 Context* native_context = isolate->context()->native_context(); 1299 Context* native_context = isolate->context()->native_context();
1301 return native_context->number_function()->initial_map(); 1300 return native_context->number_function()->initial_map();
1302 } 1301 }
(...skipping 17767 matching lines...) Expand 10 before | Expand all | Expand 10 after
19070 if (cell->value() != *new_value) { 19069 if (cell->value() != *new_value) {
19071 cell->set_value(*new_value); 19070 cell->set_value(*new_value);
19072 Isolate* isolate = cell->GetIsolate(); 19071 Isolate* isolate = cell->GetIsolate();
19073 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19072 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19074 isolate, DependentCode::kPropertyCellChangedGroup); 19073 isolate, DependentCode::kPropertyCellChangedGroup);
19075 } 19074 }
19076 } 19075 }
19077 19076
19078 } // namespace internal 19077 } // namespace internal
19079 } // namespace v8 19078 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698