X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/bytecode/Watchpoint.cpp?ds=sidebyside diff --git a/bytecode/Watchpoint.cpp b/bytecode/Watchpoint.cpp index 081654d..3c5f93a 100644 --- a/bytecode/Watchpoint.cpp +++ b/bytecode/Watchpoint.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. + * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,6 +31,11 @@ namespace JSC { +void StringFireDetail::dump(PrintStream& out) const +{ + out.print(m_string); +} + Watchpoint::~Watchpoint() { if (isOnList()) @@ -64,20 +69,25 @@ void WatchpointSet::add(Watchpoint* watchpoint) m_state = IsWatched; } -void WatchpointSet::fireAllSlow() +void WatchpointSet::fireAllSlow(const FireDetail& detail) { ASSERT(state() == IsWatched); WTF::storeStoreFence(); - fireAllWatchpoints(); + fireAllWatchpoints(detail); m_state = IsInvalidated; WTF::storeStoreFence(); } -void WatchpointSet::fireAllWatchpoints() +void WatchpointSet::fireAllSlow(const char* reason) +{ + fireAllSlow(StringFireDetail(reason)); +} + +void WatchpointSet::fireAllWatchpoints(const FireDetail& detail) { while (!m_set.isEmpty()) - m_set.begin()->fire(); + m_set.begin()->fire(detail); } void InlineWatchpointSet::add(Watchpoint* watchpoint) @@ -85,6 +95,11 @@ void InlineWatchpointSet::add(Watchpoint* watchpoint) inflate()->add(watchpoint); } +void InlineWatchpointSet::fireAll(const char* reason) +{ + fireAll(StringFireDetail(reason)); +} + WatchpointSet* InlineWatchpointSet::inflateSlow() { ASSERT(isThin());