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

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

Issue 298913007: Use isolate when allocation Zone objects and handles: focus on FlowGraphOptimizer, next inliner. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_inliner.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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 // FlowGraphCompiler::SaveLiveRegisters 585 // FlowGraphCompiler::SaveLiveRegisters
586 // MaterializeObjectInstr::RemapRegisters 586 // MaterializeObjectInstr::RemapRegisters
587 // 587 //
588 Environment* FlowGraphCompiler::SlowPathEnvironmentFor( 588 Environment* FlowGraphCompiler::SlowPathEnvironmentFor(
589 Instruction* instruction) { 589 Instruction* instruction) {
590 if (instruction->env() == NULL) { 590 if (instruction->env() == NULL) {
591 ASSERT(!is_optimizing()); 591 ASSERT(!is_optimizing());
592 return NULL; 592 return NULL;
593 } 593 }
594 594
595 Environment* env = instruction->env()->DeepCopy(); 595 Environment* env = instruction->env()->DeepCopy(isolate());
596 // 1. Iterate the registers in the order they will be spilled to compute 596 // 1. Iterate the registers in the order they will be spilled to compute
597 // the slots they will be spilled to. 597 // the slots they will be spilled to.
598 intptr_t next_slot = StackSize(); 598 intptr_t next_slot = StackSize();
599 RegisterSet* regs = instruction->locs()->live_registers(); 599 RegisterSet* regs = instruction->locs()->live_registers();
600 intptr_t fpu_reg_slots[kNumberOfFpuRegisters]; 600 intptr_t fpu_reg_slots[kNumberOfFpuRegisters];
601 intptr_t cpu_reg_slots[kNumberOfCpuRegisters]; 601 intptr_t cpu_reg_slots[kNumberOfCpuRegisters];
602 const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize; 602 const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize;
603 // FPU registers are spilled first from highest to lowest register number. 603 // FPU registers are spilled first from highest to lowest register number.
604 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) { 604 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) {
605 FpuRegister reg = static_cast<FpuRegister>(i); 605 FpuRegister reg = static_cast<FpuRegister>(i);
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 1349
1350 for (int i = 0; i < len; i++) { 1350 for (int i = 0; i < len; i++) {
1351 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1351 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1352 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1352 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1353 ic_data.GetCountAt(i))); 1353 ic_data.GetCountAt(i)));
1354 } 1354 }
1355 sorted->Sort(HighestCountFirst); 1355 sorted->Sort(HighestCountFirst);
1356 } 1356 }
1357 1357
1358 } // namespace dart 1358 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698