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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 compiler::Node* map, Label* if_handler, | 467 compiler::Node* map, Label* if_handler, |
468 Variable* var_handler, Label* if_miss); | 468 Variable* var_handler, Label* if_miss); |
469 | 469 |
470 void TryProbeStubCache(StubCache* stub_cache, compiler::Node* receiver, | 470 void TryProbeStubCache(StubCache* stub_cache, compiler::Node* receiver, |
471 compiler::Node* name, Label* if_handler, | 471 compiler::Node* name, Label* if_handler, |
472 Variable* var_handler, Label* if_miss); | 472 Variable* var_handler, Label* if_miss); |
473 | 473 |
474 void LoadIC(const LoadICParameters* p); | 474 void LoadIC(const LoadICParameters* p); |
475 void LoadGlobalIC(const LoadICParameters* p); | 475 void LoadGlobalIC(const LoadICParameters* p); |
476 | 476 |
| 477 // Get the enumerable length from |map| and return the result as a Smi. |
| 478 compiler::Node* EnumLength(compiler::Node* map); |
| 479 |
| 480 // Check the cache validity for |receiver|. Branch to |use_cache| if |
| 481 // the cache is valid, otherwise branch to |use_runtime|. |
| 482 void CheckEnumCache(compiler::Node* receiver, |
| 483 CodeStubAssembler::Label* use_cache, |
| 484 CodeStubAssembler::Label* use_runtime); |
| 485 |
477 private: | 486 private: |
478 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, | 487 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, |
479 ElementsKind kind, ParameterMode mode, | 488 ElementsKind kind, ParameterMode mode, |
480 int base_size = 0); | 489 int base_size = 0); |
481 | 490 |
482 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 491 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |
483 AllocationFlags flags, | 492 AllocationFlags flags, |
484 compiler::Node* top_address, | 493 compiler::Node* top_address, |
485 compiler::Node* limit_address); | 494 compiler::Node* limit_address); |
486 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 495 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
487 AllocationFlags flags, | 496 AllocationFlags flags, |
488 compiler::Node* top_adddress, | 497 compiler::Node* top_adddress, |
489 compiler::Node* limit_address); | 498 compiler::Node* limit_address); |
490 | 499 |
491 static const int kElementLoopUnrollThreshold = 8; | 500 static const int kElementLoopUnrollThreshold = 8; |
492 }; | 501 }; |
493 | 502 |
494 } // namespace internal | 503 } // namespace internal |
495 } // namespace v8 | 504 } // namespace v8 |
496 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 505 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |