| 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 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2279 code_, | 2279 code_, |
| 2280 (outer_ == NULL) ? NULL : outer_->DeepCopy()); | 2280 (outer_ == NULL) ? NULL : outer_->DeepCopy()); |
| 2281 if (locations_ != NULL) { | 2281 if (locations_ != NULL) { |
| 2282 Location* new_locations = | 2282 Location* new_locations = |
| 2283 Isolate::Current()->current_zone()->Alloc<Location>(length); | 2283 Isolate::Current()->current_zone()->Alloc<Location>(length); |
| 2284 copy->set_locations(new_locations); | 2284 copy->set_locations(new_locations); |
| 2285 } | 2285 } |
| 2286 for (intptr_t i = 0; i < length; ++i) { | 2286 for (intptr_t i = 0; i < length; ++i) { |
| 2287 copy->values_.Add(values_[i]->Copy()); | 2287 copy->values_.Add(values_[i]->Copy()); |
| 2288 if (locations_ != NULL) { | 2288 if (locations_ != NULL) { |
| 2289 copy->locations_[i] = locations_[i]; | 2289 copy->locations_[i] = locations_[i].Copy(); |
| 2290 } | 2290 } |
| 2291 } | 2291 } |
| 2292 return copy; | 2292 return copy; |
| 2293 } | 2293 } |
| 2294 | 2294 |
| 2295 | 2295 |
| 2296 // Copies the environment and updates the environment use lists. | 2296 // Copies the environment and updates the environment use lists. |
| 2297 void Environment::DeepCopyTo(Instruction* instr) const { | 2297 void Environment::DeepCopyTo(Instruction* instr) const { |
| 2298 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { | 2298 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { |
| 2299 it.CurrentValue()->RemoveFromUseList(); | 2299 it.CurrentValue()->RemoveFromUseList(); |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3335 case Token::kTRUNCDIV: return 0; | 3335 case Token::kTRUNCDIV: return 0; |
| 3336 case Token::kMOD: return 1; | 3336 case Token::kMOD: return 1; |
| 3337 default: UNIMPLEMENTED(); return -1; | 3337 default: UNIMPLEMENTED(); return -1; |
| 3338 } | 3338 } |
| 3339 } | 3339 } |
| 3340 | 3340 |
| 3341 | 3341 |
| 3342 #undef __ | 3342 #undef __ |
| 3343 | 3343 |
| 3344 } // namespace dart | 3344 } // namespace dart |
| OLD | NEW |