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

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

Issue 2479523002: [ic] Avoid extra prototype chain iteration when creating a load IC data handler. (Closed)
Patch Set: Created 4 years, 1 month 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/ic/ic.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 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 #ifndef V8_IC_H_ 5 #ifndef V8_IC_H_
6 #define V8_IC_H_ 6 #define V8_IC_H_
7 7
8 #include "src/ic/ic-state.h" 8 #include "src/ic/ic-state.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // prototype chain from |receiver_map| till |holder| did not change. 318 // prototype chain from |receiver_map| till |holder| did not change.
319 // If the |holder| is an empty handle then the full prototype chain is 319 // If the |holder| is an empty handle then the full prototype chain is
320 // checked. 320 // checked.
321 // Returns -1 if the handler has to be compiled or the number of prototype 321 // Returns -1 if the handler has to be compiled or the number of prototype
322 // checks otherwise. 322 // checks otherwise.
323 int GetPrototypeCheckCount(Handle<Map> receiver_map, Handle<JSObject> holder); 323 int GetPrototypeCheckCount(Handle<Map> receiver_map, Handle<JSObject> holder);
324 324
325 // Creates a data handler that represents a prototype chain check followed 325 // Creates a data handler that represents a prototype chain check followed
326 // by given Smi-handler that encoded a load from the holder. 326 // by given Smi-handler that encoded a load from the holder.
327 // Can be used only if GetPrototypeCheckCount() returns non negative value. 327 // Can be used only if GetPrototypeCheckCount() returns non negative value.
328 Handle<Object> SimpleLoadFromPrototype(Handle<Map> receiver_map, 328 Handle<Object> LoadFromPrototype(Handle<Map> receiver_map,
329 Handle<JSObject> holder, 329 Handle<JSObject> holder, Handle<Name> name,
330 Handle<Name> name, 330 Handle<Object> smi_handler);
331 Handle<Object> smi_handler);
332 331
333 // Creates a data handler that represents a load of a non-existent property. 332 // Creates a data handler that represents a load of a non-existent property.
334 Handle<Object> SimpleLoadNonExistent(Handle<Map> receiver_map, 333 Handle<Object> LoadNonExistent(Handle<Map> receiver_map, Handle<Name> name);
335 Handle<Name> name); 334
336 friend class IC; 335 friend class IC;
337 }; 336 };
338 337
339 class LoadGlobalIC : public LoadIC { 338 class LoadGlobalIC : public LoadIC {
340 public: 339 public:
341 LoadGlobalIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL) 340 LoadGlobalIC(FrameDepth depth, Isolate* isolate, FeedbackNexus* nexus = NULL)
342 : LoadIC(depth, isolate, nexus) {} 341 : LoadIC(depth, isolate, nexus) {}
343 342
344 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name); 343 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Name> name);
345 344
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 521
523 // Helper for BinaryOpIC and CompareIC. 522 // Helper for BinaryOpIC and CompareIC.
524 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 523 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
525 void PatchInlinedSmiCode(Isolate* isolate, Address address, 524 void PatchInlinedSmiCode(Isolate* isolate, Address address,
526 InlinedSmiCheck check); 525 InlinedSmiCheck check);
527 526
528 } // namespace internal 527 } // namespace internal
529 } // namespace v8 528 } // namespace v8
530 529
531 #endif // V8_IC_H_ 530 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « no previous file | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698