| 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/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 if (defn->IsRedefinition()) { | 52 if (defn->IsRedefinition()) { |
| 53 defn = defn->AsRedefinition()->value()->definition(); | 53 defn = defn->AsRedefinition()->value()->definition(); |
| 54 } else { | 54 } else { |
| 55 defn = defn->AsAssertAssignable()->value()->definition(); | 55 defn = defn->AsAssertAssignable()->value()->definition(); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 return defn; | 58 return defn; |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| 62 ICData* Instruction::GetICData(const Array& ic_data_array) const { | 62 const ICData* Instruction::GetICData( |
| 63 ICData& ic_data = ICData::ZoneHandle(); | 63 const ZoneGrowableArray<const ICData*>& ic_data_array) const { |
| 64 // The deopt_id can be outside the range of the IC data array for | 64 // The deopt_id can be outside the range of the IC data array for |
| 65 // computations added in the optimizing compiler. | 65 // computations added in the optimizing compiler. |
| 66 if (!ic_data_array.IsNull() && (deopt_id_ < ic_data_array.Length())) { | 66 if (deopt_id_ < ic_data_array.length()) { |
| 67 ic_data ^= ic_data_array.At(deopt_id_); | 67 return ic_data_array[deopt_id_]; |
| 68 } | 68 } |
| 69 return &ic_data; | 69 return NULL; |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 intptr_t Instruction::Hashcode() const { | 73 intptr_t Instruction::Hashcode() const { |
| 74 intptr_t result = tag(); | 74 intptr_t result = tag(); |
| 75 for (intptr_t i = 0; i < InputCount(); ++i) { | 75 for (intptr_t i = 0; i < InputCount(); ++i) { |
| 76 Value* value = InputAt(i); | 76 Value* value = InputAt(i); |
| 77 intptr_t j = value->definition()->ssa_temp_index(); | 77 intptr_t j = value->definition()->ssa_temp_index(); |
| 78 result = result * 31 + j; | 78 result = result * 31 + j; |
| 79 } | 79 } |
| (...skipping 3509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3589 case Token::kTRUNCDIV: return 0; | 3589 case Token::kTRUNCDIV: return 0; |
| 3590 case Token::kMOD: return 1; | 3590 case Token::kMOD: return 1; |
| 3591 default: UNIMPLEMENTED(); return -1; | 3591 default: UNIMPLEMENTED(); return -1; |
| 3592 } | 3592 } |
| 3593 } | 3593 } |
| 3594 | 3594 |
| 3595 | 3595 |
| 3596 #undef __ | 3596 #undef __ |
| 3597 | 3597 |
| 3598 } // namespace dart | 3598 } // namespace dart |
| OLD | NEW |