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

Side by Side Diff: src/ic/ic.cc

Issue 1975763002: [runtime] Make sure that LookupIterator::OWN always performs a HIDDEN lookup as well. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 7 months 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/crankshaft/hydrogen.cc ('k') | src/lookup.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 if (old_map->is_deprecated()) return true; 273 if (old_map->is_deprecated()) return true;
274 return IsMoreGeneralElementsKindTransition(old_map->elements_kind(), 274 return IsMoreGeneralElementsKindTransition(old_map->elements_kind(),
275 receiver_map()->elements_kind()); 275 receiver_map()->elements_kind());
276 } 276 }
277 277
278 if (receiver->IsJSGlobalObject()) { 278 if (receiver->IsJSGlobalObject()) {
279 Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(receiver); 279 Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(receiver);
280 LookupIterator it(global, name, LookupIterator::OWN_SKIP_INTERCEPTOR); 280 LookupIterator it(global, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
281 if (it.state() == LookupIterator::ACCESS_CHECK) return false; 281 if (it.state() == LookupIterator::ACCESS_CHECK) return false;
282 if (!it.IsFound()) return false; 282 if (!it.IsFound()) return false;
283 if (!it.GetHolder<JSReceiver>()->IsJSGlobalObject()) return false;
283 return it.property_details().cell_type() == PropertyCellType::kConstant; 284 return it.property_details().cell_type() == PropertyCellType::kConstant;
284 } 285 }
285 286
286 return true; 287 return true;
287 } 288 }
288 289
289 bool IC::RecomputeHandlerForName(Handle<Object> name) { 290 bool IC::RecomputeHandlerForName(Handle<Object> name) {
290 if (is_keyed()) { 291 if (is_keyed()) {
291 // Determine whether the failure is due to a name failure. 292 // Determine whether the failure is due to a name failure.
292 if (!name->IsName()) return false; 293 if (!name->IsName()) return false;
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 KeyedLoadICNexus nexus(vector, vector_slot); 2794 KeyedLoadICNexus nexus(vector, vector_slot);
2794 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 2795 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
2795 ic.UpdateState(receiver, key); 2796 ic.UpdateState(receiver, key);
2796 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 2797 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2797 } 2798 }
2798 2799
2799 return *result; 2800 return *result;
2800 } 2801 }
2801 } // namespace internal 2802 } // namespace internal
2802 } // namespace v8 2803 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698