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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 compiler::Node* receiver_map, | 431 compiler::Node* receiver_map, |
432 Label* if_handler, Variable* var_handler, | 432 Label* if_handler, Variable* var_handler, |
433 Label* if_miss); | 433 Label* if_miss); |
434 void HandlePolymorphicCase(const LoadICParameters* p, | 434 void HandlePolymorphicCase(const LoadICParameters* p, |
435 compiler::Node* receiver_map, | 435 compiler::Node* receiver_map, |
436 compiler::Node* feedback, Label* if_handler, | 436 compiler::Node* feedback, Label* if_handler, |
437 Variable* var_handler, Label* if_miss, | 437 Variable* var_handler, Label* if_miss, |
438 int unroll_count); | 438 int unroll_count); |
439 | 439 |
440 compiler::Node* StubCachePrimaryOffset(compiler::Node* name, | 440 compiler::Node* StubCachePrimaryOffset(compiler::Node* name, |
| 441 Code::Flags flags, |
441 compiler::Node* map); | 442 compiler::Node* map); |
442 | 443 |
443 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, | 444 compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, |
| 445 Code::Flags flags, |
444 compiler::Node* seed); | 446 compiler::Node* seed); |
445 | 447 |
446 // This enum is used here as a replacement for StubCache::Table to avoid | 448 // This enum is used here as a replacement for StubCache::Table to avoid |
447 // including stub cache header. | 449 // including stub cache header. |
448 enum StubCacheTable : int; | 450 enum StubCacheTable : int; |
449 | 451 |
450 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id, | 452 void TryProbeStubCacheTable(StubCache* stub_cache, StubCacheTable table_id, |
451 compiler::Node* entry_offset, | 453 compiler::Node* entry_offset, |
452 compiler::Node* name, compiler::Node* map, | 454 compiler::Node* name, Code::Flags flags, |
453 Label* if_handler, Variable* var_handler, | 455 compiler::Node* map, Label* if_handler, |
454 Label* if_miss); | 456 Variable* var_handler, Label* if_miss); |
455 | 457 |
456 void TryProbeStubCache(StubCache* stub_cache, compiler::Node* receiver, | 458 void TryProbeStubCache(StubCache* stub_cache, compiler::Node* receiver, |
457 compiler::Node* name, Label* if_handler, | 459 compiler::Node* name, Label* if_handler, |
458 Variable* var_handler, Label* if_miss); | 460 Variable* var_handler, Label* if_miss); |
459 | 461 |
460 void LoadIC(const LoadICParameters* p); | 462 void LoadIC(const LoadICParameters* p); |
461 void LoadGlobalIC(const LoadICParameters* p); | 463 void LoadGlobalIC(const LoadICParameters* p); |
462 | 464 |
463 private: | 465 private: |
464 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, | 466 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, |
465 ElementsKind kind, ParameterMode mode, | 467 ElementsKind kind, ParameterMode mode, |
466 int base_size = 0); | 468 int base_size = 0); |
467 | 469 |
468 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 470 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |
469 AllocationFlags flags, | 471 AllocationFlags flags, |
470 compiler::Node* top_address, | 472 compiler::Node* top_address, |
471 compiler::Node* limit_address); | 473 compiler::Node* limit_address); |
472 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 474 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
473 AllocationFlags flags, | 475 AllocationFlags flags, |
474 compiler::Node* top_adddress, | 476 compiler::Node* top_adddress, |
475 compiler::Node* limit_address); | 477 compiler::Node* limit_address); |
476 | 478 |
477 static const int kElementLoopUnrollThreshold = 8; | 479 static const int kElementLoopUnrollThreshold = 8; |
478 }; | 480 }; |
479 | 481 |
480 } // namespace internal | 482 } // namespace internal |
481 } // namespace v8 | 483 } // namespace v8 |
482 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 484 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |