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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 compiler::Node* GrowElementsCapacity( | 571 compiler::Node* GrowElementsCapacity( |
572 compiler::Node* object, compiler::Node* elements, ElementsKind from_kind, | 572 compiler::Node* object, compiler::Node* elements, ElementsKind from_kind, |
573 ElementsKind to_kind, compiler::Node* capacity, | 573 ElementsKind to_kind, compiler::Node* capacity, |
574 compiler::Node* new_capacity, ParameterMode mode, Label* bailout); | 574 compiler::Node* new_capacity, ParameterMode mode, Label* bailout); |
575 | 575 |
576 // Allocation site manipulation | 576 // Allocation site manipulation |
577 void InitializeAllocationMemento(compiler::Node* base_allocation, | 577 void InitializeAllocationMemento(compiler::Node* base_allocation, |
578 int base_allocation_size, | 578 int base_allocation_size, |
579 compiler::Node* allocation_site); | 579 compiler::Node* allocation_site); |
580 | 580 |
| 581 compiler::Node* TryTaggedToFloat64(compiler::Node* value, |
| 582 Label* if_valueisnotnumber); |
581 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, | 583 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, |
582 compiler::Node* value); | 584 compiler::Node* value); |
583 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, | 585 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, |
584 compiler::Node* value); | 586 compiler::Node* value); |
585 // Truncate the floating point value of a HeapNumber to an Int32. | 587 // Truncate the floating point value of a HeapNumber to an Int32. |
586 compiler::Node* TruncateHeapNumberValueToWord32(compiler::Node* object); | 588 compiler::Node* TruncateHeapNumberValueToWord32(compiler::Node* object); |
587 | 589 |
588 // Conversions. | 590 // Conversions. |
589 compiler::Node* ChangeFloat64ToTagged(compiler::Node* value); | 591 compiler::Node* ChangeFloat64ToTagged(compiler::Node* value); |
590 compiler::Node* ChangeInt32ToTagged(compiler::Node* value); | 592 compiler::Node* ChangeInt32ToTagged(compiler::Node* value); |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 Label* if_false); | 1099 Label* if_false); |
1098 | 1100 |
1099 enum ResultMode { kDontNegateResult, kNegateResult }; | 1101 enum ResultMode { kDontNegateResult, kNegateResult }; |
1100 | 1102 |
1101 compiler::Node* Equal(ResultMode mode, compiler::Node* lhs, | 1103 compiler::Node* Equal(ResultMode mode, compiler::Node* lhs, |
1102 compiler::Node* rhs, compiler::Node* context); | 1104 compiler::Node* rhs, compiler::Node* context); |
1103 | 1105 |
1104 compiler::Node* StrictEqual(ResultMode mode, compiler::Node* lhs, | 1106 compiler::Node* StrictEqual(ResultMode mode, compiler::Node* lhs, |
1105 compiler::Node* rhs, compiler::Node* context); | 1107 compiler::Node* rhs, compiler::Node* context); |
1106 | 1108 |
| 1109 // ECMA#sec-samevalue |
| 1110 // Similar to StrictEqual except that NaNs are treated as equal and minus zero |
| 1111 // differs from positive zero. |
| 1112 // Unlike Equal and StrictEqual, returns a value suitable for use in Branch |
| 1113 // instructions, e.g. Branch(SameValue(...), &label). |
| 1114 compiler::Node* SameValue(compiler::Node* lhs, compiler::Node* rhs, |
| 1115 compiler::Node* context); |
| 1116 |
1107 compiler::Node* HasProperty( | 1117 compiler::Node* HasProperty( |
1108 compiler::Node* object, compiler::Node* key, compiler::Node* context, | 1118 compiler::Node* object, compiler::Node* key, compiler::Node* context, |
1109 Runtime::FunctionId fallback_runtime_function_id = Runtime::kHasProperty); | 1119 Runtime::FunctionId fallback_runtime_function_id = Runtime::kHasProperty); |
1110 compiler::Node* ForInFilter(compiler::Node* key, compiler::Node* object, | 1120 compiler::Node* ForInFilter(compiler::Node* key, compiler::Node* object, |
1111 compiler::Node* context); | 1121 compiler::Node* context); |
1112 | 1122 |
1113 compiler::Node* Typeof(compiler::Node* value, compiler::Node* context); | 1123 compiler::Node* Typeof(compiler::Node* value, compiler::Node* context); |
1114 | 1124 |
1115 compiler::Node* InstanceOf(compiler::Node* object, compiler::Node* callable, | 1125 compiler::Node* InstanceOf(compiler::Node* object, compiler::Node* callable, |
1116 compiler::Node* context); | 1126 compiler::Node* context); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 } | 1311 } |
1302 #else | 1312 #else |
1303 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1313 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
1304 #endif | 1314 #endif |
1305 | 1315 |
1306 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1316 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1307 | 1317 |
1308 } // namespace internal | 1318 } // namespace internal |
1309 } // namespace v8 | 1319 } // namespace v8 |
1310 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1320 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |