Index: runtime/vm/code_descriptors.cc |
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc |
index cc8b043800cde865cffba603c21d95ada417751f..53f44ca9ec4593fdca033bbfc892df9403d69400 100644 |
--- a/runtime/vm/code_descriptors.cc |
+++ b/runtime/vm/code_descriptors.cc |
@@ -34,7 +34,6 @@ void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind, |
} |
} |
- |
RawPcDescriptors* DescriptorList::FinalizePcDescriptors(uword entry_point) { |
if (encoded_data_.length() == 0) { |
return Object::empty_descriptors().raw(); |
@@ -42,7 +41,6 @@ RawPcDescriptors* DescriptorList::FinalizePcDescriptors(uword entry_point) { |
return PcDescriptors::New(&encoded_data_); |
} |
- |
void StackMapTableBuilder::AddEntry(intptr_t pc_offset, |
BitmapBuilder* bitmap, |
intptr_t register_bit_count) { |
@@ -50,7 +48,6 @@ void StackMapTableBuilder::AddEntry(intptr_t pc_offset, |
list_.Add(stack_map_, Heap::kOld); |
} |
- |
bool StackMapTableBuilder::Verify() { |
intptr_t num_entries = Length(); |
StackMap& map1 = StackMap::Handle(); |
@@ -66,7 +63,6 @@ bool StackMapTableBuilder::Verify() { |
return true; |
} |
- |
RawArray* StackMapTableBuilder::FinalizeStackMaps(const Code& code) { |
ASSERT(Verify()); |
intptr_t num_entries = Length(); |
@@ -76,14 +72,12 @@ RawArray* StackMapTableBuilder::FinalizeStackMaps(const Code& code) { |
return Array::MakeFixedLength(list_); |
} |
- |
RawStackMap* StackMapTableBuilder::MapAt(intptr_t index) const { |
StackMap& map = StackMap::Handle(); |
map ^= list_.At(index); |
return map.raw(); |
} |
- |
RawExceptionHandlers* ExceptionHandlerList::FinalizeExceptionHandlers( |
uword entry_point) const { |
intptr_t num_handlers = Length(); |
@@ -116,7 +110,6 @@ RawExceptionHandlers* ExceptionHandlerList::FinalizeExceptionHandlers( |
return handlers.raw(); |
} |
- |
static uint8_t* zone_allocator(uint8_t* ptr, |
intptr_t old_size, |
intptr_t new_size) { |
@@ -124,7 +117,6 @@ static uint8_t* zone_allocator(uint8_t* ptr, |
return zone->Realloc<uint8_t>(ptr, old_size, new_size); |
} |
- |
class CatchEntryStateMapBuilder::TrieNode : public ZoneAllocated { |
public: |
TrieNode() : pair_(), entry_state_offset_(-1) {} |
@@ -158,25 +150,21 @@ CatchEntryStateMapBuilder::CatchEntryStateMapBuilder() |
buffer_(NULL), |
stream_(&buffer_, zone_allocator, 64) {} |
- |
void CatchEntryStateMapBuilder::AppendMove(intptr_t src_slot, |
intptr_t dest_slot) { |
moves_.Add(CatchEntryStatePair::FromMove(src_slot, dest_slot)); |
} |
- |
void CatchEntryStateMapBuilder::AppendConstant(intptr_t pool_id, |
intptr_t dest_slot) { |
moves_.Add(CatchEntryStatePair::FromConstant(pool_id, dest_slot)); |
} |
- |
void CatchEntryStateMapBuilder::NewMapping(intptr_t pc_offset) { |
moves_.Clear(); |
current_pc_offset_ = pc_offset; |
} |
- |
void CatchEntryStateMapBuilder::EndMapping() { |
intptr_t suffix_length = 0; |
TrieNode* suffix = root_; |
@@ -208,7 +196,6 @@ void CatchEntryStateMapBuilder::EndMapping() { |
} |
} |
- |
RawTypedData* CatchEntryStateMapBuilder::FinalizeCatchEntryStateMap() { |
TypedData& td = TypedData::Handle(TypedData::New( |
kTypedDataInt8ArrayCid, stream_.bytes_written(), Heap::kOld)); |
@@ -221,11 +208,9 @@ RawTypedData* CatchEntryStateMapBuilder::FinalizeCatchEntryStateMap() { |
return td.raw(); |
} |
- |
const TokenPosition CodeSourceMapBuilder::kInitialPosition = |
TokenPosition(TokenPosition::kDartCodeProloguePos); |
- |
CodeSourceMapBuilder::CodeSourceMapBuilder( |
bool stack_traces_only, |
const GrowableArray<intptr_t>& caller_inline_id, |
@@ -251,14 +236,12 @@ CodeSourceMapBuilder::CodeSourceMapBuilder( |
written_token_pos_stack_.Add(kInitialPosition); |
} |
- |
void CodeSourceMapBuilder::FlushBuffer() { |
FlushBufferStack(); |
FlushBufferPosition(); |
FlushBufferPC(); |
} |
- |
void CodeSourceMapBuilder::FlushBufferStack() { |
for (intptr_t i = buffered_inline_id_stack_.length() - 1; i >= 0; i--) { |
intptr_t buffered_id = buffered_inline_id_stack_[i]; |
@@ -285,7 +268,6 @@ void CodeSourceMapBuilder::FlushBufferStack() { |
UNREACHABLE(); |
} |
- |
void CodeSourceMapBuilder::FlushBufferPosition() { |
ASSERT(buffered_token_pos_stack_.length() == |
written_token_pos_stack_.length()); |
@@ -298,14 +280,12 @@ void CodeSourceMapBuilder::FlushBufferPosition() { |
} |
} |
- |
void CodeSourceMapBuilder::FlushBufferPC() { |
if (buffered_pc_offset_ != written_pc_offset_) { |
WriteAdvancePC(buffered_pc_offset_ - written_pc_offset_); |
} |
} |
- |
void CodeSourceMapBuilder::StartInliningInterval(int32_t pc_offset, |
intptr_t inline_id) { |
if (buffered_inline_id_stack_.Last() == inline_id) { |
@@ -357,10 +337,8 @@ void CodeSourceMapBuilder::StartInliningInterval(int32_t pc_offset, |
} |
} |
- |
void CodeSourceMapBuilder::BeginCodeSourceRange(int32_t pc_offset) {} |
- |
void CodeSourceMapBuilder::EndCodeSourceRange(int32_t pc_offset, |
TokenPosition pos) { |
if (pc_offset == buffered_pc_offset_) { |
@@ -375,7 +353,6 @@ void CodeSourceMapBuilder::EndCodeSourceRange(int32_t pc_offset, |
BufferAdvancePC(pc_offset - buffered_pc_offset_); |
} |
- |
void CodeSourceMapBuilder::NoteDescriptor(RawPcDescriptors::Kind kind, |
int32_t pc_offset, |
TokenPosition pos) { |
@@ -389,7 +366,6 @@ void CodeSourceMapBuilder::NoteDescriptor(RawPcDescriptors::Kind kind, |
} |
} |
- |
intptr_t CodeSourceMapBuilder::GetFunctionId(intptr_t inline_id) { |
const Function& function = *inline_id_to_function_[inline_id]; |
for (intptr_t i = 0; i < inlined_functions_.Length(); i++) { |
@@ -401,7 +377,6 @@ intptr_t CodeSourceMapBuilder::GetFunctionId(intptr_t inline_id) { |
return inlined_functions_.Length() - 1; |
} |
- |
RawArray* CodeSourceMapBuilder::InliningIdToFunction() { |
if (inlined_functions_.Length() == 0) { |
return Object::empty_array().raw(); |
@@ -409,7 +384,6 @@ RawArray* CodeSourceMapBuilder::InliningIdToFunction() { |
return Array::MakeFixedLength(inlined_functions_); |
} |
- |
RawCodeSourceMap* CodeSourceMapBuilder::Finalize() { |
if (!stack_traces_only_) { |
FlushBuffer(); |
@@ -421,7 +395,6 @@ RawCodeSourceMap* CodeSourceMapBuilder::Finalize() { |
return map.raw(); |
} |
- |
void CodeSourceMapBuilder::WriteChangePosition(TokenPosition pos) { |
stream_.Write<uint8_t>(kChangePosition); |
if (FLAG_precompiled_mode) { |
@@ -439,7 +412,6 @@ void CodeSourceMapBuilder::WriteChangePosition(TokenPosition pos) { |
written_token_pos_stack_.Last() = pos; |
} |
- |
void CodeSourceMapReader::GetInlinedFunctionsAt( |
int32_t pc_offset, |
GrowableArray<const Function*>* function_stack, |
@@ -492,7 +464,6 @@ void CodeSourceMapReader::GetInlinedFunctionsAt( |
} |
} |
- |
#ifndef PRODUCT |
void CodeSourceMapReader::PrintJSONInlineIntervals(JSONObject* jsobj) { |
{ |
@@ -551,7 +522,6 @@ void CodeSourceMapReader::PrintJSONInlineIntervals(JSONObject* jsobj) { |
} |
#endif // !PRODUCT |
- |
void CodeSourceMapReader::DumpInlineIntervals(uword start) { |
GrowableArray<const Function*> function_stack; |
LogBlock lb; |
@@ -599,7 +569,6 @@ void CodeSourceMapReader::DumpInlineIntervals(uword start) { |
THR_Print("}\n"); |
} |
- |
void CodeSourceMapReader::DumpSourcePositions(uword start) { |
GrowableArray<const Function*> function_stack; |
GrowableArray<TokenPosition> token_positions; |