OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 RawAbstractType* BinaryDoubleOpComp::CompileType() const { | 1016 RawAbstractType* BinaryDoubleOpComp::CompileType() const { |
1017 return Type::DoubleInterface(); | 1017 return Type::DoubleInterface(); |
1018 } | 1018 } |
1019 | 1019 |
1020 | 1020 |
1021 intptr_t BinaryDoubleOpComp::ResultCid() const { | 1021 intptr_t BinaryDoubleOpComp::ResultCid() const { |
1022 return kDoubleCid; | 1022 return kDoubleCid; |
1023 } | 1023 } |
1024 | 1024 |
1025 | 1025 |
| 1026 RawAbstractType* UnboxedDoubleBinaryOpComp::CompileType() const { |
| 1027 return Type::DoubleInterface(); |
| 1028 } |
| 1029 |
| 1030 |
| 1031 RawAbstractType* UnboxDoubleComp::CompileType() const { |
| 1032 return Type::null(); |
| 1033 } |
| 1034 |
| 1035 |
| 1036 intptr_t BoxDoubleComp::ResultCid() const { |
| 1037 return kDoubleCid; |
| 1038 } |
| 1039 |
| 1040 |
| 1041 RawAbstractType* BoxDoubleComp::CompileType() const { |
| 1042 return Type::DoubleInterface(); |
| 1043 } |
| 1044 |
| 1045 |
1026 RawAbstractType* UnarySmiOpComp::CompileType() const { | 1046 RawAbstractType* UnarySmiOpComp::CompileType() const { |
1027 return Type::IntInterface(); | 1047 return Type::IntInterface(); |
1028 } | 1048 } |
1029 | 1049 |
1030 | 1050 |
1031 RawAbstractType* NumberNegateComp::CompileType() const { | 1051 RawAbstractType* NumberNegateComp::CompileType() const { |
1032 // Implemented only for doubles. | 1052 // Implemented only for doubles. |
1033 return Type::DoubleInterface(); | 1053 return Type::DoubleInterface(); |
1034 } | 1054 } |
1035 | 1055 |
1036 | 1056 |
1037 RawAbstractType* DoubleToDoubleComp::CompileType() const { | 1057 RawAbstractType* DoubleToDoubleComp::CompileType() const { |
1038 return Type::DoubleInterface(); | 1058 return Type::DoubleInterface(); |
1039 } | 1059 } |
1040 | 1060 |
1041 | 1061 |
1042 RawAbstractType* SmiToDoubleComp::CompileType() const { | 1062 RawAbstractType* SmiToDoubleComp::CompileType() const { |
1043 return Type::DoubleInterface(); | 1063 return Type::DoubleInterface(); |
1044 } | 1064 } |
1045 | 1065 |
1046 | 1066 |
1047 RawAbstractType* CheckClassComp::CompileType() const { | 1067 RawAbstractType* CheckClassComp::CompileType() const { |
1048 return AbstractType::null(); | 1068 return AbstractType::null(); |
1049 } | 1069 } |
1050 | 1070 |
1051 | 1071 |
| 1072 RawAbstractType* CheckEitherNonSmiComp::CompileType() const { |
| 1073 return AbstractType::null(); |
| 1074 } |
| 1075 |
| 1076 |
1052 // Shared code generation methods (EmitNativeCode, MakeLocationSummary, and | 1077 // Shared code generation methods (EmitNativeCode, MakeLocationSummary, and |
1053 // PrepareEntry). Only assembly code that can be shared across all architectures | 1078 // PrepareEntry). Only assembly code that can be shared across all architectures |
1054 // can be used. Machine specific register allocation and code generation | 1079 // can be used. Machine specific register allocation and code generation |
1055 // is located in intermediate_language_<arch>.cc | 1080 // is located in intermediate_language_<arch>.cc |
1056 | 1081 |
1057 | 1082 |
1058 // True iff. the arguments to a call will be properly pushed and can | 1083 // True iff. the arguments to a call will be properly pushed and can |
1059 // be popped after the call. | 1084 // be popped after the call. |
1060 template <typename T> static bool VerifyCallComputation(T* comp) { | 1085 template <typename T> static bool VerifyCallComputation(T* comp) { |
1061 // Argument values should be consecutive temps. | 1086 // Argument values should be consecutive temps. |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 intptr_t fixed_parameter_count) | 1548 intptr_t fixed_parameter_count) |
1524 : values_(definitions.length()), | 1549 : values_(definitions.length()), |
1525 locations_(NULL), | 1550 locations_(NULL), |
1526 fixed_parameter_count_(fixed_parameter_count) { | 1551 fixed_parameter_count_(fixed_parameter_count) { |
1527 for (intptr_t i = 0; i < definitions.length(); ++i) { | 1552 for (intptr_t i = 0; i < definitions.length(); ++i) { |
1528 values_.Add(UseDefinition(definitions[i])); | 1553 values_.Add(UseDefinition(definitions[i])); |
1529 } | 1554 } |
1530 } | 1555 } |
1531 | 1556 |
1532 | 1557 |
| 1558 Environment::Environment(const GrowableArray<Value*>& values, |
| 1559 intptr_t fixed_parameter_count) |
| 1560 : values_(values.length()), |
| 1561 locations_(NULL), |
| 1562 fixed_parameter_count_(fixed_parameter_count) { |
| 1563 values_.AddArray(values); |
| 1564 } |
| 1565 |
1533 #undef __ | 1566 #undef __ |
1534 | 1567 |
1535 } // namespace dart | 1568 } // namespace dart |
OLD | NEW |