OLD | NEW |
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 compiler::Node* TryMonomorphicCase(const LoadICParameters* p, | 442 compiler::Node* TryMonomorphicCase(const LoadICParameters* p, |
443 compiler::Node* receiver_map, | 443 compiler::Node* receiver_map, |
444 Label* if_handler, Variable* var_handler, | 444 Label* if_handler, Variable* var_handler, |
445 Label* if_miss); | 445 Label* if_miss); |
446 void HandlePolymorphicCase(const LoadICParameters* p, | 446 void HandlePolymorphicCase(const LoadICParameters* p, |
447 compiler::Node* receiver_map, | 447 compiler::Node* receiver_map, |
448 compiler::Node* feedback, Label* if_handler, | 448 compiler::Node* feedback, Label* if_handler, |
449 Variable* var_handler, Label* if_miss, | 449 Variable* var_handler, Label* if_miss, |
450 int unroll_count); | 450 int unroll_count); |
451 | 451 |
452 void HandleLoadICHandlerCase(const LoadICParameters* p, | |
453 compiler::Node* handler, Label* miss); | |
454 | |
455 compiler::Node* StubCachePrimaryOffset(compiler::Node* name, | 452 compiler::Node* StubCachePrimaryOffset(compiler::Node* name, |
456 compiler::Node* map); | 453 compiler::Node* map); |
457 | 454 |
458 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, | 455 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, |
459 compiler::Node* seed); | 456 compiler::Node* seed); |
460 | 457 |
461 // This enum is used here as a replacement for StubCache::Table to avoid | 458 // This enum is used here as a replacement for StubCache::Table to avoid |
462 // including stub cache header. | 459 // including stub cache header. |
463 enum StubCacheTable : int; | 460 enum StubCacheTable : int; |
464 | 461 |
(...skipping 14 matching lines...) Expand all Loading... |
479 // Get the enumerable length from |map| and return the result as a Smi. | 476 // Get the enumerable length from |map| and return the result as a Smi. |
480 compiler::Node* EnumLength(compiler::Node* map); | 477 compiler::Node* EnumLength(compiler::Node* map); |
481 | 478 |
482 // Check the cache validity for |receiver|. Branch to |use_cache| if | 479 // Check the cache validity for |receiver|. Branch to |use_cache| if |
483 // the cache is valid, otherwise branch to |use_runtime|. | 480 // the cache is valid, otherwise branch to |use_runtime|. |
484 void CheckEnumCache(compiler::Node* receiver, | 481 void CheckEnumCache(compiler::Node* receiver, |
485 CodeStubAssembler::Label* use_cache, | 482 CodeStubAssembler::Label* use_cache, |
486 CodeStubAssembler::Label* use_runtime); | 483 CodeStubAssembler::Label* use_runtime); |
487 | 484 |
488 private: | 485 private: |
| 486 enum ElementSupport { kOnlyProperties, kSupportElements }; |
| 487 |
| 488 void HandleLoadICHandlerCase( |
| 489 const LoadICParameters* p, compiler::Node* handler, Label* miss, |
| 490 ElementSupport support_elements = kOnlyProperties); |
| 491 |
489 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, | 492 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, |
490 ElementsKind kind, ParameterMode mode, | 493 ElementsKind kind, ParameterMode mode, |
491 int base_size = 0); | 494 int base_size = 0); |
492 | 495 |
493 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 496 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |
494 AllocationFlags flags, | 497 AllocationFlags flags, |
495 compiler::Node* top_address, | 498 compiler::Node* top_address, |
496 compiler::Node* limit_address); | 499 compiler::Node* limit_address); |
497 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 500 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
498 AllocationFlags flags, | 501 AllocationFlags flags, |
499 compiler::Node* top_adddress, | 502 compiler::Node* top_adddress, |
500 compiler::Node* limit_address); | 503 compiler::Node* limit_address); |
501 | 504 |
502 static const int kElementLoopUnrollThreshold = 8; | 505 static const int kElementLoopUnrollThreshold = 8; |
503 }; | 506 }; |
504 | 507 |
505 } // namespace internal | 508 } // namespace internal |
506 } // namespace v8 | 509 } // namespace v8 |
507 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 510 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |