OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1747 // Load the HeapNumber value. | 1747 // Load the HeapNumber value. |
1748 var_finc_value.Bind(assembler->LoadHeapNumberValue(value)); | 1748 var_finc_value.Bind(assembler->LoadHeapNumberValue(value)); |
1749 assembler->Goto(&do_finc); | 1749 assembler->Goto(&do_finc); |
1750 } | 1750 } |
1751 | 1751 |
1752 assembler->Bind(&if_valuenotnumber); | 1752 assembler->Bind(&if_valuenotnumber); |
1753 { | 1753 { |
1754 // We do not require an Or with earlier feedback here because once we | 1754 // We do not require an Or with earlier feedback here because once we |
1755 // convert the value to a number, we cannot reach this path. We can | 1755 // convert the value to a number, we cannot reach this path. We can |
1756 // only reach this path on the first pass when the feedback is kNone. | 1756 // only reach this path on the first pass when the feedback is kNone. |
1757 assembler->Assert(assembler->Word32Equal( | 1757 CSA_ASSERT(assembler, |
1758 var_type_feedback.value(), | 1758 assembler->Word32Equal(var_type_feedback.value(), |
1759 assembler->Int32Constant(BinaryOperationFeedback::kNone))); | 1759 assembler->Int32Constant( |
| 1760 BinaryOperationFeedback::kNone))); |
1760 | 1761 |
1761 Label if_valueisoddball(assembler), if_valuenotoddball(assembler); | 1762 Label if_valueisoddball(assembler), if_valuenotoddball(assembler); |
1762 Node* instance_type = assembler->LoadMapInstanceType(value_map); | 1763 Node* instance_type = assembler->LoadMapInstanceType(value_map); |
1763 Node* is_oddball = assembler->Word32Equal( | 1764 Node* is_oddball = assembler->Word32Equal( |
1764 instance_type, assembler->Int32Constant(ODDBALL_TYPE)); | 1765 instance_type, assembler->Int32Constant(ODDBALL_TYPE)); |
1765 assembler->Branch(is_oddball, &if_valueisoddball, &if_valuenotoddball); | 1766 assembler->Branch(is_oddball, &if_valueisoddball, &if_valuenotoddball); |
1766 | 1767 |
1767 assembler->Bind(&if_valueisoddball); | 1768 assembler->Bind(&if_valueisoddball); |
1768 { | 1769 { |
1769 // Convert Oddball to Number and check again. | 1770 // Convert Oddball to Number and check again. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1886 // Load the HeapNumber value. | 1887 // Load the HeapNumber value. |
1887 var_fdec_value.Bind(assembler->LoadHeapNumberValue(value)); | 1888 var_fdec_value.Bind(assembler->LoadHeapNumberValue(value)); |
1888 assembler->Goto(&do_fdec); | 1889 assembler->Goto(&do_fdec); |
1889 } | 1890 } |
1890 | 1891 |
1891 assembler->Bind(&if_valuenotnumber); | 1892 assembler->Bind(&if_valuenotnumber); |
1892 { | 1893 { |
1893 // We do not require an Or with earlier feedback here because once we | 1894 // We do not require an Or with earlier feedback here because once we |
1894 // convert the value to a number, we cannot reach this path. We can | 1895 // convert the value to a number, we cannot reach this path. We can |
1895 // only reach this path on the first pass when the feedback is kNone. | 1896 // only reach this path on the first pass when the feedback is kNone. |
1896 assembler->Assert(assembler->Word32Equal( | 1897 CSA_ASSERT(assembler, |
1897 var_type_feedback.value(), | 1898 assembler->Word32Equal(var_type_feedback.value(), |
1898 assembler->Int32Constant(BinaryOperationFeedback::kNone))); | 1899 assembler->Int32Constant( |
| 1900 BinaryOperationFeedback::kNone))); |
1899 | 1901 |
1900 Label if_valueisoddball(assembler), if_valuenotoddball(assembler); | 1902 Label if_valueisoddball(assembler), if_valuenotoddball(assembler); |
1901 Node* instance_type = assembler->LoadMapInstanceType(value_map); | 1903 Node* instance_type = assembler->LoadMapInstanceType(value_map); |
1902 Node* is_oddball = assembler->Word32Equal( | 1904 Node* is_oddball = assembler->Word32Equal( |
1903 instance_type, assembler->Int32Constant(ODDBALL_TYPE)); | 1905 instance_type, assembler->Int32Constant(ODDBALL_TYPE)); |
1904 assembler->Branch(is_oddball, &if_valueisoddball, &if_valuenotoddball); | 1906 assembler->Branch(is_oddball, &if_valueisoddball, &if_valuenotoddball); |
1905 | 1907 |
1906 assembler->Bind(&if_valueisoddball); | 1908 assembler->Bind(&if_valueisoddball); |
1907 { | 1909 { |
1908 // Convert Oddball to Number and check again. | 1910 // Convert Oddball to Number and check again. |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2564 assembler->GotoIf(is_async, &if_async); | 2566 assembler->GotoIf(is_async, &if_async); |
2565 | 2567 |
2566 Node* is_class_constructor = assembler->Word32And( | 2568 Node* is_class_constructor = assembler->Word32And( |
2567 compiler_hints, | 2569 compiler_hints, |
2568 assembler->Int32Constant(FunctionKind::kClassConstructor | 2570 assembler->Int32Constant(FunctionKind::kClassConstructor |
2569 << SharedFunctionInfo::kFunctionKindShift)); | 2571 << SharedFunctionInfo::kFunctionKindShift)); |
2570 assembler->GotoIf(is_class_constructor, &if_class_constructor); | 2572 assembler->GotoIf(is_class_constructor, &if_class_constructor); |
2571 | 2573 |
2572 if (FLAG_debug_code) { | 2574 if (FLAG_debug_code) { |
2573 // Function must be a function without a prototype. | 2575 // Function must be a function without a prototype. |
2574 assembler->Assert(assembler->Word32And( | 2576 CSA_ASSERT(assembler, assembler->Word32And( |
2575 compiler_hints, | 2577 compiler_hints, |
2576 assembler->Int32Constant((FunctionKind::kAccessorFunction | | 2578 assembler->Int32Constant( |
2577 FunctionKind::kArrowFunction | | 2579 (FunctionKind::kAccessorFunction | |
2578 FunctionKind::kConciseMethod) | 2580 FunctionKind::kArrowFunction | |
2579 << SharedFunctionInfo::kFunctionKindShift))); | 2581 FunctionKind::kConciseMethod) |
| 2582 << SharedFunctionInfo::kFunctionKindShift))); |
2580 } | 2583 } |
2581 assembler->Goto(&if_function_without_prototype); | 2584 assembler->Goto(&if_function_without_prototype); |
2582 | 2585 |
2583 assembler->Bind(&if_normal); | 2586 assembler->Bind(&if_normal); |
2584 { | 2587 { |
2585 map_index.Bind(assembler->Select( | 2588 map_index.Bind(assembler->Select( |
2586 is_strict, | 2589 is_strict, |
2587 assembler->IntPtrConstant(Context::STRICT_FUNCTION_MAP_INDEX), | 2590 assembler->IntPtrConstant(Context::STRICT_FUNCTION_MAP_INDEX), |
2588 assembler->IntPtrConstant(Context::SLOPPY_FUNCTION_MAP_INDEX))); | 2591 assembler->IntPtrConstant(Context::SLOPPY_FUNCTION_MAP_INDEX))); |
2589 assembler->Goto(&load_map); | 2592 assembler->Goto(&load_map); |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3319 | 3322 |
3320 if (type == MachineType::Pointer()) { | 3323 if (type == MachineType::Pointer()) { |
3321 return Representation::External(); | 3324 return Representation::External(); |
3322 } | 3325 } |
3323 | 3326 |
3324 return Representation::Tagged(); | 3327 return Representation::Tagged(); |
3325 } | 3328 } |
3326 | 3329 |
3327 } // namespace internal | 3330 } // namespace internal |
3328 } // namespace v8 | 3331 } // namespace v8 |
OLD | NEW |