Changeset 223727 in webkit


Ignore:
Timestamp:
Oct 19, 2017 4:34:20 PM (7 years ago)
Author:
sbarati@apple.com
Message:

re-inline ObjectAllocationProfile::initializeProfile
https://bugs.webkit.org/show_bug.cgi?id=178532

Rubber stamped by Michael Saboff.

I un-inlined this function when implementing poly proto.
This patch re-inlines it. In my testing, it looks like it
might be a 0.5% speedometer progression to inline it.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CodeBlock.cpp:
  • bytecode/ObjectAllocationProfile.cpp: Removed.
  • bytecode/ObjectAllocationProfileInlines.h: Copied from Source/JavaScriptCore/bytecode/ObjectAllocationProfile.cpp.

(JSC::ObjectAllocationProfile::initializeProfile):
(JSC::ObjectAllocationProfile::possibleDefaultPropertyCount):

  • runtime/FunctionRareData.cpp:
Location:
trunk/Source/JavaScriptCore
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r223724 r223727  
     12017-10-19  Saam Barati  <sbarati@apple.com>
     2
     3        re-inline ObjectAllocationProfile::initializeProfile
     4        https://bugs.webkit.org/show_bug.cgi?id=178532
     5
     6        Rubber stamped by Michael Saboff.
     7
     8        I un-inlined this function when implementing poly proto.
     9        This patch re-inlines it. In my testing, it looks like it
     10        might be a 0.5% speedometer progression to inline it.
     11
     12        * JavaScriptCore.xcodeproj/project.pbxproj:
     13        * Sources.txt:
     14        * bytecode/CodeBlock.cpp:
     15        * bytecode/ObjectAllocationProfile.cpp: Removed.
     16        * bytecode/ObjectAllocationProfileInlines.h: Copied from Source/JavaScriptCore/bytecode/ObjectAllocationProfile.cpp.
     17        (JSC::ObjectAllocationProfile::initializeProfile):
     18        (JSC::ObjectAllocationProfile::possibleDefaultPropertyCount):
     19        * runtime/FunctionRareData.cpp:
     20
    1212017-10-19  Michael Saboff  <msaboff@apple.com>
    222
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r223595 r223727  
    10731073                79A228361D35D71F00D8E067 /* ArithProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 79A228341D35D71E00D8E067 /* ArithProfile.h */; };
    10741074                79ABB17E1E5CCB570045B9A6 /* AirDisassembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 79ABB17C1E5CCB570045B9A6 /* AirDisassembler.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1075                79AC30FF1F99536400484FD7 /* ObjectAllocationProfileInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AC30FE1F99536300484FD7 /* ObjectAllocationProfileInlines.h */; };
    10751076                79AF0BE41D3EFD4C00E95FA5 /* JITMathICInlineResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AF0BE31D3EFD4C00E95FA5 /* JITMathICInlineResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
    10761077                79B00CBD1C6AB07E0088C65D /* ProxyConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 79B00CB91C6AB07E0088C65D /* ProxyConstructor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    35293530                79ABB17B1E5CCB570045B9A6 /* AirDisassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirDisassembler.cpp; path = b3/air/AirDisassembler.cpp; sourceTree = "<group>"; };
    35303531                79ABB17C1E5CCB570045B9A6 /* AirDisassembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirDisassembler.h; path = b3/air/AirDisassembler.h; sourceTree = "<group>"; };
     3532                79AC30FE1F99536300484FD7 /* ObjectAllocationProfileInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectAllocationProfileInlines.h; sourceTree = "<group>"; };
    35313533                79AF0BE31D3EFD4C00E95FA5 /* JITMathICInlineResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITMathICInlineResult.h; sourceTree = "<group>"; };
    35323534                79B00CB81C6AB07E0088C65D /* ProxyConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProxyConstructor.cpp; sourceTree = "<group>"; };
     
    73707372                                14AD91091DCA92940014F9FE /* ModuleProgramCodeBlock.h */,
    73717373                                14CA958C16AB50FA00938A06 /* ObjectAllocationProfile.h */,
     7374                                79AC30FE1F99536300484FD7 /* ObjectAllocationProfileInlines.h */,
    73727375                                0FD3E4031B618B6600C80E1E /* ObjectPropertyCondition.cpp */,
    73737376                                0FD3E4041B618B6600C80E1E /* ObjectPropertyCondition.h */,
     
    85908593                                A12BBFF21B044A8B00664B69 /* IntlObject.h in Headers */,
    85918594                                708EBE241CE8F35800453146 /* IntlObjectInlines.h in Headers */,
     8595                                79AC30FF1F99536400484FD7 /* ObjectAllocationProfileInlines.h in Headers */,
    85928596                                860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
    85938597                                534E03541E53BD2900213F64 /* IntrinsicGetterAccessCase.h in Headers */,
  • trunk/Source/JavaScriptCore/Sources.txt

    r223621 r223727  
    228228bytecode/ModuleNamespaceAccessCase.cpp
    229229bytecode/ModuleProgramCodeBlock.cpp
    230 bytecode/ObjectAllocationProfile.cpp
    231230bytecode/ObjectPropertyCondition.cpp
    232231bytecode/ObjectPropertyConditionSet.cpp
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r223155 r223727  
    6767#include "LowLevelInterpreter.h"
    6868#include "ModuleProgramCodeBlock.h"
     69#include "ObjectAllocationProfileInlines.h"
    6970#include "PCToCodeOriginMap.h"
    7071#include "PolymorphicAccess.h"
  • trunk/Source/JavaScriptCore/bytecode/ObjectAllocationProfileInlines.h

    r223725 r223727  
    2424 */
    2525
    26 #include "config.h"
     26#pragma once
     27
    2728#include "ObjectAllocationProfile.h"
    2829
    29 #include "JSFunction.h"
    3030#include "JSFunctionInlines.h"
    3131
    3232namespace JSC {
    3333
    34 void ObjectAllocationProfile::initializeProfile(VM& vm, JSGlobalObject* globalObject, JSCell* owner, JSObject* prototype, unsigned inferredInlineCapacity, JSFunction* constructor)
     34ALWAYS_INLINE void ObjectAllocationProfile::initializeProfile(VM& vm, JSGlobalObject* globalObject, JSCell* owner, JSObject* prototype, unsigned inferredInlineCapacity, JSFunction* constructor)
    3535{
    3636    ASSERT(!m_allocator);
     
    132132}
    133133
    134 unsigned ObjectAllocationProfile::possibleDefaultPropertyCount(VM& vm, JSObject* prototype)
     134ALWAYS_INLINE unsigned ObjectAllocationProfile::possibleDefaultPropertyCount(VM& vm, JSObject* prototype)
    135135{
    136136    if (prototype == prototype->globalObject()->objectPrototype())
  • trunk/Source/JavaScriptCore/runtime/FunctionRareData.cpp

    r222827 r223727  
    2828
    2929#include "JSCInlines.h"
     30#include "ObjectAllocationProfileInlines.h"
    3031
    3132namespace JSC {
Note: See TracChangeset for help on using the changeset viewer.