Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: runtime/vm/intermediate_language.cc

Issue 2639273003: Fix environment mismatch in AOT inlining. (Closed)
Patch Set: clean up Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/constant_propagator.h" 10 #include "vm/constant_propagator.h"
(...skipping 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after
3320 Environment* env = 3320 Environment* env =
3321 new (zone) Environment(definitions.length(), fixed_parameter_count, 3321 new (zone) Environment(definitions.length(), fixed_parameter_count,
3322 Thread::kNoDeoptId, parsed_function, NULL); 3322 Thread::kNoDeoptId, parsed_function, NULL);
3323 for (intptr_t i = 0; i < definitions.length(); ++i) { 3323 for (intptr_t i = 0; i < definitions.length(); ++i) {
3324 env->values_.Add(new (zone) Value(definitions[i])); 3324 env->values_.Add(new (zone) Value(definitions[i]));
3325 } 3325 }
3326 return env; 3326 return env;
3327 } 3327 }
3328 3328
3329 3329
3330 void Environment::PushValue(Value* value) {
3331 values_.Add(value);
3332 }
3333
3334
3330 Environment* Environment::DeepCopy(Zone* zone, intptr_t length) const { 3335 Environment* Environment::DeepCopy(Zone* zone, intptr_t length) const {
3331 ASSERT(length <= values_.length()); 3336 ASSERT(length <= values_.length());
3332 Environment* copy = new (zone) 3337 Environment* copy = new (zone)
3333 Environment(length, fixed_parameter_count_, deopt_id_, parsed_function_, 3338 Environment(length, fixed_parameter_count_, deopt_id_, parsed_function_,
3334 (outer_ == NULL) ? NULL : outer_->DeepCopy(zone)); 3339 (outer_ == NULL) ? NULL : outer_->DeepCopy(zone));
3335 if (locations_ != NULL) { 3340 if (locations_ != NULL) {
3336 Location* new_locations = zone->Alloc<Location>(length); 3341 Location* new_locations = zone->Alloc<Location>(length);
3337 copy->set_locations(new_locations); 3342 copy->set_locations(new_locations);
3338 } 3343 }
3339 for (intptr_t i = 0; i < length; ++i) { 3344 for (intptr_t i = 0; i < length; ++i) {
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
3931 set_native_c_function(native_function); 3936 set_native_c_function(native_function);
3932 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3937 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3933 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3938 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3934 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3939 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3935 set_is_bootstrap_native(is_bootstrap_native); 3940 set_is_bootstrap_native(is_bootstrap_native);
3936 } 3941 }
3937 3942
3938 #undef __ 3943 #undef __
3939 3944
3940 } // namespace dart 3945 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698