OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/representation-change.h" | 5 #include "src/compiler/representation-change.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 | 911 |
912 | 912 |
913 Node* RepresentationChanger::TypeError(Node* node, | 913 Node* RepresentationChanger::TypeError(Node* node, |
914 MachineRepresentation output_rep, | 914 MachineRepresentation output_rep, |
915 Type* output_type, | 915 Type* output_type, |
916 MachineRepresentation use) { | 916 MachineRepresentation use) { |
917 type_error_ = true; | 917 type_error_ = true; |
918 if (!testing_type_errors_) { | 918 if (!testing_type_errors_) { |
919 std::ostringstream out_str; | 919 std::ostringstream out_str; |
920 out_str << output_rep << " ("; | 920 out_str << output_rep << " ("; |
921 output_type->PrintTo(out_str, Type::SEMANTIC_DIM); | 921 output_type->PrintTo(out_str); |
922 out_str << ")"; | 922 out_str << ")"; |
923 | 923 |
924 std::ostringstream use_str; | 924 std::ostringstream use_str; |
925 use_str << use; | 925 use_str << use; |
926 | 926 |
927 V8_Fatal(__FILE__, __LINE__, | 927 V8_Fatal(__FILE__, __LINE__, |
928 "RepresentationChangerError: node #%d:%s of " | 928 "RepresentationChangerError: node #%d:%s of " |
929 "%s cannot be changed to %s", | 929 "%s cannot be changed to %s", |
930 node->id(), node->op()->mnemonic(), out_str.str().c_str(), | 930 node->id(), node->op()->mnemonic(), out_str.str().c_str(), |
931 use_str.str().c_str()); | 931 use_str.str().c_str()); |
(...skipping 20 matching lines...) Expand all Loading... |
952 } | 952 } |
953 | 953 |
954 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { | 954 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { |
955 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), | 955 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), |
956 node); | 956 node); |
957 } | 957 } |
958 | 958 |
959 } // namespace compiler | 959 } // namespace compiler |
960 } // namespace internal | 960 } // namespace internal |
961 } // namespace v8 | 961 } // namespace v8 |
OLD | NEW |