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

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

Issue 10882055: Put live register bits in stackmaps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle XMM registers in stackmaps. Created 8 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 } 2353 }
2354 2354
2355 RawCode* Code() const { return raw_ptr()->code_; } 2355 RawCode* Code() const { return raw_ptr()->code_; }
2356 void SetCode(const dart::Code& code) const; 2356 void SetCode(const dart::Code& code) const;
2357 2357
2358 intptr_t Length() const { return raw_ptr()->length_; } 2358 intptr_t Length() const { return raw_ptr()->length_; }
2359 2359
2360 uword PC() const { return raw_ptr()->pc_; } 2360 uword PC() const { return raw_ptr()->pc_; }
2361 void SetPC(uword value) const { raw_ptr()->pc_ = value; } 2361 void SetPC(uword value) const { raw_ptr()->pc_ = value; }
2362 2362
2363 intptr_t RegisterBitCount() const { return raw_ptr()->register_bit_count_; }
2364 void SetRegisterBitCount(intptr_t register_bit_count) const {
2365 raw_ptr()->register_bit_count_ = register_bit_count;
2366 }
2367
2363 static const intptr_t kMaxLengthInBytes = kSmiMax; 2368 static const intptr_t kMaxLengthInBytes = kSmiMax;
2364 2369
2365 static intptr_t InstanceSize() { 2370 static intptr_t InstanceSize() {
2366 ASSERT(sizeof(RawStackmap) == OFFSET_OF(RawStackmap, data_)); 2371 ASSERT(sizeof(RawStackmap) == OFFSET_OF(RawStackmap, data_));
2367 return 0; 2372 return 0;
2368 } 2373 }
2369 static intptr_t InstanceSize(intptr_t length) { 2374 static intptr_t InstanceSize(intptr_t length) {
2370 ASSERT(length >= 0); 2375 ASSERT(length >= 0);
2371 // The stackmap payload is in an array of bytes. 2376 // The stackmap payload is in an array of bytes.
2372 intptr_t payload_size = 2377 intptr_t payload_size =
2373 Utils::RoundUp(length, kBitsPerByte) / kBitsPerByte; 2378 Utils::RoundUp(length, kBitsPerByte) / kBitsPerByte;
2374 return RoundedAllocationSize(sizeof(RawStackmap) + payload_size); 2379 return RoundedAllocationSize(sizeof(RawStackmap) + payload_size);
2375 } 2380 }
2376 static RawStackmap* New(intptr_t pc_offset, BitmapBuilder* bmap); 2381 static RawStackmap* New(intptr_t pc_offset,
2382 BitmapBuilder* bmap,
2383 intptr_t register_bit_count);
2377 2384
2378 private: 2385 private:
2379 void SetLength(intptr_t length) const { raw_ptr()->length_ = length; } 2386 void SetLength(intptr_t length) const { raw_ptr()->length_ = length; }
2380 2387
2381 bool InRange(intptr_t index) const { return index < Length(); } 2388 bool InRange(intptr_t index) const { return index < Length(); }
2382 2389
2383 bool GetBit(intptr_t bit_index) const; 2390 bool GetBit(intptr_t bit_index) const;
2384 void SetBit(intptr_t bit_index, bool value) const; 2391 void SetBit(intptr_t bit_index, bool value) const;
2385 2392
2386 HEAP_OBJECT_IMPLEMENTATION(Stackmap, Object); 2393 HEAP_OBJECT_IMPLEMENTATION(Stackmap, Object);
(...skipping 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after
5538 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5545 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5539 return false; 5546 return false;
5540 } 5547 }
5541 } 5548 }
5542 return true; 5549 return true;
5543 } 5550 }
5544 5551
5545 } // namespace dart 5552 } // namespace dart
5546 5553
5547 #endif // VM_OBJECT_H_ 5554 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698