Skip to content

Commit

Permalink
[vm] Fix gcc build.
Browse files Browse the repository at this point in the history
Change-Id: I78c5826ec042212a32fe50d6fe53a78f8e05fdf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109314
Reviewed-by: Liam Appelbe <[email protected]>
Commit-Queue: Ryan Macnak <[email protected]>
  • Loading branch information
rmacnak-google authored and [email protected] committed Jul 17, 2019
1 parent 895cb77 commit 8cb7e4c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 26 deletions.
3 changes: 3 additions & 0 deletions runtime/vm/compiler/assembler/assembler_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ class Address : public ValueObject {
case DB_W:
case IB_W:
return true;
default:
UNREACHABLE();
return false;
}
}

Expand Down
8 changes: 4 additions & 4 deletions runtime/vm/compiler/backend/il.h
Original file line number Diff line number Diff line change
Expand Up @@ -7937,10 +7937,10 @@ class UnboxedWidthExtenderInstr : public TemplateDefinition<1, NoThrow, Pure> {
: TemplateDefinition(DeoptId::kNone),
representation_(rep),
from_representation_(from_rep) {
ASSERT(rep == kUnboxedInt32 && (from_rep == kSmallUnboxedInt8 ||
from_rep == kSmallUnboxedInt16) ||
rep == kUnboxedUint32 && (from_rep == kSmallUnboxedUint8 ||
from_rep == kSmallUnboxedUint16));
ASSERT((rep == kUnboxedInt32 && (from_rep == kSmallUnboxedInt8 ||
from_rep == kSmallUnboxedInt16)) ||
(rep == kUnboxedUint32 && (from_rep == kSmallUnboxedUint8 ||
from_rep == kSmallUnboxedUint16)));
SetInputAt(0, value);
}

Expand Down
4 changes: 2 additions & 2 deletions runtime/vm/compiler/offsets_extractor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class OffsetsExtractor : public AllStatic {
{ \
auto filter = Filter; \
bool comma = false; \
std::cout << "static dart::compiler::target::word " #Class "_" #Name \
"[] = {"; \
std::cout << "static constexpr dart::compiler::target::word " #Class \
"_" #Name "[] = {"; \
for (intptr_t i = static_cast<intptr_t>(First); \
i <= static_cast<intptr_t>(Last); i++) { \
auto v = static_cast<Type>(i); \
Expand Down
45 changes: 27 additions & 18 deletions runtime/vm/compiler/runtime_offsets_extracted.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,11 @@ static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
static constexpr dart::compiler::target::word ClassTable_element_size = 168;
static constexpr dart::compiler::target::word
ClassTable_class_heap_stats_table_offset = 16;
static dart::compiler::target::word Code_entry_point_offset[] = {4, 12, 8, 16};
static dart::compiler::target::word Code_function_entry_point_offset[] = {4, 8};
static dart::compiler::target::word
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
4, 12, 8, 16};
static constexpr dart::compiler::target::word
Code_function_entry_point_offset[] = {4, 8};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
580, 584, 588, 592, 596, -1, 600, 604,
608, 612, -1, -1, -1, -1, -1, -1};
Expand Down Expand Up @@ -694,10 +696,11 @@ static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
static constexpr dart::compiler::target::word ClassTable_element_size = 288;
static constexpr dart::compiler::target::word
ClassTable_class_heap_stats_table_offset = 32;
static dart::compiler::target::word Code_entry_point_offset[] = {8, 24, 16, 32};
static dart::compiler::target::word Code_function_entry_point_offset[] = {8,
16};
static dart::compiler::target::word
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
8, 24, 16, 32};
static constexpr dart::compiler::target::word
Code_function_entry_point_offset[] = {8, 16};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
1152, 1160, 1168, 1176, -1, -1, 1184, 1192,
1200, 1208, 1216, -1, 1224, 1232, -1, -1};
Expand Down Expand Up @@ -1046,8 +1049,10 @@ static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
static constexpr dart::compiler::target::word ClassTable_element_size = 168;
static constexpr dart::compiler::target::word
ClassTable_class_heap_stats_table_offset = 16;
static dart::compiler::target::word Code_entry_point_offset[] = {4, 12, 8, 16};
static dart::compiler::target::word Code_function_entry_point_offset[] = {4, 8};
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
4, 12, 8, 16};
static constexpr dart::compiler::target::word
Code_function_entry_point_offset[] = {4, 8};
static constexpr dart::compiler::target::word Array_header_size = 12;
static constexpr dart::compiler::target::word Context_header_size = 12;
static constexpr dart::compiler::target::word Double_InstanceSize = 16;
Expand Down Expand Up @@ -1397,10 +1402,11 @@ static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
static constexpr dart::compiler::target::word ClassTable_element_size = 288;
static constexpr dart::compiler::target::word
ClassTable_class_heap_stats_table_offset = 32;
static dart::compiler::target::word Code_entry_point_offset[] = {8, 24, 16, 32};
static dart::compiler::target::word Code_function_entry_point_offset[] = {8,
16};
static dart::compiler::target::word
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
8, 24, 16, 32};
static constexpr dart::compiler::target::word
Code_function_entry_point_offset[] = {8, 16};
static constexpr dart::compiler::target::word
Thread_write_barrier_wrappers_thread_offset[] = {
1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224, 1232,
1240, 1248, 1256, 1264, -1, -1, -1, -1, 1272, 1280, 1288,
Expand Down Expand Up @@ -1688,9 +1694,10 @@ static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
static constexpr dart::compiler::target::word ClassTable_element_size = 288;
static constexpr dart::compiler::target::word
ClassTable_class_heap_stats_table_offset = 32;
static dart::compiler::target::word Code_entry_point_offset[] = {8, 24, 16, 32};
static dart::compiler::target::word Code_function_entry_point_offset[] = {8,
16};
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
8, 24, 16, 32};
static constexpr dart::compiler::target::word
Code_function_entry_point_offset[] = {8, 16};
static constexpr dart::compiler::target::word Array_header_size = 24;
static constexpr dart::compiler::target::word Context_header_size = 24;
static constexpr dart::compiler::target::word Double_InstanceSize = 16;
Expand Down Expand Up @@ -1971,8 +1978,10 @@ static constexpr dart::compiler::target::word ClassTable_elements_start_offset =
static constexpr dart::compiler::target::word ClassTable_element_size = 168;
static constexpr dart::compiler::target::word
ClassTable_class_heap_stats_table_offset = 16;
static dart::compiler::target::word Code_entry_point_offset[] = {4, 12, 8, 16};
static dart::compiler::target::word Code_function_entry_point_offset[] = {4, 8};
static constexpr dart::compiler::target::word Code_entry_point_offset[] = {
4, 12, 8, 16};
static constexpr dart::compiler::target::word
Code_function_entry_point_offset[] = {4, 8};
static constexpr dart::compiler::target::word Array_header_size = 12;
static constexpr dart::compiler::target::word Context_header_size = 12;
static constexpr dart::compiler::target::word Double_InstanceSize = 16;
Expand Down
4 changes: 2 additions & 2 deletions runtime/vm/regexp_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,7 @@ RegExpTree* RegExpParser::ParseCharacterClass(const RegExpBuilder* builder) {
new (Z) ZoneGrowableArray<CharacterRange>(2);
bool add_unicode_case_equivalents = is_unicode() && builder->ignore_case();
while (has_more() && current() != ']') {
uint32_t char_1;
uint32_t char_1 = 0;
bool is_class_1 =
ParseClassEscape(ranges, add_unicode_case_equivalents, &char_1);
if (current() == '-') {
Expand All @@ -1915,7 +1915,7 @@ RegExpTree* RegExpParser::ParseCharacterClass(const RegExpBuilder* builder) {
ranges->Add(CharacterRange::Singleton('-'));
break;
}
uint32_t char_2;
uint32_t char_2 = 0;
bool is_class_2 =
ParseClassEscape(ranges, add_unicode_case_equivalents, &char_2);
if (is_class_1 || is_class_2) {
Expand Down

0 comments on commit 8cb7e4c

Please sign in to comment.