Skip to content

Commit

Permalink
fibers
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbashir committed Sep 7, 2024
1 parent c063aae commit 383b321
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
2 changes: 2 additions & 0 deletions runtime/vm/exceptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ static void BuildStackTrace(StackTraceBuilder* builder) {
if (!frame->IsDartFrame()) {
continue;
}
OS::Print("BuildStackTrace\n");
code = frame->LookupDartCode();
ASSERT(code.ContainsInstructionAt(frame->pc()));
const uword pc_offset = frame->pc() - code.PayloadStart();
Expand Down Expand Up @@ -153,6 +154,7 @@ class ExceptionHandlerFinder : public StackResource {
(handler_pc !=
StubCode::AsyncExceptionHandler().EntryPoint())) {
pc_ = frame->pc();
OS::Print("ExceptionHandlerFinder::find\n");
code_ = &Code::Handle(frame->LookupDartCode());
CatchEntryMovesRefPtr* cached_catch_entry_moves =
catch_entry_moves_cache_->Lookup(pc_);
Expand Down
3 changes: 1 addition & 2 deletions runtime/vm/stack_frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ void StackFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) {
CompressedStackMaps::Iterator<CompressedStackMaps::RawPayloadHandle> it(
maps, global_table);
const uint32_t pc_offset = pc() - code_start;
bool found = it.Find(pc_offset);
if (found) {
if (it.Find(pc_offset)) {
ObjectPtr* first = reinterpret_cast<ObjectPtr*>(sp());
ObjectPtr* last = reinterpret_cast<ObjectPtr*>(
fp() + (runtime_frame_layout.first_local_from_fp * kWordSize));
Expand Down
1 change: 0 additions & 1 deletion runtime/vm/virtual_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class VirtualMemory {
bool vm_owns_region() const { return reserved_.pointer() != nullptr; }

static VirtualMemory* ForImagePage(void* pointer, uword size);
static VirtualMemory* AllocateStack(intptr_t size);

private:
static intptr_t CalculatePageSize();
Expand Down
13 changes: 0 additions & 13 deletions runtime/vm/virtual_memory_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,19 +334,6 @@ VirtualMemory* VirtualMemory::Reserve(intptr_t size, intptr_t alignment) {
return new VirtualMemory(region, region);
}

VirtualMemory* VirtualMemory::AllocateStack(intptr_t size) {
intptr_t alignment = OS::ActivationFrameAlignment();
intptr_t allocated_size = size;
void* address =
GenericMapAligned(nullptr, PROT_EXEC | PROT_READ | PROT_WRITE, size, alignment, allocated_size, MAP_PRIVATE | MAP_ANONYMOUS);
if (address == nullptr) {
return nullptr;
}
MemoryRegion region(address, size);
return new VirtualMemory(region, region);

}

void VirtualMemory::Commit(void* address, intptr_t size) {
ASSERT(Utils::IsAligned(address, PageSize()));
ASSERT(Utils::IsAligned(size, PageSize()));
Expand Down

0 comments on commit 383b321

Please sign in to comment.