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

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

Issue 1644223006: Fix some more shorten-64-to-32 warnings: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 4 years, 10 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
« no previous file with comments | « runtime/vm/dart_api_state.h ('k') | runtime/vm/deopt_instructions.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 #ifndef VM_DEOPT_INSTRUCTIONS_H_ 5 #ifndef VM_DEOPT_INSTRUCTIONS_H_
6 #define VM_DEOPT_INSTRUCTIONS_H_ 6 #define VM_DEOPT_INSTRUCTIONS_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/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 const char* ToCString() const { 392 const char* ToCString() const {
393 if (is_register()) { 393 if (is_register()) {
394 return Name(reg()); 394 return Name(reg());
395 } else { 395 } else {
396 return Thread::Current()->zone()->PrintToString( 396 return Thread::Current()->zone()->PrintToString(
397 "s%" Pd "", raw_index()); 397 "s%" Pd "", raw_index());
398 } 398 }
399 } 399 }
400 400
401 private: 401 private:
402 class KindField : public BitField<intptr_t, 0, 1> { }; 402 class KindField : public BitField<intptr_t, intptr_t, 0, 1> { };
403 class RawIndexField : public BitField<intptr_t, 1, kBitsPerWord - 1> { }; 403 class RawIndexField :
404 public BitField<intptr_t, intptr_t, 1, kBitsPerWord - 1> { };
404 405
405 bool is_register() const { 406 bool is_register() const {
406 return KindField::decode(source_index_) == kRegister; 407 return KindField::decode(source_index_) == kRegister;
407 } 408 }
408 intptr_t raw_index() const { return RawIndexField::decode(source_index_); } 409 intptr_t raw_index() const { return RawIndexField::decode(source_index_); }
409 410
410 RegisterType reg() const { return static_cast<RegisterType>(raw_index()); } 411 RegisterType reg() const { return static_cast<RegisterType>(raw_index()); }
411 412
412 static const char* Name(Register reg) { 413 static const char* Name(Register reg) {
413 return Assembler::RegisterName(reg); 414 return Assembler::RegisterName(reg);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 Smi* offset, 537 Smi* offset,
537 TypedData* info, 538 TypedData* info,
538 Smi* reason_and_flags); 539 Smi* reason_and_flags);
539 540
540 static RawSmi* EncodeReasonAndFlags(ICData::DeoptReasonId reason, 541 static RawSmi* EncodeReasonAndFlags(ICData::DeoptReasonId reason,
541 uint32_t flags) { 542 uint32_t flags) {
542 return Smi::New(ReasonField::encode(reason) | 543 return Smi::New(ReasonField::encode(reason) |
543 FlagsField::encode(flags)); 544 FlagsField::encode(flags));
544 } 545 }
545 546
546 class ReasonField : public BitField<ICData::DeoptReasonId, 0, 8> { }; 547 class ReasonField :
547 class FlagsField : public BitField<uint32_t, 8, 8> { }; 548 public BitField<intptr_t, ICData::DeoptReasonId, 0, 8> { };
549 class FlagsField : public BitField<intptr_t, uint32_t, 8, 8> { };
548 550
549 private: 551 private:
550 static const intptr_t kEntrySize = 3; 552 static const intptr_t kEntrySize = 3;
551 }; 553 };
552 554
553 } // namespace dart 555 } // namespace dart
554 556
555 #endif // VM_DEOPT_INSTRUCTIONS_H_ 557 #endif // VM_DEOPT_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_state.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698