Bug 142436 - The code to link FunctionExecutable is duplicated everywhere
Summary: The code to link FunctionExecutable is duplicated everywhere
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 142388
  Show dependency treegraph
 
Reported: 2015-03-07 01:18 PST by Ryosuke Niwa
Modified: 2015-03-07 14:10 PST (History)
7 users (show)

See Also:


Attachments
Patch (13.38 KB, patch)
2015-03-07 01:25 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixed the bug title (13.37 KB, patch)
2015-03-07 01:27 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Cleanup (13.35 KB, patch)
2015-03-07 01:36 PST, Ryosuke Niwa
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-03-07 01:18:02 PST
There's a lot of code duplicated to adjust offsets within SourceCode.
Refactor them into two functions.
Comment 1 Ryosuke Niwa 2015-03-07 01:25:53 PST
Created attachment 248150 [details]
Patch
Comment 2 Ryosuke Niwa 2015-03-07 01:27:50 PST
Created attachment 248151 [details]
Fixed the bug title
Comment 3 Ryosuke Niwa 2015-03-07 01:36:41 PST
Created attachment 248152 [details]
Cleanup
Comment 4 Darin Adler 2015-03-07 08:51:12 PST
Comment on attachment 248152 [details]
Cleanup

View in context: https://bugs.webkit.org/attachment.cgi?id=248152&action=review

> Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:144
> +    // The unlinkedBodyEndColumn is based-0. Hence, we need to add 1 to it. But if the

The term is "0-based", not "based-0". Would be nice to fix this since you are moving this comment into a new function.
Comment 5 Filip Pizlo 2015-03-07 09:05:03 PST
Comment on attachment 248152 [details]
Cleanup

Thanks for doing this!
Comment 6 Ryosuke Niwa 2015-03-07 13:44:54 PST
(In reply to comment #4)
> Comment on attachment 248152 [details]
> Cleanup
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=248152&action=review
> 
> > Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:144
> > +    // The unlinkedBodyEndColumn is based-0. Hence, we need to add 1 to it. But if the
> 
> The term is "0-based", not "based-0". Would be nice to fix this since you
> are moving this comment into a new function.

Thanks for the review. Will fix!
Comment 7 Ryosuke Niwa 2015-03-07 14:10:34 PST
Committed r181213: <http://trac.webkit.org/changeset/181213>