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

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

Issue 1082203003: VM: Fix bug in stack map builder. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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_compiler.cc ('k') | no next file » | 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 #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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 SmallSet() : data_(0) { } 452 SmallSet() : data_(0) { }
453 453
454 explicit SmallSet(intptr_t data) : data_(data) { } 454 explicit SmallSet(intptr_t data) : data_(data) { }
455 455
456 bool Contains(T value) const { return (data_ & ToMask(value)) != 0; } 456 bool Contains(T value) const { return (data_ & ToMask(value)) != 0; }
457 457
458 void Add(T value) { data_ |= ToMask(value); } 458 void Add(T value) { data_ |= ToMask(value); }
459 459
460 void Remove(T value) { data_ &= ~ToMask(value); } 460 void Remove(T value) { data_ &= ~ToMask(value); }
461 461
462 bool IsEmpty() const { return data_ != 0; } 462 bool IsEmpty() const { return data_ == 0; }
463 463
464 intptr_t data() const { return data_; } 464 intptr_t data() const { return data_; }
465 465
466 private: 466 private:
467 static intptr_t ToMask(T value) { 467 static intptr_t ToMask(T value) {
468 ASSERT(static_cast<intptr_t>(value) < (kWordSize * kBitsPerByte)); 468 ASSERT(static_cast<intptr_t>(value) < (kWordSize * kBitsPerByte));
469 return 1 << static_cast<intptr_t>(value); 469 return 1 << static_cast<intptr_t>(value);
470 } 470 }
471 471
472 intptr_t data_; 472 intptr_t data_;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 709
710 #if defined(DEBUG) 710 #if defined(DEBUG)
711 intptr_t writable_inputs_; 711 intptr_t writable_inputs_;
712 #endif 712 #endif
713 }; 713 };
714 714
715 715
716 } // namespace dart 716 } // namespace dart
717 717
718 #endif // VM_LOCATIONS_H_ 718 #endif // VM_LOCATIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698