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

Side by Side Diff: src/code-stub-assembler.h

Issue 2180273002: [KeyedLoadIC] Support Smi "handlers" for element loads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@keyed-load-ic-fieldindex
Patch Set: rebased Created 4 years, 4 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/code-stub-assembler.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 compiler::Node* TryMonomorphicCase(const LoadICParameters* p, 502 compiler::Node* TryMonomorphicCase(const LoadICParameters* p,
503 compiler::Node* receiver_map, 503 compiler::Node* receiver_map,
504 Label* if_handler, Variable* var_handler, 504 Label* if_handler, Variable* var_handler,
505 Label* if_miss); 505 Label* if_miss);
506 void HandlePolymorphicCase(const LoadICParameters* p, 506 void HandlePolymorphicCase(const LoadICParameters* p,
507 compiler::Node* receiver_map, 507 compiler::Node* receiver_map,
508 compiler::Node* feedback, Label* if_handler, 508 compiler::Node* feedback, Label* if_handler,
509 Variable* var_handler, Label* if_miss, 509 Variable* var_handler, Label* if_miss,
510 int unroll_count); 510 int unroll_count);
511 511
512 void HandleLoadICHandlerCase(const LoadICParameters* p,
513 compiler::Node* handler, Label* miss);
514
515 compiler::Node* StubCachePrimaryOffset(compiler::Node* name, 512 compiler::Node* StubCachePrimaryOffset(compiler::Node* name,
516 compiler::Node* map); 513 compiler::Node* map);
517 514
518 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, 515 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name,
519 compiler::Node* seed); 516 compiler::Node* seed);
520 517
521 // This enum is used here as a replacement for StubCache::Table to avoid 518 // This enum is used here as a replacement for StubCache::Table to avoid
522 // including stub cache header. 519 // including stub cache header.
523 enum StubCacheTable : int; 520 enum StubCacheTable : int;
524 521
(...skipping 20 matching lines...) Expand all
545 CodeStubAssembler::Label* use_cache, 542 CodeStubAssembler::Label* use_cache,
546 CodeStubAssembler::Label* use_runtime); 543 CodeStubAssembler::Label* use_runtime);
547 544
548 // Create a new weak cell with a specified value and install it into a 545 // Create a new weak cell with a specified value and install it into a
549 // feedback vector. 546 // feedback vector.
550 compiler::Node* CreateWeakCellInFeedbackVector( 547 compiler::Node* CreateWeakCellInFeedbackVector(
551 compiler::Node* feedback_vector, compiler::Node* slot, 548 compiler::Node* feedback_vector, compiler::Node* slot,
552 compiler::Node* value); 549 compiler::Node* value);
553 550
554 private: 551 private:
552 enum ElementSupport { kOnlyProperties, kSupportElements };
553
554 void HandleLoadICHandlerCase(
555 const LoadICParameters* p, compiler::Node* handler, Label* miss,
556 ElementSupport support_elements = kOnlyProperties);
557 void EmitBoundsCheck(compiler::Node* object, compiler::Node* elements,
558 compiler::Node* intptr_key, compiler::Node* is_jsarray,
559 Label* miss);
560 void EmitElementLoad(compiler::Node* object, compiler::Node* elements,
561 compiler::Node* elements_kind, compiler::Node* key,
562 Label* if_hole, Label* rebox_double,
563 Variable* var_double_value, Label* miss);
564
555 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, 565 compiler::Node* ElementOffsetFromIndex(compiler::Node* index,
556 ElementsKind kind, ParameterMode mode, 566 ElementsKind kind, ParameterMode mode,
557 int base_size = 0); 567 int base_size = 0);
558 568
559 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, 569 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes,
560 AllocationFlags flags, 570 AllocationFlags flags,
561 compiler::Node* top_address, 571 compiler::Node* top_address,
562 compiler::Node* limit_address); 572 compiler::Node* limit_address);
563 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, 573 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes,
564 AllocationFlags flags, 574 AllocationFlags flags,
565 compiler::Node* top_adddress, 575 compiler::Node* top_adddress,
566 compiler::Node* limit_address); 576 compiler::Node* limit_address);
567 577
568 static const int kElementLoopUnrollThreshold = 8; 578 static const int kElementLoopUnrollThreshold = 8;
569 }; 579 };
570 580
571 } // namespace internal 581 } // namespace internal
572 } // namespace v8 582 } // namespace v8
573 #endif // V8_CODE_STUB_ASSEMBLER_H_ 583 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698