OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/js-typed-lowering.h" | 5 #include "src/compiler/js-typed-lowering.h" |
6 | 6 |
7 #include "src/ast/modules.h" | 7 #include "src/ast/modules.h" |
8 #include "src/builtins/builtins-utils.h" | 8 #include "src/builtins/builtins-utils.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compilation-dependencies.h" | 10 #include "src/compilation-dependencies.h" |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 Node* value; | 942 Node* value; |
943 if (String::Equals(type, factory()->boolean_string())) { | 943 if (String::Equals(type, factory()->boolean_string())) { |
944 value = | 944 value = |
945 graph()->NewNode(common()->Select(MachineRepresentation::kTagged), | 945 graph()->NewNode(common()->Select(MachineRepresentation::kTagged), |
946 graph()->NewNode(simplified()->ReferenceEqual(), input, | 946 graph()->NewNode(simplified()->ReferenceEqual(), input, |
947 jsgraph()->TrueConstant()), | 947 jsgraph()->TrueConstant()), |
948 jsgraph()->TrueConstant(), | 948 jsgraph()->TrueConstant(), |
949 graph()->NewNode(simplified()->ReferenceEqual(), input, | 949 graph()->NewNode(simplified()->ReferenceEqual(), input, |
950 jsgraph()->FalseConstant())); | 950 jsgraph()->FalseConstant())); |
951 } else if (String::Equals(type, factory()->function_string())) { | 951 } else if (String::Equals(type, factory()->function_string())) { |
952 value = graph()->NewNode(simplified()->ObjectIsCallable(), input); | 952 value = graph()->NewNode(simplified()->TypeOfIsFunction(), input); |
953 } else if (String::Equals(type, factory()->number_string())) { | 953 } else if (String::Equals(type, factory()->number_string())) { |
954 value = graph()->NewNode(simplified()->ObjectIsNumber(), input); | 954 value = graph()->NewNode(simplified()->ObjectIsNumber(), input); |
955 } else if (String::Equals(type, factory()->object_string())) { | 955 } else if (String::Equals(type, factory()->object_string())) { |
956 value = graph()->NewNode( | 956 value = graph()->NewNode( |
957 common()->Select(MachineRepresentation::kTagged), | 957 common()->Select(MachineRepresentation::kTagged), |
958 graph()->NewNode(simplified()->ObjectIsNonCallable(), input), | 958 graph()->NewNode(simplified()->ObjectIsNonCallable(), input), |
959 jsgraph()->TrueConstant(), | 959 jsgraph()->TrueConstant(), |
960 graph()->NewNode(simplified()->ReferenceEqual(), input, | 960 graph()->NewNode(simplified()->ReferenceEqual(), input, |
961 jsgraph()->NullConstant())); | 961 jsgraph()->NullConstant())); |
962 } else if (String::Equals(type, factory()->string_string())) { | 962 } else if (String::Equals(type, factory()->string_string())) { |
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2531 } | 2531 } |
2532 | 2532 |
2533 | 2533 |
2534 CompilationDependencies* JSTypedLowering::dependencies() const { | 2534 CompilationDependencies* JSTypedLowering::dependencies() const { |
2535 return dependencies_; | 2535 return dependencies_; |
2536 } | 2536 } |
2537 | 2537 |
2538 } // namespace compiler | 2538 } // namespace compiler |
2539 } // namespace internal | 2539 } // namespace internal |
2540 } // namespace v8 | 2540 } // namespace v8 |
OLD | NEW |