Skip to content

Commit d387036

Browse files
committed
2011-04-15 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt. globalObject moved to JSObjectWithGlobalObject.cpp inhibits inlining https://bugs.webkit.org/show_bug.cgi?id=58677 Moved JSObjectWithGlobalObject::globalObject() to runtime/JSObjectWithGlobalObject.h to allow the compiler to inline it for a performance benefit. An equivalent instance had been in a header file before r60057. * JavaScriptCore.exp: * runtime/JSObjectWithGlobalObject.cpp: * runtime/JSObjectWithGlobalObject.h: (JSC::JSObjectWithGlobalObject::globalObject): Canonical link: https://commits.webkit.org/73772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 9f52f44 commit d387036

4 files changed

Lines changed: 24 additions & 8 deletions

File tree

Source/JavaScriptCore/ChangeLog

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
2011-04-15 Michael Saboff <msaboff@apple.com>
2+
3+
Reviewed by Oliver Hunt.
4+
5+
globalObject moved to JSObjectWithGlobalObject.cpp inhibits inlining
6+
https://bugs.webkit.org/show_bug.cgi?id=58677
7+
8+
Moved JSObjectWithGlobalObject::globalObject() to
9+
runtime/JSObjectWithGlobalObject.h to allow the compiler to inline
10+
it for a performance benefit. An equivalent instance had been in
11+
a header file before r60057.
12+
13+
* JavaScriptCore.exp:
14+
* runtime/JSObjectWithGlobalObject.cpp:
15+
* runtime/JSObjectWithGlobalObject.h:
16+
(JSC::JSObjectWithGlobalObject::globalObject):
17+
118
2011-04-14 Oliver Hunt <oliver@apple.com>
219

320
Reviewed by Geoffrey Garen.

Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ PRODUCT_NAME = JavaScriptCore;
4949
OTHER_CFLAGS = $(OTHER_CFLAGS_$(CONFIGURATION)_$(CURRENT_VARIANT));
5050
OTHER_CFLAGS_Release_normal = $(OTHER_CFLAGS_normal_$(TARGET_GCC_VERSION));
5151
OTHER_CFLAGS_Production_normal = $(OTHER_CFLAGS_normal_$(TARGET_GCC_VERSION));
52-
OTHER_CFLAGS_normal_GCC_42 = -fomit-frame-pointer -funwind-tables;
52+
// OTHER_CFLAGS_normal_GCC_42 = -fomit-frame-pointer -funwind-tables;
53+
OTHER_CFLAGS_normal_GCC_42 = -funwind-tables;
5354
OTHER_CFLAGS_normal_LLVM_GCC_42 = $(OTHER_CFLAGS_normal_GCC_42);

Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,4 @@ JSObjectWithGlobalObject::JSObjectWithGlobalObject(JSGlobalObject* globalObject,
4141
putAnonymousValue(globalObject->globalData(), GlobalObjectSlot, globalObject);
4242
}
4343

44-
JSGlobalObject* JSObjectWithGlobalObject::globalObject() const
45-
{
46-
return asGlobalObject((getAnonymousValue(GlobalObjectSlot).asCell()));
47-
}
48-
4944
} // namespace JSC

Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#ifndef JSObjectWithGlobalObject_h
2727
#define JSObjectWithGlobalObject_h
2828

29-
#include "JSObject.h"
29+
#include "JSGlobalObject.h"
3030

3131
namespace JSC {
3232

@@ -39,7 +39,10 @@ class JSObjectWithGlobalObject : public JSNonFinalObject {
3939
return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
4040
}
4141

42-
JSGlobalObject* globalObject() const;
42+
JSGlobalObject* globalObject() const
43+
{
44+
return asGlobalObject((getAnonymousValue(GlobalObjectSlot).asCell()));
45+
}
4346

4447
protected:
4548
JSObjectWithGlobalObject(JSGlobalObject*, NonNullPassRefPtr<Structure>);

0 commit comments

Comments
 (0)