Summary: | jsc-tailcall: Add enums for type-safety | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Basile Clement <basile_clement> | ||||||||||
Component: | JavaScriptCore | Assignee: | Basile Clement <basile_clement> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | msaboff | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 146477 | ||||||||||||
Attachments: |
|
Description
Basile Clement
2015-07-30 16:57:34 PDT
Created attachment 257881 [details]
Patch
Building to run the tests but this should solve the build failures from the merge from trunk. Created attachment 257882 [details]
Patch
Now it builds
Comment on attachment 257881 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257881&action=review r- You need to add CallMode.{cpp,h} & DeferredSourceDump.{cpp,h} to Windows and cmake builds. > Source/JavaScriptCore/bytecode/CallMode.h:31 > +enum class CallMode { Tail = 0, Regular, Construct }; Minor nit - Wouldn't it make more logical sense to order these Regular, TailCail, Construct, is there special meaning to TailCall being 0? > Source/JavaScriptCore/bytecode/CallMode.h:33 > +enum FrameAction { KeepTheFrame = 0, TrashTheFrame }; Doesn't ReuseTheFrame sound better? (In reply to comment #4) > Comment on attachment 257881 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=257881&action=review > > r- > You need to add CallMode.{cpp,h} & DeferredSourceDump.{cpp,h} to Windows and > cmake builds. Oh oops, I knew there was a reason I kept this locally instead of submitting a patch earlier... (Note that there is nothing to do w/ DeferredSourceDump, it was just reordered when I did "Sort by name" in XCode). > > > Source/JavaScriptCore/bytecode/CallMode.h:31 > > +enum class CallMode { Tail = 0, Regular, Construct }; > > Minor nit - Wouldn't it make more logical sense to order these Regular, > TailCail, Construct, is there special meaning to TailCall being 0? It would make sense. Tail is 0 because CallMode and FrameAction were a single enum initially, changing this. > > > Source/JavaScriptCore/bytecode/CallMode.h:33 > > +enum FrameAction { KeepTheFrame = 0, TrashTheFrame }; > > Doesn't ReuseTheFrame sound better? ReuseTheFrame is much nicer, changing this. Created attachment 257885 [details]
Patch
Created attachment 257887 [details]
Patch
Comment on attachment 257887 [details]
Patch
r=me
Landed in r187629 <http://trac.webkit.org/changeset/187629> |