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

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

Issue 252333002: Use GPRs for mints (Closed) Base URL: https://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
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/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 if (loc.IsRegister()) { 2125 if (loc.IsRegister()) {
2126 intptr_t index = cpu_reg_slots[loc.reg()]; 2126 intptr_t index = cpu_reg_slots[loc.reg()];
2127 ASSERT(index >= 0); 2127 ASSERT(index >= 0);
2128 locations_[i] = Location::StackSlot(index); 2128 locations_[i] = Location::StackSlot(index);
2129 } else if (loc.IsFpuRegister()) { 2129 } else if (loc.IsFpuRegister()) {
2130 intptr_t index = fpu_reg_slots[loc.fpu_reg()]; 2130 intptr_t index = fpu_reg_slots[loc.fpu_reg()];
2131 ASSERT(index >= 0); 2131 ASSERT(index >= 0);
2132 Value* value = InputAt(i); 2132 Value* value = InputAt(i);
2133 switch (value->definition()->representation()) { 2133 switch (value->definition()->representation()) {
2134 case kUnboxedDouble: 2134 case kUnboxedDouble:
2135 case kUnboxedMint:
2136 locations_[i] = Location::DoubleStackSlot(index); 2135 locations_[i] = Location::DoubleStackSlot(index);
2137 break; 2136 break;
2138 case kUnboxedFloat32x4: 2137 case kUnboxedFloat32x4:
2139 case kUnboxedInt32x4: 2138 case kUnboxedInt32x4:
2140 case kUnboxedFloat64x2: 2139 case kUnboxedFloat64x2:
2141 locations_[i] = Location::QuadStackSlot(index); 2140 locations_[i] = Location::QuadStackSlot(index);
2142 break; 2141 break;
2143 default: 2142 default:
2144 UNREACHABLE(); 2143 UNREACHABLE();
2145 } 2144 }
2145 } else if (loc.IsPairLocation()) {
2146 UNREACHABLE();
2146 } else if (loc.IsInvalid()) { 2147 } else if (loc.IsInvalid()) {
2147 // We currently only perform one iteration of allocation 2148 // We currently only perform one iteration of allocation
2148 // sinking, so we do not expect to find materialized objects 2149 // sinking, so we do not expect to find materialized objects
2149 // here. 2150 // here.
2150 ASSERT(!InputAt(i)->definition()->IsMaterializeObject()); 2151 ASSERT(!InputAt(i)->definition()->IsMaterializeObject());
2151 } 2152 }
2152 } 2153 }
2153 } 2154 }
2154 2155
2155 2156
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 code_, 2343 code_,
2343 (outer_ == NULL) ? NULL : outer_->DeepCopy()); 2344 (outer_ == NULL) ? NULL : outer_->DeepCopy());
2344 if (locations_ != NULL) { 2345 if (locations_ != NULL) {
2345 Location* new_locations = 2346 Location* new_locations =
2346 Isolate::Current()->current_zone()->Alloc<Location>(length); 2347 Isolate::Current()->current_zone()->Alloc<Location>(length);
2347 copy->set_locations(new_locations); 2348 copy->set_locations(new_locations);
2348 } 2349 }
2349 for (intptr_t i = 0; i < length; ++i) { 2350 for (intptr_t i = 0; i < length; ++i) {
2350 copy->values_.Add(values_[i]->Copy()); 2351 copy->values_.Add(values_[i]->Copy());
2351 if (locations_ != NULL) { 2352 if (locations_ != NULL) {
2352 copy->locations_[i] = locations_[i]; 2353 copy->locations_[i] = locations_[i].Copy();
2353 } 2354 }
2354 } 2355 }
2355 return copy; 2356 return copy;
2356 } 2357 }
2357 2358
2358 2359
2359 // Copies the environment and updates the environment use lists. 2360 // Copies the environment and updates the environment use lists.
2360 void Environment::DeepCopyTo(Instruction* instr) const { 2361 void Environment::DeepCopyTo(Instruction* instr) const {
2361 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) { 2362 for (Environment::DeepIterator it(instr->env()); !it.Done(); it.Advance()) {
2362 it.CurrentValue()->RemoveFromUseList(); 2363 it.CurrentValue()->RemoveFromUseList();
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 case Token::kTRUNCDIV: return 0; 3425 case Token::kTRUNCDIV: return 0;
3425 case Token::kMOD: return 1; 3426 case Token::kMOD: return 1;
3426 default: UNIMPLEMENTED(); return -1; 3427 default: UNIMPLEMENTED(); return -1;
3427 } 3428 }
3428 } 3429 }
3429 3430
3430 3431
3431 #undef __ 3432 #undef __
3432 3433
3433 } // namespace dart 3434 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698