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 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2342 code_, | 2342 code_, |
2343 (outer_ == NULL) ? NULL : outer_->DeepCopy()); | 2343 (outer_ == NULL) ? NULL : outer_->DeepCopy()); |
2344 if (locations_ != NULL) { | 2344 if (locations_ != NULL) { |
2345 Location* new_locations = | 2345 Location* new_locations = |
2346 Isolate::Current()->current_zone()->Alloc<Location>(length); | 2346 Isolate::Current()->current_zone()->Alloc<Location>(length); |
2347 copy->set_locations(new_locations); | 2347 copy->set_locations(new_locations); |
2348 } | 2348 } |
2349 for (intptr_t i = 0; i < length; ++i) { | 2349 for (intptr_t i = 0; i < length; ++i) { |
2350 copy->values_.Add(values_[i]->Copy()); | 2350 copy->values_.Add(values_[i]->Copy()); |
2351 if (locations_ != NULL) { | 2351 if (locations_ != NULL) { |
2352 copy->locations_[i] = locations_[i]; | 2352 copy->locations_[i] = locations_[i].Copy(); |
2353 } | 2353 } |
2354 } | 2354 } |
2355 return copy; | 2355 return copy; |
2356 } | 2356 } |
2357 | 2357 |
2358 | 2358 |
2359 // Copies the environment and updates the environment use lists. | 2359 // Copies the environment and updates the environment use lists. |
2360 void Environment::DeepCopyTo(Instruction* instr) const { | 2360 void Environment::DeepCopyTo(Instruction* instr) const { |
2361 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { | 2361 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { |
2362 it.CurrentValue()->RemoveFromUseList(); | 2362 it.CurrentValue()->RemoveFromUseList(); |
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3424 case Token::kTRUNCDIV: return 0; | 3424 case Token::kTRUNCDIV: return 0; |
3425 case Token::kMOD: return 1; | 3425 case Token::kMOD: return 1; |
3426 default: UNIMPLEMENTED(); return -1; | 3426 default: UNIMPLEMENTED(); return -1; |
3427 } | 3427 } |
3428 } | 3428 } |
3429 | 3429 |
3430 | 3430 |
3431 #undef __ | 3431 #undef __ |
3432 | 3432 |
3433 } // namespace dart | 3433 } // namespace dart |
OLD | NEW |