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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 } | 852 } |
853 } | 853 } |
854 } | 854 } |
855 } | 855 } |
856 | 856 |
857 assembler->Bind(&do_fadd); | 857 assembler->Bind(&do_fadd); |
858 { | 858 { |
859 Node* lhs_value = var_fadd_lhs.value(); | 859 Node* lhs_value = var_fadd_lhs.value(); |
860 Node* rhs_value = var_fadd_rhs.value(); | 860 Node* rhs_value = var_fadd_rhs.value(); |
861 Node* value = assembler->Float64Add(lhs_value, rhs_value); | 861 Node* value = assembler->Float64Add(lhs_value, rhs_value); |
862 // TODO(bmeurer): Introduce a ChangeFloat64ToTagged. | 862 Node* result = assembler->ChangeFloat64ToTagged(value); |
863 Node* result = assembler->AllocateHeapNumberWithValue(value); | |
864 assembler->Return(result); | 863 assembler->Return(result); |
865 } | 864 } |
866 } | 865 } |
867 | 866 |
868 void SubtractStub::GenerateAssembly( | 867 void SubtractStub::GenerateAssembly( |
869 compiler::CodeStubAssembler* assembler) const { | 868 compiler::CodeStubAssembler* assembler) const { |
870 typedef compiler::CodeStubAssembler::Label Label; | 869 typedef compiler::CodeStubAssembler::Label Label; |
871 typedef compiler::Node Node; | 870 typedef compiler::Node Node; |
872 typedef compiler::CodeStubAssembler::Variable Variable; | 871 typedef compiler::CodeStubAssembler::Variable Variable; |
873 | 872 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 assembler->Goto(&loop); | 1019 assembler->Goto(&loop); |
1021 } | 1020 } |
1022 } | 1021 } |
1023 } | 1022 } |
1024 | 1023 |
1025 assembler->Bind(&do_fsub); | 1024 assembler->Bind(&do_fsub); |
1026 { | 1025 { |
1027 Node* lhs_value = var_fsub_lhs.value(); | 1026 Node* lhs_value = var_fsub_lhs.value(); |
1028 Node* rhs_value = var_fsub_rhs.value(); | 1027 Node* rhs_value = var_fsub_rhs.value(); |
1029 Node* value = assembler->Float64Sub(lhs_value, rhs_value); | 1028 Node* value = assembler->Float64Sub(lhs_value, rhs_value); |
1030 // TODO(bmeurer): Introduce a ChangeFloat64ToTagged. | 1029 Node* result = assembler->ChangeFloat64ToTagged(value); |
1031 Node* result = assembler->AllocateHeapNumberWithValue(value); | |
1032 assembler->Return(result); | 1030 assembler->Return(result); |
1033 } | 1031 } |
1034 } | 1032 } |
1035 | 1033 |
1036 void BitwiseAndStub::GenerateAssembly( | 1034 void BitwiseAndStub::GenerateAssembly( |
1037 compiler::CodeStubAssembler* assembler) const { | 1035 compiler::CodeStubAssembler* assembler) const { |
1038 using compiler::Node; | 1036 using compiler::Node; |
1039 | 1037 |
1040 Node* lhs = assembler->Parameter(0); | 1038 Node* lhs = assembler->Parameter(0); |
1041 Node* rhs = assembler->Parameter(1); | 1039 Node* rhs = assembler->Parameter(1); |
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3377 if (type->Is(Type::UntaggedPointer())) { | 3375 if (type->Is(Type::UntaggedPointer())) { |
3378 return Representation::External(); | 3376 return Representation::External(); |
3379 } | 3377 } |
3380 | 3378 |
3381 DCHECK(!type->Is(Type::Untagged())); | 3379 DCHECK(!type->Is(Type::Untagged())); |
3382 return Representation::Tagged(); | 3380 return Representation::Tagged(); |
3383 } | 3381 } |
3384 | 3382 |
3385 } // namespace internal | 3383 } // namespace internal |
3386 } // namespace v8 | 3384 } // namespace v8 |
OLD | NEW |