OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 24 matching lines...) Expand all Loading... |
35 type_(NULL), | 35 type_(NULL), |
36 temp_index_(-1), | 36 temp_index_(-1), |
37 ssa_temp_index_(-1), | 37 ssa_temp_index_(-1), |
38 input_use_list_(NULL), | 38 input_use_list_(NULL), |
39 env_use_list_(NULL), | 39 env_use_list_(NULL), |
40 use_kind_(kValue), // Phis and parameters rely on this default. | 40 use_kind_(kValue), // Phis and parameters rely on this default. |
41 constant_value_(Object::ZoneHandle(ConstantPropagator::Unknown())) { | 41 constant_value_(Object::ZoneHandle(ConstantPropagator::Unknown())) { |
42 } | 42 } |
43 | 43 |
44 | 44 |
| 45 ICData* Instruction::GetICData(const Array& ic_data_array) const { |
| 46 ICData& ic_data = ICData::ZoneHandle(); |
| 47 // The deopt_id can be outside the range of the IC data array for |
| 48 // computations added in the optimizing compiler. |
| 49 if (!ic_data_array.IsNull() && (deopt_id_ < ic_data_array.Length())) { |
| 50 ic_data ^= ic_data_array.At(deopt_id_); |
| 51 } |
| 52 return &ic_data; |
| 53 } |
| 54 |
| 55 |
45 intptr_t Instruction::Hashcode() const { | 56 intptr_t Instruction::Hashcode() const { |
46 intptr_t result = tag(); | 57 intptr_t result = tag(); |
47 for (intptr_t i = 0; i < InputCount(); ++i) { | 58 for (intptr_t i = 0; i < InputCount(); ++i) { |
48 Value* value = InputAt(i); | 59 Value* value = InputAt(i); |
49 intptr_t j = value->definition()->ssa_temp_index(); | 60 intptr_t j = value->definition()->ssa_temp_index(); |
50 result = result * 31 + j; | 61 result = result * 31 + j; |
51 } | 62 } |
52 return result; | 63 return result; |
53 } | 64 } |
54 | 65 |
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2439 default: | 2450 default: |
2440 UNREACHABLE(); | 2451 UNREACHABLE(); |
2441 } | 2452 } |
2442 return kPowRuntimeEntry; | 2453 return kPowRuntimeEntry; |
2443 } | 2454 } |
2444 | 2455 |
2445 | 2456 |
2446 #undef __ | 2457 #undef __ |
2447 | 2458 |
2448 } // namespace dart | 2459 } // namespace dart |
OLD | NEW |