Revision: 7878
Author: [email protected]
Date: Thu May 12 09:19:03 2011
Log: Micro-optimize passing of args to HasLocalProperty.
Review URL: http://codereview.chromium.org/7018001
http://code.google.com/p/v8/source/detail?r=7878
Modified:
/branches/bleeding_edge/src/macros.py
/branches/bleeding_edge/src/v8natives.js
=======================================
--- /branches/bleeding_edge/src/macros.py Wed Jan 5 05:52:00 2011
+++ /branches/bleeding_edge/src/macros.py Thu May 12 09:19:03 2011
@@ -127,7 +127,7 @@
macro TO_UINT32(arg) = (arg >>> 0);
macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg :
NonStringToString(arg));
macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg :
NonNumberToNumber(arg));
-
+macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg :
ToObject(arg));
# Macros implemented in Python.
python macro CHAR_CODE(str) = ord(str[1]);
=======================================
--- /branches/bleeding_edge/src/v8natives.js Wed May 4 22:51:43 2011
+++ /branches/bleeding_edge/src/v8natives.js Thu May 12 09:19:03 2011
@@ -234,7 +234,7 @@
// ECMA-262 - 15.2.4.5
function ObjectHasOwnProperty(V) {
- return %HasLocalProperty(ToObject(this), ToString(V));
+ return %HasLocalProperty(TO_OBJECT_INLINE(this), TO_STRING_INLINE(V));
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev