| 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/cpu.h" | 8 #include "vm/cpu.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 return defn; | 61 return defn; |
| 62 } | 62 } |
| 63 | 63 |
| 64 | 64 |
| 65 const ICData* Instruction::GetICData( | 65 const ICData* Instruction::GetICData( |
| 66 const ZoneGrowableArray<const ICData*>& ic_data_array) const { | 66 const ZoneGrowableArray<const ICData*>& ic_data_array) const { |
| 67 // The deopt_id can be outside the range of the IC data array for | 67 // The deopt_id can be outside the range of the IC data array for |
| 68 // computations added in the optimizing compiler. | 68 // computations added in the optimizing compiler. |
| 69 ASSERT(deopt_id_ != Isolate::kNoDeoptId); |
| 69 if (deopt_id_ < ic_data_array.length()) { | 70 if (deopt_id_ < ic_data_array.length()) { |
| 70 return ic_data_array[deopt_id_]; | 71 return ic_data_array[deopt_id_]; |
| 71 } | 72 } |
| 72 return NULL; | 73 return NULL; |
| 73 } | 74 } |
| 74 | 75 |
| 75 | 76 |
| 76 intptr_t Instruction::Hashcode() const { | 77 intptr_t Instruction::Hashcode() const { |
| 77 intptr_t result = tag(); | 78 intptr_t result = tag(); |
| 78 for (intptr_t i = 0; i < InputCount(); ++i) { | 79 for (intptr_t i = 0; i < InputCount(); ++i) { |
| (...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 } | 2676 } |
| 2676 | 2677 |
| 2677 | 2678 |
| 2678 StrictCompareInstr::StrictCompareInstr(intptr_t token_pos, | 2679 StrictCompareInstr::StrictCompareInstr(intptr_t token_pos, |
| 2679 Token::Kind kind, | 2680 Token::Kind kind, |
| 2680 Value* left, | 2681 Value* left, |
| 2681 Value* right, | 2682 Value* right, |
| 2682 bool needs_number_check) | 2683 bool needs_number_check) |
| 2683 : ComparisonInstr(token_pos, kind, left, right), | 2684 : ComparisonInstr(token_pos, kind, left, right), |
| 2684 needs_number_check_(needs_number_check) { | 2685 needs_number_check_(needs_number_check) { |
| 2686 deopt_id_ = Isolate::Current()->GetNextDeoptId(); |
| 2685 ASSERT((kind == Token::kEQ_STRICT) || (kind == Token::kNE_STRICT)); | 2687 ASSERT((kind == Token::kEQ_STRICT) || (kind == Token::kNE_STRICT)); |
| 2686 } | 2688 } |
| 2687 | 2689 |
| 2688 | 2690 |
| 2689 LocationSummary* InstanceCallInstr::MakeLocationSummary(Isolate* isolate, | 2691 LocationSummary* InstanceCallInstr::MakeLocationSummary(Isolate* isolate, |
| 2690 bool optimizing) const { | 2692 bool optimizing) const { |
| 2691 return MakeCallSummary(); | 2693 return MakeCallSummary(); |
| 2692 } | 2694 } |
| 2693 | 2695 |
| 2694 | 2696 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3318 case Token::kTRUNCDIV: return 0; | 3320 case Token::kTRUNCDIV: return 0; |
| 3319 case Token::kMOD: return 1; | 3321 case Token::kMOD: return 1; |
| 3320 default: UNIMPLEMENTED(); return -1; | 3322 default: UNIMPLEMENTED(); return -1; |
| 3321 } | 3323 } |
| 3322 } | 3324 } |
| 3323 | 3325 |
| 3324 | 3326 |
| 3325 #undef __ | 3327 #undef __ |
| 3326 | 3328 |
| 3327 } // namespace dart | 3329 } // namespace dart |
| OLD | NEW |