| 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/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
| (...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 | 1916 |
| 1917 | 1917 |
| 1918 Environment* Environment::DeepCopy(intptr_t length) const { | 1918 Environment* Environment::DeepCopy(intptr_t length) const { |
| 1919 ASSERT(length <= values_.length()); | 1919 ASSERT(length <= values_.length()); |
| 1920 Environment* copy = | 1920 Environment* copy = |
| 1921 new Environment(length, | 1921 new Environment(length, |
| 1922 fixed_parameter_count_, | 1922 fixed_parameter_count_, |
| 1923 deopt_id_, | 1923 deopt_id_, |
| 1924 function_, | 1924 function_, |
| 1925 (outer_ == NULL) ? NULL : outer_->DeepCopy()); | 1925 (outer_ == NULL) ? NULL : outer_->DeepCopy()); |
| 1926 if (locations_ != NULL) { |
| 1927 Location* new_locations = |
| 1928 Isolate::Current()->current_zone()->Alloc<Location>(length); |
| 1929 copy->set_locations(new_locations); |
| 1930 } |
| 1926 for (intptr_t i = 0; i < length; ++i) { | 1931 for (intptr_t i = 0; i < length; ++i) { |
| 1927 copy->values_.Add(values_[i]->Copy()); | 1932 copy->values_.Add(values_[i]->Copy()); |
| 1933 if (locations_ != NULL) { |
| 1934 copy->locations_[i] = locations_[i]; |
| 1935 } |
| 1928 } | 1936 } |
| 1929 return copy; | 1937 return copy; |
| 1930 } | 1938 } |
| 1931 | 1939 |
| 1932 | 1940 |
| 1933 // Copies the environment and updates the environment use lists. | 1941 // Copies the environment and updates the environment use lists. |
| 1934 void Environment::DeepCopyTo(Instruction* instr) const { | 1942 void Environment::DeepCopyTo(Instruction* instr) const { |
| 1935 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { | 1943 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { |
| 1936 it.CurrentValue()->RemoveFromUseList(); | 1944 it.CurrentValue()->RemoveFromUseList(); |
| 1937 } | 1945 } |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2702 return kCosRuntimeEntry; | 2710 return kCosRuntimeEntry; |
| 2703 default: | 2711 default: |
| 2704 UNREACHABLE(); | 2712 UNREACHABLE(); |
| 2705 } | 2713 } |
| 2706 return kSinRuntimeEntry; | 2714 return kSinRuntimeEntry; |
| 2707 } | 2715 } |
| 2708 | 2716 |
| 2709 #undef __ | 2717 #undef __ |
| 2710 | 2718 |
| 2711 } // namespace dart | 2719 } // namespace dart |
| OLD | NEW |