WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
70157
FunctionExecutable should expose the ability to create unattached FunctionCodeBlocks
https://bugs.webkit.org/show_bug.cgi?id=70157
Summary
FunctionExecutable should expose the ability to create unattached FunctionCod...
Filip Pizlo
Reported
2011-10-14 16:43:04 PDT
Inlining requires being able to create a CodeBlock that is populated with bytecode for any callee that constitutes an inlining candidate. Currently this is not possible without a non-trivial amount of code duplication. Since FunctionExecutable already has the code for creating FunctionCodeBlocks that are populated with bytecode (in fact it has this functionality twice), this should simply be exposed as a method. This will also provide an opportunity to reduce some of the redundant code in FunctionExecutable.
Attachments
the patch
(16.24 KB, patch)
2011-10-14 16:48 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch - fix style
(16.20 KB, patch)
2011-10-14 16:54 PDT
,
Filip Pizlo
ggaren
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2011-10-14 16:48:22 PDT
Created
attachment 111107
[details]
the patch
WebKit Review Bot
Comment 2
2011-10-14 16:50:52 PDT
Attachment 111107
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/runtime/Executable.h:465: The parameter name "exec" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/runtime/Executable.h:465: The parameter name "scopeChainNode" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/runtime/Executable.h:465: The parameter name "compilationKind" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/runtime/Executable.h:465: The parameter name "kind" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 4 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 3
2011-10-14 16:54:43 PDT
Created
attachment 111108
[details]
the patch - fix style
Geoffrey Garen
Comment 4
2011-10-14 17:10:57 PDT
Comment on
attachment 111108
[details]
the patch - fix style View in context:
https://bugs.webkit.org/attachment.cgi?id=111108&action=review
r=me
> Source/JavaScriptCore/runtime/Executable.cpp:416 > + return PassOwnPtr<FunctionCodeBlock>();
I think you can just return nullptr here.
> Source/JavaScriptCore/runtime/Executable.cpp:427 > + result = adoptPtr(new FunctionCodeBlock(this, FunctionCode, globalObject, source().provider(), source().startOffset(), specializationKind == CodeForConstruct, PassOwnPtr<FunctionCodeBlock>()));
nullptr, or maybe just make that the default function argument.
> Source/JavaScriptCore/runtime/Executable.cpp:432 > + return PassOwnPtr<FunctionCodeBlock>();
nullptr
Filip Pizlo
Comment 5
2011-10-15 14:44:23 PDT
Landed in
r97564
.
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