| 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 20 matching lines...) Expand all Loading... |
| 31 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor. | 31 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor. |
| 32 CodeStubAssembler(Isolate* isolate, Zone* zone, | 32 CodeStubAssembler(Isolate* isolate, Zone* zone, |
| 33 const CallInterfaceDescriptor& descriptor, | 33 const CallInterfaceDescriptor& descriptor, |
| 34 Code::Flags flags, const char* name, | 34 Code::Flags flags, const char* name, |
| 35 size_t result_size = 1); | 35 size_t result_size = 1); |
| 36 | 36 |
| 37 // Create with JSCall linkage. | 37 // Create with JSCall linkage. |
| 38 CodeStubAssembler(Isolate* isolate, Zone* zone, int parameter_count, | 38 CodeStubAssembler(Isolate* isolate, Zone* zone, int parameter_count, |
| 39 Code::Flags flags, const char* name); | 39 Code::Flags flags, const char* name); |
| 40 | 40 |
| 41 enum AllocationFlag : uint8_t { |
| 42 kNone = 0, |
| 43 kDoubleAlignment = 1, |
| 44 kPretenured = 1 << 1 |
| 45 }; |
| 46 |
| 47 typedef base::Flags<AllocationFlag> AllocationFlags; |
| 48 |
| 41 enum ParameterMode { INTEGER_PARAMETERS, SMI_PARAMETERS }; | 49 enum ParameterMode { INTEGER_PARAMETERS, SMI_PARAMETERS }; |
| 42 | 50 |
| 43 compiler::Node* BooleanMapConstant(); | 51 compiler::Node* BooleanMapConstant(); |
| 44 compiler::Node* EmptyStringConstant(); | 52 compiler::Node* EmptyStringConstant(); |
| 45 compiler::Node* HeapNumberMapConstant(); | 53 compiler::Node* HeapNumberMapConstant(); |
| 46 compiler::Node* NoContextConstant(); | 54 compiler::Node* NoContextConstant(); |
| 47 compiler::Node* NanConstant(); | 55 compiler::Node* NanConstant(); |
| 48 compiler::Node* NullConstant(); | 56 compiler::Node* NullConstant(); |
| 49 compiler::Node* MinusZeroConstant(); | 57 compiler::Node* MinusZeroConstant(); |
| 50 compiler::Node* UndefinedConstant(); | 58 compiler::Node* UndefinedConstant(); |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 590 |
| 583 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 591 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |
| 584 AllocationFlags flags, | 592 AllocationFlags flags, |
| 585 compiler::Node* top_address, | 593 compiler::Node* top_address, |
| 586 compiler::Node* limit_address); | 594 compiler::Node* limit_address); |
| 587 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 595 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
| 588 AllocationFlags flags, | 596 AllocationFlags flags, |
| 589 compiler::Node* top_adddress, | 597 compiler::Node* top_adddress, |
| 590 compiler::Node* limit_address); | 598 compiler::Node* limit_address); |
| 591 | 599 |
| 600 compiler::Node* SmiShiftBitsConstant(); |
| 601 |
| 592 static const int kElementLoopUnrollThreshold = 8; | 602 static const int kElementLoopUnrollThreshold = 8; |
| 593 }; | 603 }; |
| 594 | 604 |
| 605 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 606 |
| 595 } // namespace internal | 607 } // namespace internal |
| 596 } // namespace v8 | 608 } // namespace v8 |
| 597 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 609 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |