| 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  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  | 
|  512   compiler::Node* StubCachePrimaryOffset(compiler::Node* name, |  515   compiler::Node* StubCachePrimaryOffset(compiler::Node* name, | 
|  513                                          compiler::Node* map); |  516                                          compiler::Node* map); | 
|  514  |  517  | 
|  515   compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, |  518   compiler::Node* StubCacheSecondaryOffset(compiler::Node* name, | 
|  516                                            compiler::Node* seed); |  519                                            compiler::Node* seed); | 
|  517  |  520  | 
|  518   // This enum is used here as a replacement for StubCache::Table to avoid |  521   // This enum is used here as a replacement for StubCache::Table to avoid | 
|  519   // including stub cache header. |  522   // including stub cache header. | 
|  520   enum StubCacheTable : int; |  523   enum StubCacheTable : int; | 
|  521  |  524  | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
|  542                       CodeStubAssembler::Label* use_cache, |  545                       CodeStubAssembler::Label* use_cache, | 
|  543                       CodeStubAssembler::Label* use_runtime); |  546                       CodeStubAssembler::Label* use_runtime); | 
|  544  |  547  | 
|  545   // Create a new weak cell with a specified value and install it into a |  548   // Create a new weak cell with a specified value and install it into a | 
|  546   // feedback vector. |  549   // feedback vector. | 
|  547   compiler::Node* CreateWeakCellInFeedbackVector( |  550   compiler::Node* CreateWeakCellInFeedbackVector( | 
|  548       compiler::Node* feedback_vector, compiler::Node* slot, |  551       compiler::Node* feedback_vector, compiler::Node* slot, | 
|  549       compiler::Node* value); |  552       compiler::Node* value); | 
|  550  |  553  | 
|  551  private: |  554  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  |  | 
|  565   compiler::Node* ElementOffsetFromIndex(compiler::Node* index, |  555   compiler::Node* ElementOffsetFromIndex(compiler::Node* index, | 
|  566                                          ElementsKind kind, ParameterMode mode, |  556                                          ElementsKind kind, ParameterMode mode, | 
|  567                                          int base_size = 0); |  557                                          int base_size = 0); | 
|  568  |  558  | 
|  569   compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |  559   compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 
|  570                                      AllocationFlags flags, |  560                                      AllocationFlags flags, | 
|  571                                      compiler::Node* top_address, |  561                                      compiler::Node* top_address, | 
|  572                                      compiler::Node* limit_address); |  562                                      compiler::Node* limit_address); | 
|  573   compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |  563   compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 
|  574                                        AllocationFlags flags, |  564                                        AllocationFlags flags, | 
|  575                                        compiler::Node* top_adddress, |  565                                        compiler::Node* top_adddress, | 
|  576                                        compiler::Node* limit_address); |  566                                        compiler::Node* limit_address); | 
|  577  |  567  | 
|  578   static const int kElementLoopUnrollThreshold = 8; |  568   static const int kElementLoopUnrollThreshold = 8; | 
|  579 }; |  569 }; | 
|  580  |  570  | 
|  581 }  // namespace internal |  571 }  // namespace internal | 
|  582 }  // namespace v8 |  572 }  // namespace v8 | 
|  583 #endif  // V8_CODE_STUB_ASSEMBLER_H_ |  573 #endif  // V8_CODE_STUB_ASSEMBLER_H_ | 
| OLD | NEW |