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

Side by Side Diff: runtime/vm/locations.h

Issue 26823006: Record a correct deoptimization environment for slow-path code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use an environment value's representation to decide its size. Created 7 years, 2 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 #ifndef VM_LOCATIONS_H_ 5 #ifndef VM_LOCATIONS_H_
6 #define VM_LOCATIONS_H_ 6 #define VM_LOCATIONS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 362
363 bool ContainsRegister(Register reg) const { 363 bool ContainsRegister(Register reg) const {
364 return (cpu_registers_ & (1 << reg)) != 0; 364 return (cpu_registers_ & (1 << reg)) != 0;
365 } 365 }
366 366
367 bool ContainsFpuRegister(FpuRegister fpu_reg) const { 367 bool ContainsFpuRegister(FpuRegister fpu_reg) const {
368 return (fpu_registers_ & (1 << fpu_reg)) != 0; 368 return (fpu_registers_ & (1 << fpu_reg)) != 0;
369 } 369 }
370 370
371 intptr_t fpu_regs_count() const { 371 intptr_t CpuRegisterCount() const { return RegisterCount(cpu_registers_); }
Florian Schneider 2013/10/17 14:38:52 I don't see that function used anywhere. Do you an
372 intptr_t count = 0; 372 intptr_t FpuRegisterCount() const { return RegisterCount(fpu_registers_); }
373 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; reg_idx++) { 373
374 if (ContainsFpuRegister(static_cast<FpuRegister>(reg_idx))) { 374 static intptr_t RegisterCount(intptr_t registers);
375 count++;
376 }
377 }
378 return count;
379 }
380 375
381 intptr_t cpu_registers() const { return cpu_registers_; } 376 intptr_t cpu_registers() const { return cpu_registers_; }
382 intptr_t fpu_registers() const { return fpu_registers_; } 377 intptr_t fpu_registers() const { return fpu_registers_; }
383 378
384 private: 379 private:
385 intptr_t cpu_registers_; 380 intptr_t cpu_registers_;
386 intptr_t fpu_registers_; 381 intptr_t fpu_registers_;
387 382
388 DISALLOW_COPY_AND_ASSIGN(RegisterSet); 383 DISALLOW_COPY_AND_ASSIGN(RegisterSet);
389 }; 384 };
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 BitmapBuilder* stack_bitmap_; 477 BitmapBuilder* stack_bitmap_;
483 478
484 const ContainsCall contains_call_; 479 const ContainsCall contains_call_;
485 RegisterSet live_registers_; 480 RegisterSet live_registers_;
486 }; 481 };
487 482
488 483
489 } // namespace dart 484 } // namespace dart
490 485
491 #endif // VM_LOCATIONS_H_ 486 #endif // VM_LOCATIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698