Bug 144925 - Refactor MachineStackMarker.cpp so that it's easier to reason about MachineThreads::Thread.
Summary: Refactor MachineStackMarker.cpp so that it's easier to reason about MachineTh...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks: 144924
  Show dependency treegraph
 
Reported: 2015-05-12 12:49 PDT by Mark Lam
Modified: 2015-05-12 14:23 PDT (History)
5 users (show)

See Also:


Attachments
the patch. (11.75 KB, patch)
2015-05-12 13:03 PDT, Mark Lam
mark.lam: review-
Details | Formatted Diff | Diff
patch 2 (11.80 KB, patch)
2015-05-12 13:38 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
patch 3: with build fixes (12.84 KB, patch)
2015-05-12 13:44 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
patch 4: build fix 2 (11.95 KB, patch)
2015-05-12 13:51 PDT, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2015-05-12 12:49:24 PDT
Currently, the code in MachineStackMarker.cpp is written as a bunch of functions that operate on the platformThread value in the MachineThreads::Thread struct.  Instead, we can apply better OO encapsulation and convert all these functions into methods of the MachineThreads::Thread struct.

This will also make it easier to reason about the fix for https://bugs.webkit.org/show_bug.cgi?id=144924 later.
Comment 1 Mark Lam 2015-05-12 12:52:29 PDT
<rdar://problem/18736465>
Comment 2 Mark Lam 2015-05-12 13:03:03 PDT
Created attachment 252977 [details]
the patch.
Comment 3 Mark Lam 2015-05-12 13:08:54 PDT
Comment on attachment 252977 [details]
the patch.

I think I can improve the readability a little more.  Will upload a 2nd patch shortly.
Comment 4 Mark Lam 2015-05-12 13:38:00 PDT
Created attachment 252979 [details]
patch 2
Comment 5 Mark Lam 2015-05-12 13:44:39 PDT
Created attachment 252980 [details]
patch 3: with build fixes
Comment 6 Mark Lam 2015-05-12 13:51:22 PDT
Created attachment 252982 [details]
patch 4: build fix 2
Comment 7 Michael Saboff 2015-05-12 14:02:29 PDT
Comment on attachment 252982 [details]
patch 4: build fix 2

r=me
Make sure Windows EWS builds
Comment 8 Mark Lam 2015-05-12 14:23:00 PDT
The EWS bots are happy.

Landed in r184218: <http://trac.webkit.org/r184218>.