Summary: | Clear bytecode vector after JITing | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Sam Weinig
2008-12-16 23:09:05 PST
Created attachment 26087 [details]
patch
Comment on attachment 26087 [details] patch > + (JSC::CodeBlock::handlerForBytecodeOffset): Don't assert that the offset > + is less than the size of the bytecode vector since it may have been cleared > + and therefore 0. I think it would be better to keep around the size of the bytecode vector in a separate variable in debug versions so we could keep these assertions. r=me Comment on attachment 26087 [details] patch > m_codeBlock->setJITCode(codeRef); > +#if !ENABLE(OPCODE_SAMPLING) > + m_codeBlock->instructions().clear(); > +#endif I think it would be better to do this: #if ENABLE(OPCODE_SAMPLING) // Don't clear instructions -- we need them for sampling. #elsif !defined(NDEBUG) if (!s_dumpsGeneratedCode) m_codeBlock->instructions().clear(); #else m_codeBlock->instructions().clear(); #endif > I think it would be better to do this:
That way, you can still dump code in debug builds.
|