Changeset 112624 in webkit for trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp
- Timestamp:
- Mar 29, 2012, 5:36:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp
r111739 r112624 69 69 using namespace WTF; 70 70 71 namespace {72 73 using namespace JSC;74 75 class Recompiler : public MarkedBlock::VoidFunctor {76 public:77 void operator()(JSCell*);78 };79 80 inline void Recompiler::operator()(JSCell* cell)81 {82 if (!cell->inherits(&JSFunction::s_info))83 return;84 JSFunction* function = jsCast<JSFunction*>(cell);85 if (!function->executable() || function->executable()->isHostFunction())86 return;87 function->jsExecutable()->discardCode();88 }89 90 } // namespace91 92 71 namespace JSC { 93 72 … … 444 423 } 445 424 446 void JSGlobalData::recompileAllJSFunctions()447 {448 // If JavaScript is running, it's not safe to recompile, since we'll end449 // up throwing away code that is live on the stack.450 ASSERT(!dynamicGlobalObject);451 452 heap.objectSpace().forEachCell<Recompiler>();453 }454 455 425 struct StackPreservingRecompiler : public MarkedBlock::VoidFunctor { 456 426 HashSet<FunctionExecutable*> currentlyExecutingFunctions;
Note:
See TracChangeset
for help on using the changeset viewer.