[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:38:53 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c1f0dbbcaf40d51d87a1e0a4f95014d71b43a93d
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Apr 25 22:47:05 2003 +0000
Reviewed by Maciej.
- a couple improvements that give a 6.6% speedup on iBench JavaScript
* kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference.
* kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper.
Contributes a tiny bit to the speedup, but cleaner anyway.
(ObjectImp::hasProperty): Same thing here.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 193925a..b2b4f76 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -2,6 +2,18 @@
Reviewed by Maciej.
+ - a couple improvements that give a 6.6% speedup on iBench JavaScript
+
+ * kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference.
+
+ * kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper.
+ Contributes a tiny bit to the speedup, but cleaner anyway.
+ (ObjectImp::hasProperty): Same thing here.
+
+2003-04-25 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
- move from linear probing to double hashing, gives an 0.7% speedup in iBench JavaScript
* kjs/property_map.h: Remove the hash function.
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index 193925a..b2b4f76 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -2,6 +2,18 @@
Reviewed by Maciej.
+ - a couple improvements that give a 6.6% speedup on iBench JavaScript
+
+ * kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference.
+
+ * kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper.
+ Contributes a tiny bit to the speedup, but cleaner anyway.
+ (ObjectImp::hasProperty): Same thing here.
+
+2003-04-25 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
- move from linear probing to double hashing, gives an 0.7% speedup in iBench JavaScript
* kjs/property_map.h: Remove the hash function.
diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp
index 7b694f8..0f4b90a 100644
--- a/JavaScriptCore/kjs/nodes.cpp
+++ b/JavaScriptCore/kjs/nodes.cpp
@@ -221,7 +221,20 @@ Value ThisNode::evaluate(ExecState *exec)
// ECMA 11.1.2 & 10.1.4
Value ResolveNode::evaluate(ExecState *exec)
{
- return evaluateReference(exec).getValue(exec);
+ // This is the same as calling evaluateReference(exec).getValue(exec),
+ // only considerably faster.
+
+ ScopeChain chain = exec->context().imp()->scopeChain();
+
+ while (!chain.isEmpty()) {
+ ObjectImp *o = chain.top();
+ Value result = o->get(exec, ident);
+ if (result.type() != UndefinedType)
+ return result;
+ chain.pop();
+ }
+
+ return Reference(Null(), ident).getValue(exec);
}
Reference ResolveNode::evaluateReference(ExecState *exec)
diff --git a/JavaScriptCore/kjs/object.cpp b/JavaScriptCore/kjs/object.cpp
index 5bb8ce5..123e6bf 100644
--- a/JavaScriptCore/kjs/object.cpp
+++ b/JavaScriptCore/kjs/object.cpp
@@ -139,18 +139,17 @@ UString ObjectImp::className() const
Value ObjectImp::get(ExecState *exec, const Identifier &propertyName) const
{
ValueImp *imp = getDirect(propertyName);
- if ( imp )
+ if (imp)
return Value(imp);
- Object proto = Object::dynamicCast(prototype());
- if (proto.isNull())
- return Undefined();
-
// non-standard netscape extension
if (propertyName == specialPrototypePropertyName)
- return proto;
+ return Value(_proto);
+
+ if (_proto->dispatchType() != ObjectType)
+ return Undefined();
- return proto.get(exec,propertyName);
+ return static_cast<ObjectImp *>(_proto)->get(exec, propertyName);
}
Value ObjectImp::get(ExecState *exec, unsigned propertyName) const
@@ -223,9 +222,11 @@ bool ObjectImp::hasProperty(ExecState *exec, const Identifier &propertyName) con
if (propertyName == specialPrototypePropertyName)
return true;
+ if (_proto->dispatchType() != ObjectType)
+ return false;
+
// Look in the prototype
- Object proto = Object::dynamicCast(prototype());
- return !proto.isNull() && proto.hasProperty(exec,propertyName);
+ return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName);
}
bool ObjectImp::hasProperty(ExecState *exec, unsigned propertyName) const
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list