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

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

Issue 572913002: Revert r40306 because of crash. (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, 2725 void Environment::DeepCopyToOuter(Isolate* isolate, Instruction* instr) const {
2726 Instruction* instr,
2727 intptr_t input_count) const {
2728 // Create a deep copy removing caller arguments from the environment. 2726 // Create a deep copy removing caller arguments from the environment.
2729 ASSERT(this != NULL); 2727 ASSERT(this != NULL);
2730 ASSERT(instr->env()->outer() == NULL); 2728 ASSERT(instr->env()->outer() == NULL);
2731 intptr_t argument_count = instr->env()->fixed_parameter_count(); 2729 intptr_t argument_count = instr->env()->fixed_parameter_count();
2732 Environment* copy = DeepCopy(isolate, 2730 Environment* copy = DeepCopy(isolate, values_.length() - argument_count);
2733 values_.length() - argument_count - input_count);
2734 instr->env()->outer_ = copy; 2731 instr->env()->outer_ = copy;
2735 intptr_t use_index = instr->env()->Length(); // Start index after inner. 2732 intptr_t use_index = instr->env()->Length(); // Start index after inner.
2736 for (Environment::DeepIterator it(copy); !it.Done(); it.Advance()) { 2733 for (Environment::DeepIterator it(copy); !it.Done(); it.Advance()) {
2737 Value* value = it.CurrentValue(); 2734 Value* value = it.CurrentValue();
2738 value->set_instruction(instr); 2735 value->set_instruction(instr);
2739 value->set_use_index(use_index++); 2736 value->set_use_index(use_index++);
2740 value->definition()->AddEnvUse(value); 2737 value->definition()->AddEnvUse(value);
2741 } 2738 }
2742 } 2739 }
2743 2740
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
3146 case Token::kTRUNCDIV: return 0; 3143 case Token::kTRUNCDIV: return 0;
3147 case Token::kMOD: return 1; 3144 case Token::kMOD: return 1;
3148 default: UNIMPLEMENTED(); return -1; 3145 default: UNIMPLEMENTED(); return -1;
3149 } 3146 }
3150 } 3147 }
3151 3148
3152 3149
3153 #undef __ 3150 #undef __
3154 3151
3155 } // namespace dart 3152 } // 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