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

Side by Side Diff: src/lookup.h

Issue 2175273002: [ic] Don't call LookupIterator::GetStoreTarget() when receiver is not a JSReceiver. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 4 years, 5 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 | « no previous file | src/objects.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_LOOKUP_H_ 5 #ifndef V8_LOOKUP_H_
6 #define V8_LOOKUP_H_ 6 #define V8_LOOKUP_H_
7 7
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void NotFound() { 169 void NotFound() {
170 has_property_ = false; 170 has_property_ = false;
171 state_ = NOT_FOUND; 171 state_ = NOT_FOUND;
172 } 172 }
173 173
174 Heap* heap() const { return isolate_->heap(); } 174 Heap* heap() const { return isolate_->heap(); }
175 Factory* factory() const { return isolate_->factory(); } 175 Factory* factory() const { return isolate_->factory(); }
176 Handle<Object> GetReceiver() const { return receiver_; } 176 Handle<Object> GetReceiver() const { return receiver_; }
177 177
178 Handle<JSObject> GetStoreTarget() const { 178 Handle<JSObject> GetStoreTarget() const {
179 DCHECK(receiver_->IsJSObject());
179 if (receiver_->IsJSGlobalProxy()) { 180 if (receiver_->IsJSGlobalProxy()) {
180 Map* map = JSGlobalProxy::cast(*receiver_)->map(); 181 Map* map = JSGlobalProxy::cast(*receiver_)->map();
181 if (map->has_hidden_prototype()) { 182 if (map->has_hidden_prototype()) {
182 return handle(JSGlobalObject::cast(map->prototype()), isolate_); 183 return handle(JSGlobalObject::cast(map->prototype()), isolate_);
183 } 184 }
184 } 185 }
185 return Handle<JSObject>::cast(receiver_); 186 return Handle<JSObject>::cast(receiver_);
186 } 187 }
187 188
188 bool is_dictionary_holder() const { return !holder_->HasFastProperties(); } 189 bool is_dictionary_holder() const { return !holder_->HasFastProperties(); }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 const Handle<JSReceiver> initial_holder_; 367 const Handle<JSReceiver> initial_holder_;
367 const uint32_t index_; 368 const uint32_t index_;
368 uint32_t number_; 369 uint32_t number_;
369 }; 370 };
370 371
371 372
372 } // namespace internal 373 } // namespace internal
373 } // namespace v8 374 } // namespace v8
374 375
375 #endif // V8_LOOKUP_H_ 376 #endif // V8_LOOKUP_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698