Bug 60942 - Reduce code size for inline cache
Summary: Reduce code size for inline cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 20:34 PDT by Oliver Hunt
Modified: 2011-05-23 10:26 PDT (History)
5 users (show)

See Also:


Attachments
Patch (31.25 KB, patch)
2011-05-16 21:09 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (31.04 KB, patch)
2011-05-17 12:31 PDT, Oliver Hunt
barraclough: review+
Details | Formatted Diff | Diff
fix issue (2.19 KB, patch)
2011-05-23 10:23 PDT, thouraya
oliver: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2011-05-16 20:34:49 PDT
Reduce code size for inline cache
Comment 1 Oliver Hunt 2011-05-16 21:09:46 PDT
Created attachment 93735 [details]
Patch
Comment 2 WebKit Review Bot 2011-05-16 21:12:29 PDT
Attachment 93735 [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/assembler/CodeLocation.h:133:  Missing space inside { }.  [whitespace/braces] [5]
Source/JavaScriptCore/assembler/CodeLocation.h:135:  Missing space inside { }.  [whitespace/braces] [5]
Source/JavaScriptCore/assembler/CodeLocation.h:137:  Missing space inside { }.  [whitespace/braces] [5]
Source/JavaScriptCore/assembler/X86Assembler.h:1023:  movl_mr_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:1098:  movq_mr_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:1687:  oneByteOp_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:1801:  oneByteOp64_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:2040:  memoryModRM_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 8 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Collabora GTK+ EWS bot 2011-05-17 01:06:14 PDT
Comment on attachment 93735 [details]
Patch

Attachment 93735 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/8701997
Comment 4 Oliver Hunt 2011-05-17 12:31:42 PDT
Created attachment 93808 [details]
Patch
Comment 5 WebKit Review Bot 2011-05-17 12:34:48 PDT
Attachment 93808 [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/assembler/X86Assembler.h:1023:  movl_mr_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:1098:  movq_mr_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:1687:  oneByteOp_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:1801:  oneByteOp64_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/assembler/X86Assembler.h:2041:  memoryModRM_disp8 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 5 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Gavin Barraclough 2011-05-17 12:56:14 PDT
Comment on attachment 93808 [details]
Patch

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

> Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:68
> +    static const int MaximumCompactPtrAlignedAddressOffset = 0x7FFFFFFF;

I think defining this here could be confusing, since you have have implementations of load32WithAddressOffsetPatch in all macro assemblers.  To avoid programmer errors I suggest moving this down into the architecture specific MacroAssemblers.

> Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:44
> +    static const int MaximumCompactPtrAlignedAddressOffset = ((1 << 8) - 1) / 2;

I think just 127 would be clearer here.
Comment 7 Oliver Hunt 2011-05-17 13:03:53 PDT
Committed r86699: <http://trac.webkit.org/changeset/86699>
Comment 8 thouraya 2011-05-23 10:23:02 PDT
Created attachment 94436 [details]
fix issue

Hello,

Fix issues related to the patch:
added load32WithCompactAddressOffsetPatch function and removed the duplicated function load32WithAddressOffsetPatch.

Regards,
Thouraya.
Comment 9 Oliver Hunt 2011-05-23 10:26:09 PDT
Comment on attachment 94436 [details]
fix issue

I think it would be better simply to implement the compact version properly -- it looked like sh4 should be able to do this in a single instruction saving memory + cpu time