WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147475
jsc-tailcall: Add enums for type-safety
https://bugs.webkit.org/show_bug.cgi?id=147475
Summary
jsc-tailcall: Add enums for type-safety
Basile Clement
Reported
2015-07-30 16:57:34 PDT
We should have: - An enum to specify whether we want to keep or trash the caller frame instead of using reinterpret_cast<void*>(0) and reinterpret_cast<void*>(1) - An enum to indicate whether we are performing a regular call, a tail call, or a constructor call.
Attachments
Patch
(29.20 KB, patch)
2015-07-30 17:03 PDT
,
Basile Clement
msaboff
: review-
Details
Formatted Diff
Diff
Patch
(29.10 KB, patch)
2015-07-30 17:08 PDT
,
Basile Clement
no flags
Details
Formatted Diff
Diff
Patch
(31.91 KB, patch)
2015-07-30 17:34 PDT
,
Basile Clement
no flags
Details
Formatted Diff
Diff
Patch
(32.06 KB, patch)
2015-07-30 17:38 PDT
,
Basile Clement
msaboff
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Basile Clement
Comment 1
2015-07-30 17:03:44 PDT
Created
attachment 257881
[details]
Patch
Basile Clement
Comment 2
2015-07-30 17:04:53 PDT
Building to run the tests but this should solve the build failures from the merge from trunk.
Basile Clement
Comment 3
2015-07-30 17:08:31 PDT
Created
attachment 257882
[details]
Patch Now it builds
Michael Saboff
Comment 4
2015-07-30 17:28:21 PDT
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?
Basile Clement
Comment 5
2015-07-30 17:30:47 PDT
(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.
Basile Clement
Comment 6
2015-07-30 17:34:59 PDT
Created
attachment 257885
[details]
Patch
Basile Clement
Comment 7
2015-07-30 17:38:24 PDT
Created
attachment 257887
[details]
Patch
Michael Saboff
Comment 8
2015-07-30 17:40:30 PDT
Comment on
attachment 257887
[details]
Patch r=me
Basile Clement
Comment 9
2015-07-30 17:44:01 PDT
Landed in
r187629
<
http://trac.webkit.org/changeset/187629
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug