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

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

Issue 575443002: Refactor generating lazy deoptimization descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | 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/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 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 instr->SetEnvironment(copy); 2715 instr->SetEnvironment(copy);
2716 for (Environment::DeepIterator it(copy); !it.Done(); it.Advance()) { 2716 for (Environment::DeepIterator it(copy); !it.Done(); it.Advance()) {
2717 Value* value = it.CurrentValue(); 2717 Value* value = it.CurrentValue();
2718 value->definition()->AddEnvUse(value); 2718 value->definition()->AddEnvUse(value);
2719 } 2719 }
2720 } 2720 }
2721 2721
2722 2722
2723 // Copies the environment as outer on an inlined instruction and updates the 2723 // Copies the environment as outer on an inlined instruction and updates the
2724 // environment use lists. 2724 // environment use lists.
2725 void Environment::DeepCopyToOuter(Isolate* isolate, Instruction* instr) const { 2725 void Environment::DeepCopyToOuter(Isolate* isolate,
2726 Instruction* instr,
2727 intptr_t input_count) const {
2726 // Create a deep copy removing caller arguments from the environment. 2728 // Create a deep copy removing caller arguments from the environment.
2727 ASSERT(this != NULL); 2729 ASSERT(this != NULL);
2728 ASSERT(instr->env()->outer() == NULL); 2730 ASSERT(instr->env()->outer() == NULL);
2729 intptr_t argument_count = instr->env()->fixed_parameter_count(); 2731 intptr_t argument_count = instr->env()->fixed_parameter_count();
2730 Environment* copy = DeepCopy(isolate, values_.length() - argument_count); 2732 Environment* copy = DeepCopy(isolate,
2733 values_.length() - argument_count - input_count);
2731 instr->env()->outer_ = copy; 2734 instr->env()->outer_ = copy;
2732 intptr_t use_index = instr->env()->Length(); // Start index after inner. 2735 intptr_t use_index = instr->env()->Length(); // Start index after inner.
2733 for (Environment::DeepIterator it(copy); !it.Done(); it.Advance()) { 2736 for (Environment::DeepIterator it(copy); !it.Done(); it.Advance()) {
2734 Value* value = it.CurrentValue(); 2737 Value* value = it.CurrentValue();
2735 value->set_instruction(instr); 2738 value->set_instruction(instr);
2736 value->set_use_index(use_index++); 2739 value->set_use_index(use_index++);
2737 value->definition()->AddEnvUse(value); 2740 value->definition()->AddEnvUse(value);
2738 } 2741 }
2739 } 2742 }
2740 2743
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 case Token::kTRUNCDIV: return 0; 3121 case Token::kTRUNCDIV: return 0;
3119 case Token::kMOD: return 1; 3122 case Token::kMOD: return 1;
3120 default: UNIMPLEMENTED(); return -1; 3123 default: UNIMPLEMENTED(); return -1;
3121 } 3124 }
3122 } 3125 }
3123 3126
3124 3127
3125 #undef __ 3128 #undef __
3126 3129
3127 } // namespace dart 3130 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698