mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[vm] Add macro for fallthrough annotations
Internal builds in Google are catching this as an error. I'm guarding it because I assume we might support building using other compilers. Change-Id: I665099cace9c6a40d737c471dd1b0fdb326fea39 Reviewed-on: https://dart-review.googlesource.com/c/91162 Commit-Queue: Siva Annamalai <asiva@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
parent
b66dc30334
commit
eb73f132c1
|
@ -166,6 +166,7 @@ config("dart_config") {
|
|||
"-ggdb3",
|
||||
"-fno-rtti",
|
||||
"-fno-exceptions",
|
||||
"-Wimplicit-fallthrough",
|
||||
]
|
||||
|
||||
ldflags = []
|
||||
|
|
|
@ -142,8 +142,8 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
|
|||
if (!listing->follow_links()) {
|
||||
return kListLink;
|
||||
}
|
||||
// Else fall through to next case.
|
||||
// Fall through.
|
||||
// Else fall through to next case.
|
||||
FALL_THROUGH;
|
||||
case DT_UNKNOWN: {
|
||||
// On some file systems the entry type is not determined by
|
||||
// readdir. For those and for links we use stat to determine
|
||||
|
|
|
@ -148,8 +148,8 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
|
|||
if (!listing->follow_links()) {
|
||||
return kListLink;
|
||||
}
|
||||
// Else fall through to next case.
|
||||
// Fall through.
|
||||
// Else fall through to next case.
|
||||
FALL_THROUGH;
|
||||
case DT_UNKNOWN: {
|
||||
// On some file systems the entry type is not determined by
|
||||
// readdir. For those and for links we use stat to determine
|
||||
|
|
|
@ -142,8 +142,8 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
|
|||
if (!listing->follow_links()) {
|
||||
return kListLink;
|
||||
}
|
||||
// Else fall through to next case.
|
||||
// Fall through.
|
||||
// Else fall through to next case.
|
||||
FALL_THROUGH;
|
||||
case DT_UNKNOWN: {
|
||||
// On some file systems the entry type is not determined by
|
||||
// readdir. For those and for links we use stat to determine
|
||||
|
|
|
@ -131,8 +131,8 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
|
|||
if (!listing->follow_links()) {
|
||||
return kListLink;
|
||||
}
|
||||
// Else fall through to next case.
|
||||
// Fall through.
|
||||
// Else fall through to next case.
|
||||
FALL_THROUGH;
|
||||
case DT_UNKNOWN: {
|
||||
// On some file systems the entry type is not determined by
|
||||
// readdir_r. For those and for links we use stat to determine
|
||||
|
|
|
@ -5,6 +5,16 @@
|
|||
#ifndef RUNTIME_PLATFORM_GLOBALS_H_
|
||||
#define RUNTIME_PLATFORM_GLOBALS_H_
|
||||
|
||||
#if __cplusplus >= 201703L // C++17
|
||||
#define FALL_THROUGH [[fallthrough]] // NOLINT
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 7
|
||||
#define FALL_THROUGH __attribute__((fallthrough));
|
||||
#elif defined(__clang__)
|
||||
#define FALL_THROUGH [[clang::fallthrough]] // NOLINT
|
||||
#else
|
||||
#define FALL_THROUGH ((void)0)
|
||||
#endif
|
||||
|
||||
// __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to
|
||||
// enable platform independent printf format specifiers.
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
|
|
|
@ -78,10 +78,10 @@ uint32_t Utils::StringHash(const char* data, int length) {
|
|||
switch (size) {
|
||||
case 3:
|
||||
hash ^= cursor[2] << 16;
|
||||
/* Falls through. */
|
||||
FALL_THROUGH;
|
||||
case 2:
|
||||
hash ^= cursor[1] << 8;
|
||||
/* Falls through. */
|
||||
FALL_THROUGH;
|
||||
case 1:
|
||||
hash ^= cursor[0];
|
||||
hash *= M;
|
||||
|
|
|
@ -544,18 +544,28 @@ bool AotCallSpecializer::TryOptimizeIntegerOperation(TemplateDartCall<0>* instr,
|
|||
case Token::kMOD:
|
||||
replacement = TryOptimizeMod(instr, op_kind, left_value, right_value);
|
||||
if (replacement != nullptr) break;
|
||||
FALL_THROUGH;
|
||||
case Token::kTRUNCDIV:
|
||||
#if !defined(TARGET_ARCH_X64) && !defined(TARGET_ARCH_ARM64)
|
||||
// TODO(ajcbik): 32-bit archs too?
|
||||
break;
|
||||
#else
|
||||
FALL_THROUGH;
|
||||
#endif
|
||||
case Token::kSHL:
|
||||
FALL_THROUGH;
|
||||
case Token::kSHR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_OR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_XOR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_AND:
|
||||
FALL_THROUGH;
|
||||
case Token::kADD:
|
||||
FALL_THROUGH;
|
||||
case Token::kSUB:
|
||||
FALL_THROUGH;
|
||||
case Token::kMUL: {
|
||||
if (FlowGraphCompiler::SupportsUnboxedInt64()) {
|
||||
if (op_kind == Token::kSHR || op_kind == Token::kSHL) {
|
||||
|
@ -648,6 +658,7 @@ bool AotCallSpecializer::TryOptimizeDoubleOperation(TemplateDartCall<0>* instr,
|
|||
|
||||
switch (op_kind) {
|
||||
case Token::kEQ:
|
||||
FALL_THROUGH;
|
||||
case Token::kNE: {
|
||||
// TODO(dartbug.com/32166): Support EQ, NE for nullable doubles.
|
||||
// (requires null-aware comparison instruction).
|
||||
|
@ -662,8 +673,11 @@ bool AotCallSpecializer::TryOptimizeDoubleOperation(TemplateDartCall<0>* instr,
|
|||
break;
|
||||
}
|
||||
case Token::kLT:
|
||||
FALL_THROUGH;
|
||||
case Token::kLTE:
|
||||
FALL_THROUGH;
|
||||
case Token::kGT:
|
||||
FALL_THROUGH;
|
||||
case Token::kGTE: {
|
||||
left_value = PrepareStaticOpInput(left_value, kDoubleCid, instr);
|
||||
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
|
||||
|
@ -673,8 +687,11 @@ bool AotCallSpecializer::TryOptimizeDoubleOperation(TemplateDartCall<0>* instr,
|
|||
break;
|
||||
}
|
||||
case Token::kADD:
|
||||
FALL_THROUGH;
|
||||
case Token::kSUB:
|
||||
FALL_THROUGH;
|
||||
case Token::kMUL:
|
||||
FALL_THROUGH;
|
||||
case Token::kDIV: {
|
||||
if (op_kind == Token::kDIV &&
|
||||
!FlowGraphCompiler::SupportsHardwareDivision()) {
|
||||
|
@ -689,10 +706,15 @@ bool AotCallSpecializer::TryOptimizeDoubleOperation(TemplateDartCall<0>* instr,
|
|||
}
|
||||
|
||||
case Token::kBIT_OR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_XOR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_AND:
|
||||
FALL_THROUGH;
|
||||
case Token::kMOD:
|
||||
FALL_THROUGH;
|
||||
case Token::kTRUNCDIV:
|
||||
FALL_THROUGH;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -435,7 +435,8 @@ int DisassemblerX64::PrintRightOperandHelper(
|
|||
return 1;
|
||||
}
|
||||
break;
|
||||
case 1: // fall through
|
||||
case 1:
|
||||
FALL_THROUGH;
|
||||
case 2:
|
||||
if ((rm & 7) == 4) {
|
||||
uint8_t sib = *(modrmp + 1);
|
||||
|
@ -1613,7 +1614,8 @@ int DisassemblerX64::InstructionDecode(uword pc) {
|
|||
data += 4;
|
||||
break;
|
||||
|
||||
case 0x69: // fall through
|
||||
case 0x69:
|
||||
FALL_THROUGH;
|
||||
case 0x6B: {
|
||||
int mod, regop, rm;
|
||||
get_modrm(*(data + 1), &mod, ®op, &rm);
|
||||
|
@ -1626,7 +1628,8 @@ int DisassemblerX64::InstructionDecode(uword pc) {
|
|||
break;
|
||||
}
|
||||
|
||||
case 0x81: // fall through
|
||||
case 0x81:
|
||||
FALL_THROUGH;
|
||||
case 0x83: // 0x81 with sign extension bit set
|
||||
data += PrintImmediateOp(data);
|
||||
break;
|
||||
|
@ -1791,7 +1794,8 @@ int DisassemblerX64::InstructionDecode(uword pc) {
|
|||
data += 2;
|
||||
break;
|
||||
|
||||
case 0xA1: // Fall through.
|
||||
case 0xA1:
|
||||
FALL_THROUGH;
|
||||
case 0xA3:
|
||||
switch (operand_size()) {
|
||||
case DOUBLEWORD_SIZE: {
|
||||
|
@ -1843,24 +1847,34 @@ int DisassemblerX64::InstructionDecode(uword pc) {
|
|||
data += PrintImmediate(data, operand_size());
|
||||
break;
|
||||
}
|
||||
case 0xD1: // fall through
|
||||
case 0xD3: // fall through
|
||||
case 0xD1:
|
||||
FALL_THROUGH;
|
||||
case 0xD3:
|
||||
FALL_THROUGH;
|
||||
case 0xC1:
|
||||
data += ShiftInstruction(data);
|
||||
break;
|
||||
case 0xD0: // fall through
|
||||
case 0xD2: // fall through
|
||||
case 0xD0:
|
||||
FALL_THROUGH;
|
||||
case 0xD2:
|
||||
FALL_THROUGH;
|
||||
case 0xC0:
|
||||
byte_size_operand_ = true;
|
||||
data += ShiftInstruction(data);
|
||||
break;
|
||||
|
||||
case 0xD9: // fall through
|
||||
case 0xDA: // fall through
|
||||
case 0xDB: // fall through
|
||||
case 0xDC: // fall through
|
||||
case 0xDD: // fall through
|
||||
case 0xDE: // fall through
|
||||
case 0xD9:
|
||||
FALL_THROUGH;
|
||||
case 0xDA:
|
||||
FALL_THROUGH;
|
||||
case 0xDB:
|
||||
FALL_THROUGH;
|
||||
case 0xDC:
|
||||
FALL_THROUGH;
|
||||
case 0xDD:
|
||||
FALL_THROUGH;
|
||||
case 0xDE:
|
||||
FALL_THROUGH;
|
||||
case 0xDF:
|
||||
data += FPUInstruction(data);
|
||||
break;
|
||||
|
@ -1870,7 +1884,8 @@ int DisassemblerX64::InstructionDecode(uword pc) {
|
|||
break;
|
||||
|
||||
case 0xF6:
|
||||
byte_size_operand_ = true; // fall through
|
||||
byte_size_operand_ = true;
|
||||
FALL_THROUGH;
|
||||
case 0xF7:
|
||||
data += F6F7Instruction(data);
|
||||
break;
|
||||
|
|
|
@ -1970,9 +1970,13 @@ Definition* DoubleTestOpInstr::Canonicalize(FlowGraph* flow_graph) {
|
|||
static bool IsCommutative(Token::Kind op) {
|
||||
switch (op) {
|
||||
case Token::kMUL:
|
||||
FALL_THROUGH;
|
||||
case Token::kADD:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_AND:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_OR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_XOR:
|
||||
return true;
|
||||
default:
|
||||
|
@ -2154,26 +2158,32 @@ RawInteger* BinaryIntegerOpInstr::Evaluate(const Integer& left,
|
|||
|
||||
switch (op_kind()) {
|
||||
case Token::kTRUNCDIV:
|
||||
FALL_THROUGH;
|
||||
case Token::kMOD:
|
||||
// Check right value for zero.
|
||||
if (right.AsInt64Value() == 0) {
|
||||
break; // Will throw.
|
||||
}
|
||||
// Fall through.
|
||||
FALL_THROUGH;
|
||||
case Token::kADD:
|
||||
FALL_THROUGH;
|
||||
case Token::kSUB:
|
||||
FALL_THROUGH;
|
||||
case Token::kMUL: {
|
||||
result = left.ArithmeticOp(op_kind(), right, Heap::kOld);
|
||||
break;
|
||||
}
|
||||
case Token::kSHL:
|
||||
FALL_THROUGH;
|
||||
case Token::kSHR:
|
||||
if (right.AsInt64Value() >= 0) {
|
||||
result = left.ShiftOp(op_kind(), right, Heap::kOld);
|
||||
}
|
||||
break;
|
||||
case Token::kBIT_AND:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_OR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_XOR: {
|
||||
result = left.BitOp(op_kind(), right, Heap::kOld);
|
||||
break;
|
||||
|
@ -2228,11 +2238,14 @@ Definition* CheckedSmiOpInstr::Canonicalize(FlowGraph* flow_graph) {
|
|||
// range information.
|
||||
switch (op_kind()) {
|
||||
case Token::kBIT_AND:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_OR:
|
||||
FALL_THROUGH;
|
||||
case Token::kBIT_XOR:
|
||||
replacement = new BinarySmiOpInstr(
|
||||
op_kind(), new Value(left()->definition()),
|
||||
new Value(right()->definition()), DeoptId::kNone);
|
||||
FALL_THROUGH;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2554,19 +2554,30 @@ static bool InlineSetIndexed(FlowGraph* flow_graph,
|
|||
break;
|
||||
}
|
||||
case kTypedDataInt8ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataUint8ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataUint8ClampedArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kExternalTypedDataUint8ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kExternalTypedDataUint8ClampedArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataInt16ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataUint16ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataInt32ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataUint32ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataInt64ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataUint64ArrayCid:
|
||||
ASSERT(value_type.IsIntType());
|
||||
// Fall through.
|
||||
FALL_THROUGH;
|
||||
case kTypedDataFloat32ArrayCid:
|
||||
FALL_THROUGH;
|
||||
case kTypedDataFloat64ArrayCid: {
|
||||
type_args = flow_graph->constant_null();
|
||||
ASSERT((array_cid != kTypedDataFloat32ArrayCid &&
|
||||
|
@ -4091,7 +4102,7 @@ bool FlowGraphInliner::TryInlineRecognizedMethod(
|
|||
call->GetBlock()->try_index(), DeoptId::kNone);
|
||||
(*entry)->InheritDeoptTarget(Z, call);
|
||||
ASSERT(!call->HasUses());
|
||||
*last = NULL; // Empty body.
|
||||
*last = NULL; // Empty body.
|
||||
*result = NULL; // Since no uses of original call, result will be unused.
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1998,8 +1998,8 @@ FlowGraph* StreamingFlowGraphBuilder::BuildGraph() {
|
|||
if (function.IsImplicitClosureFunction()) {
|
||||
return BuildGraphOfImplicitClosureFunction(function);
|
||||
}
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case RawFunction::kClosureFunction: {
|
||||
ReadUntilFunctionNode();
|
||||
return BuildGraphOfFunction(false);
|
||||
|
|
|
@ -760,56 +760,56 @@ void FunctionNodeHelper::ReadUntilExcluding(Field field) {
|
|||
Tag tag = helper_->ReadTag(); // read tag.
|
||||
ASSERT(tag == kFunctionNode);
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kPosition:
|
||||
position_ = helper_->ReadPosition(); // read position.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEndPosition:
|
||||
end_position_ = helper_->ReadPosition(); // read end position.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kAsyncMarker:
|
||||
async_marker_ = static_cast<AsyncMarker>(helper_->ReadByte());
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kDartAsyncMarker:
|
||||
dart_async_marker_ = static_cast<AsyncMarker>(
|
||||
helper_->ReadByte()); // read dart async marker.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kTypeParameters:
|
||||
helper_->SkipTypeParametersList(); // read type parameters.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kTotalParameterCount:
|
||||
total_parameter_count_ =
|
||||
helper_->ReadUInt(); // read total parameter count.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kRequiredParameterCount:
|
||||
required_parameter_count_ =
|
||||
helper_->ReadUInt(); // read required parameter count.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kPositionalParameters:
|
||||
helper_->SkipListOfVariableDeclarations(); // read positionals.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kNamedParameters:
|
||||
helper_->SkipListOfVariableDeclarations(); // read named.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kReturnType:
|
||||
helper_->SkipDartType(); // read return type.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kBody:
|
||||
if (helper_->ReadTag() == kSomething)
|
||||
helper_->SkipStatement(); // read body.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
@ -849,35 +849,35 @@ void VariableDeclarationHelper::ReadUntilExcluding(Field field) {
|
|||
case kPosition:
|
||||
position_ = helper_->ReadPosition(); // read position.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEqualPosition:
|
||||
equals_position_ = helper_->ReadPosition(); // read equals position.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kAnnotations:
|
||||
annotation_count_ = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < annotation_count_; ++i) {
|
||||
helper_->SkipExpression(); // read ith expression.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kFlags:
|
||||
flags_ = helper_->ReadFlags();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kNameIndex:
|
||||
name_index_ = helper_->ReadStringReference(); // read name index.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kType:
|
||||
helper_->SkipDartType(); // read type.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kInitializer:
|
||||
if (helper_->ReadTag() == kSomething)
|
||||
helper_->SkipExpression(); // read initializer.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
@ -900,48 +900,48 @@ void FieldHelper::ReadUntilExcluding(Field field,
|
|||
Tag tag = helper_->ReadTag(); // read tag.
|
||||
ASSERT(tag == kField);
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kCanonicalName:
|
||||
canonical_name_ =
|
||||
helper_->ReadCanonicalNameReference(); // read canonical_name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kSourceUriIndex:
|
||||
source_uri_index_ = helper_->ReadUInt(); // read source_uri_index.
|
||||
helper_->set_current_script_id(source_uri_index_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kPosition:
|
||||
position_ = helper_->ReadPosition(false); // read position.
|
||||
helper_->RecordTokenPosition(position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEndPosition:
|
||||
end_position_ = helper_->ReadPosition(false); // read end position.
|
||||
helper_->RecordTokenPosition(end_position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kFlags:
|
||||
flags_ = helper_->ReadFlags();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kName:
|
||||
helper_->SkipName(); // read name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kAnnotations: {
|
||||
annotation_count_ = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < annotation_count_; ++i) {
|
||||
helper_->SkipExpression(); // read ith expression.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kType:
|
||||
helper_->SkipDartType(); // read type.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kInitializer:
|
||||
if (helper_->ReadTag() == kSomething) {
|
||||
if (detect_function_literal_initializer &&
|
||||
|
@ -961,7 +961,7 @@ void FieldHelper::ReadUntilExcluding(Field field,
|
|||
helper_->SkipExpression(); // read initializer.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
@ -976,67 +976,67 @@ void ProcedureHelper::ReadUntilExcluding(Field field) {
|
|||
Tag tag = helper_->ReadTag(); // read tag.
|
||||
ASSERT(tag == kProcedure);
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kCanonicalName:
|
||||
canonical_name_ =
|
||||
helper_->ReadCanonicalNameReference(); // read canonical_name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kSourceUriIndex:
|
||||
source_uri_index_ = helper_->ReadUInt(); // read source_uri_index.
|
||||
helper_->set_current_script_id(source_uri_index_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kStartPosition:
|
||||
start_position_ = helper_->ReadPosition(false); // read position.
|
||||
helper_->RecordTokenPosition(start_position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kPosition:
|
||||
position_ = helper_->ReadPosition(false); // read position.
|
||||
helper_->RecordTokenPosition(position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEndPosition:
|
||||
end_position_ = helper_->ReadPosition(false); // read end position.
|
||||
helper_->RecordTokenPosition(end_position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kKind:
|
||||
kind_ = static_cast<Kind>(helper_->ReadByte());
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kFlags:
|
||||
flags_ = helper_->ReadFlags();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kName:
|
||||
helper_->SkipName(); // read name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kAnnotations: {
|
||||
annotation_count_ = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < annotation_count_; ++i) {
|
||||
helper_->SkipExpression(); // read ith expression.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kForwardingStubSuperTarget:
|
||||
forwarding_stub_super_target_ = helper_->ReadCanonicalNameReference();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kForwardingStubInterfaceTarget:
|
||||
helper_->ReadCanonicalNameReference();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kFunction:
|
||||
if (helper_->ReadTag() == kSomething) {
|
||||
helper_->SkipFunctionNode(); // read function node.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
@ -1051,53 +1051,53 @@ void ConstructorHelper::ReadUntilExcluding(Field field) {
|
|||
Tag tag = helper_->ReadTag(); // read tag.
|
||||
ASSERT(tag == kConstructor);
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kCanonicalName:
|
||||
canonical_name_ =
|
||||
helper_->ReadCanonicalNameReference(); // read canonical_name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kSourceUriIndex:
|
||||
source_uri_index_ = helper_->ReadUInt(); // read source_uri_index.
|
||||
helper_->set_current_script_id(source_uri_index_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kStartPosition:
|
||||
start_position_ = helper_->ReadPosition(); // read position.
|
||||
helper_->RecordTokenPosition(start_position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kPosition:
|
||||
position_ = helper_->ReadPosition(); // read position.
|
||||
helper_->RecordTokenPosition(position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEndPosition:
|
||||
end_position_ = helper_->ReadPosition(); // read end position.
|
||||
helper_->RecordTokenPosition(end_position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kFlags:
|
||||
flags_ = helper_->ReadFlags();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kName:
|
||||
helper_->SkipName(); // read name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kAnnotations: {
|
||||
annotation_count_ = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < annotation_count_; ++i) {
|
||||
helper_->SkipExpression(); // read ith expression.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kFunction:
|
||||
helper_->SkipFunctionNode(); // read function.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kInitializers: {
|
||||
intptr_t list_length =
|
||||
helper_->ReadListLength(); // read initializers list length.
|
||||
|
@ -1106,7 +1106,7 @@ void ConstructorHelper::ReadUntilExcluding(Field field) {
|
|||
}
|
||||
if (++next_read_ == field) return;
|
||||
}
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
@ -1121,73 +1121,73 @@ void ClassHelper::ReadUntilExcluding(Field field) {
|
|||
Tag tag = helper_->ReadTag(); // read tag.
|
||||
ASSERT(tag == kClass);
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kCanonicalName:
|
||||
canonical_name_ =
|
||||
helper_->ReadCanonicalNameReference(); // read canonical_name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kSourceUriIndex:
|
||||
source_uri_index_ = helper_->ReadUInt(); // read source_uri_index.
|
||||
helper_->set_current_script_id(source_uri_index_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kStartPosition:
|
||||
start_position_ = helper_->ReadPosition(false); // read position.
|
||||
helper_->RecordTokenPosition(start_position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kPosition:
|
||||
position_ = helper_->ReadPosition(false); // read position.
|
||||
helper_->RecordTokenPosition(position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEndPosition:
|
||||
end_position_ = helper_->ReadPosition(); // read end position.
|
||||
helper_->RecordTokenPosition(end_position_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kFlags:
|
||||
flags_ = helper_->ReadFlags(); // read flags.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kNameIndex:
|
||||
name_index_ = helper_->ReadStringReference(); // read name index.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kAnnotations: {
|
||||
annotation_count_ = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < annotation_count_; ++i) {
|
||||
helper_->SkipExpression(); // read ith expression.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kTypeParameters:
|
||||
helper_->SkipTypeParametersList(); // read type parameters.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kSuperClass: {
|
||||
Tag type_tag = helper_->ReadTag(); // read super class type (part 1).
|
||||
if (type_tag == kSomething) {
|
||||
helper_->SkipDartType(); // read super class type (part 2).
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kMixinType: {
|
||||
Tag type_tag = helper_->ReadTag(); // read mixin type (part 1).
|
||||
if (type_tag == kSomething) {
|
||||
helper_->SkipDartType(); // read mixin type (part 2).
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kImplementedClasses:
|
||||
helper_->SkipListOfDartTypes(); // read implemented_classes.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kFields: {
|
||||
intptr_t list_length =
|
||||
helper_->ReadListLength(); // read fields list length.
|
||||
|
@ -1196,8 +1196,8 @@ void ClassHelper::ReadUntilExcluding(Field field) {
|
|||
field_helper.ReadUntilExcluding(FieldHelper::kEnd); // read field.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kConstructors: {
|
||||
intptr_t list_length =
|
||||
helper_->ReadListLength(); // read constructors list length.
|
||||
|
@ -1207,8 +1207,8 @@ void ClassHelper::ReadUntilExcluding(Field field) {
|
|||
ConstructorHelper::kEnd); // read constructor.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kProcedures: {
|
||||
procedure_count_ = helper_->ReadListLength(); // read procedures #.
|
||||
for (intptr_t i = 0; i < procedure_count_; i++) {
|
||||
|
@ -1217,8 +1217,8 @@ void ClassHelper::ReadUntilExcluding(Field field) {
|
|||
ProcedureHelper::kEnd); // read procedure.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kClassIndex:
|
||||
// Read class index.
|
||||
for (intptr_t i = 0; i < procedure_count_; ++i) {
|
||||
|
@ -1227,7 +1227,7 @@ void ClassHelper::ReadUntilExcluding(Field field) {
|
|||
helper_->reader_.ReadUInt32();
|
||||
helper_->reader_.ReadUInt32();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
@ -1241,66 +1241,66 @@ void LibraryHelper::ReadUntilExcluding(Field field) {
|
|||
case kFlags: {
|
||||
flags_ = helper_->ReadFlags();
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kCanonicalName:
|
||||
canonical_name_ =
|
||||
helper_->ReadCanonicalNameReference(); // read canonical_name.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kName:
|
||||
name_index_ = helper_->ReadStringReference(); // read name index.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kSourceUriIndex:
|
||||
source_uri_index_ = helper_->ReadUInt(); // read source_uri_index.
|
||||
helper_->set_current_script_id(source_uri_index_);
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kProblemsAsJson: {
|
||||
intptr_t length = helper_->ReadUInt(); // read length of table.
|
||||
for (intptr_t i = 0; i < length; ++i) {
|
||||
helper_->SkipBytes(helper_->ReadUInt()); // read strings.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
}
|
||||
case kAnnotations:
|
||||
helper_->SkipListOfExpressions(); // read annotations.
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kDependencies: {
|
||||
intptr_t dependency_count = helper_->ReadUInt(); // read list length.
|
||||
for (intptr_t i = 0; i < dependency_count; ++i) {
|
||||
helper_->SkipLibraryDependency();
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kAdditionalExports: {
|
||||
intptr_t name_count = helper_->ReadUInt();
|
||||
for (intptr_t i = 0; i < name_count; ++i) {
|
||||
helper_->SkipCanonicalNameReference();
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kParts: {
|
||||
intptr_t part_count = helper_->ReadUInt(); // read list length.
|
||||
for (intptr_t i = 0; i < part_count; ++i) {
|
||||
helper_->SkipLibraryPart();
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kTypedefs: {
|
||||
intptr_t typedef_count = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < typedef_count; i++) {
|
||||
helper_->SkipLibraryTypedef();
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kClasses: {
|
||||
class_count_ = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < class_count_; ++i) {
|
||||
|
@ -1308,8 +1308,8 @@ void LibraryHelper::ReadUntilExcluding(Field field) {
|
|||
class_helper.ReadUntilExcluding(ClassHelper::kEnd);
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kToplevelField: {
|
||||
intptr_t field_count = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < field_count; ++i) {
|
||||
|
@ -1317,8 +1317,8 @@ void LibraryHelper::ReadUntilExcluding(Field field) {
|
|||
field_helper.ReadUntilExcluding(FieldHelper::kEnd);
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kToplevelProcedures: {
|
||||
procedure_count_ = helper_->ReadListLength(); // read list length.
|
||||
for (intptr_t i = 0; i < procedure_count_; ++i) {
|
||||
|
@ -1326,8 +1326,8 @@ void LibraryHelper::ReadUntilExcluding(Field field) {
|
|||
procedure_helper.ReadUntilExcluding(ProcedureHelper::kEnd);
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kLibraryIndex:
|
||||
// Read library index.
|
||||
for (intptr_t i = 0; i < class_count_; ++i) {
|
||||
|
@ -1341,7 +1341,7 @@ void LibraryHelper::ReadUntilExcluding(Field field) {
|
|||
helper_->reader_.ReadUInt32();
|
||||
helper_->reader_.ReadUInt32();
|
||||
if (++next_read_ == field) return;
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
@ -1355,31 +1355,31 @@ void LibraryDependencyHelper::ReadUntilExcluding(Field field) {
|
|||
case kFileOffset: {
|
||||
helper_->ReadPosition();
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kFlags: {
|
||||
flags_ = helper_->ReadFlags();
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kAnnotations: {
|
||||
annotation_count_ = helper_->ReadListLength();
|
||||
for (intptr_t i = 0; i < annotation_count_; ++i) {
|
||||
helper_->SkipExpression(); // read ith expression.
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kTargetLibrary: {
|
||||
target_library_canonical_name_ = helper_->ReadCanonicalNameReference();
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kName: {
|
||||
name_index_ = helper_->ReadStringReference();
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kCombinators: {
|
||||
intptr_t count = helper_->ReadListLength();
|
||||
for (intptr_t i = 0; i < count; ++i) {
|
||||
|
@ -1389,8 +1389,8 @@ void LibraryDependencyHelper::ReadUntilExcluding(Field field) {
|
|||
helper_->SkipListOfStrings();
|
||||
}
|
||||
if (++next_read_ == field) return;
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case kEnd:
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -300,7 +300,7 @@ static bool IntrinsifyArrayGetIndexed(FlowGraph* flow_graph,
|
|||
case kTypedDataFloat32ArrayCid:
|
||||
result = builder.AddDefinition(
|
||||
new FloatToDoubleInstr(new Value(result), DeoptId::kNone));
|
||||
// Fall through.
|
||||
FALL_THROUGH;
|
||||
case kTypedDataFloat64ArrayCid:
|
||||
result = builder.AddDefinition(
|
||||
BoxInstr::Create(kUnboxedDouble, new Value(result)));
|
||||
|
@ -369,7 +369,7 @@ static bool IntrinsifyArraySetIndexed(FlowGraph* flow_graph,
|
|||
case kTypedDataInt32ArrayCid:
|
||||
case kExternalTypedDataInt32ArrayCid:
|
||||
// Use same truncating unbox-instruction for int32 and uint32.
|
||||
// Fall-through.
|
||||
FALL_THROUGH;
|
||||
case kTypedDataUint32ArrayCid:
|
||||
case kExternalTypedDataUint32ArrayCid:
|
||||
// Supports smi and mint, slow-case for bigints.
|
||||
|
|
|
@ -979,7 +979,7 @@ static inline bool EmitAtomLetter(Zone* zone,
|
|||
}
|
||||
case 4:
|
||||
macro_assembler->CheckCharacter(chars[3], &ok);
|
||||
// Fall through!
|
||||
FALL_THROUGH;
|
||||
case 3:
|
||||
macro_assembler->CheckCharacter(chars[0], &ok);
|
||||
macro_assembler->CheckCharacter(chars[1], &ok);
|
||||
|
|
|
@ -476,8 +476,8 @@ RegExpTree* RegExpParser::ParseDisjunction() {
|
|||
Advance(2);
|
||||
break;
|
||||
}
|
||||
FALL_THROUGH;
|
||||
}
|
||||
// FALLTHROUGH
|
||||
case '0': {
|
||||
Advance();
|
||||
uint32_t octal = ParseOctalLiteral();
|
||||
|
@ -557,8 +557,8 @@ RegExpTree* RegExpParser::ParseDisjunction() {
|
|||
ReportError("Nothing to repeat");
|
||||
UNREACHABLE();
|
||||
}
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
default:
|
||||
builder->AddCharacter(current());
|
||||
Advance();
|
||||
|
@ -866,12 +866,19 @@ uint32_t RegExpParser::ParseClassCharacterEscape() {
|
|||
return '\\';
|
||||
}
|
||||
case '0':
|
||||
FALL_THROUGH;
|
||||
case '1':
|
||||
FALL_THROUGH;
|
||||
case '2':
|
||||
FALL_THROUGH;
|
||||
case '3':
|
||||
FALL_THROUGH;
|
||||
case '4':
|
||||
FALL_THROUGH;
|
||||
case '5':
|
||||
FALL_THROUGH;
|
||||
case '6':
|
||||
FALL_THROUGH;
|
||||
case '7':
|
||||
// For compatibility, we interpret a decimal escape that isn't
|
||||
// a back reference (and therefore either \0 or not valid according
|
||||
|
|
|
@ -1584,8 +1584,8 @@ DART_FORCE_INLINE void Simulator::DecodeType01(Instr* instr) {
|
|||
// Registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
|
||||
// Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
|
||||
rd_val = get_register(rd);
|
||||
FALL_THROUGH;
|
||||
}
|
||||
/* Falls through */
|
||||
case 0: {
|
||||
// Registers rd, rn, rm are encoded as rn, rm, rs.
|
||||
// Format(instr, "mul'cond's 'rn, 'rm, 'rs");
|
||||
|
@ -1642,7 +1642,7 @@ DART_FORCE_INLINE void Simulator::DecodeType01(Instr* instr) {
|
|||
// umaal is only in ARMv6 and above.
|
||||
UnimplementedInstruction(instr);
|
||||
}
|
||||
/* Falls through */
|
||||
FALL_THROUGH;
|
||||
case 5:
|
||||
// Registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs.
|
||||
// Format(instr, "umlal'cond's 'rd, 'rn, 'rm, 'rs");
|
||||
|
|
|
@ -51,16 +51,19 @@ intptr_t TimelineEventSystraceRecorder::PrintSystrace(TimelineEvent* event,
|
|||
case TimelineEvent::kBegin: {
|
||||
length = Utils::SNPrint(buffer, buffer_size, "B|%" Pd64 "|%s", pid,
|
||||
event->label());
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
case TimelineEvent::kEnd: {
|
||||
length = Utils::SNPrint(buffer, buffer_size, "E");
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
case TimelineEvent::kCounter: {
|
||||
if (event->arguments_length() > 0) {
|
||||
// We only report the first counter value.
|
||||
length = Utils::SNPrint(buffer, buffer_size, "C|%" Pd64 "|%s|%s", pid,
|
||||
event->label(), event->arguments()[0].value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Ignore event types that we cannot serialize to the Systrace format.
|
||||
|
|
|
@ -61,16 +61,19 @@ intptr_t TimelineEventSystraceRecorder::PrintSystrace(TimelineEvent* event,
|
|||
case TimelineEvent::kBegin: {
|
||||
length = Utils::SNPrint(buffer, buffer_size, "B|%" Pd64 "|%s", pid,
|
||||
event->label());
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
case TimelineEvent::kEnd: {
|
||||
length = Utils::SNPrint(buffer, buffer_size, "E");
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
case TimelineEvent::kCounter: {
|
||||
if (event->arguments_length() > 0) {
|
||||
// We only report the first counter value.
|
||||
length = Utils::SNPrint(buffer, buffer_size, "C|%" Pd64 "|%s|%s", pid,
|
||||
event->label(), event->arguments()[0].value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Ignore event types that we cannot serialize to the Systrace format.
|
||||
|
|
Loading…
Reference in a new issue