Revision: 11664
Author: [email protected]
Date: Fri May 25 05:32:02 2012
Log: Enable map transitions for accessor properties.
To avoid a performance regression for context creation with snapshots, we
avoid
creating a useless long map chain for regular expressions, keeping the
snapshot
size almost the same as before.
Review URL: https://chromiumcodereview.appspot.com/10440045
http://code.google.com/p/v8/source/detail?r=11664
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/regexp.js
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Thu May 24 03:40:24 2012
+++ /branches/bleeding_edge/src/flag-definitions.h Fri May 25 05:32:02 2012
@@ -397,8 +397,6 @@
// objects.cc
DEFINE_bool(use_verbose_printer, true, "allows verbose printing")
-DEFINE_bool(fast_accessor_properties, false,
- "use map transitions for JavaScript accessors")
// parser.cc
DEFINE_bool(allow_natives_syntax, false, "allow natives syntax")
=======================================
--- /branches/bleeding_edge/src/objects.cc Thu May 24 03:40:24 2012
+++ /branches/bleeding_edge/src/objects.cc Fri May 25 05:32:02 2012
@@ -4456,8 +4456,7 @@
// to do a lookup, which seems to be a bit of overkill.
Heap* heap = GetHeap();
bool only_attribute_changes = getter->IsNull() && setter->IsNull();
- if (FLAG_fast_accessor_properties &&
- HasFastProperties() && !only_attribute_changes) {
+ if (HasFastProperties() && !only_attribute_changes) {
MaybeObject* getterOk = heap->undefined_value();
if (!getter->IsNull()) {
getterOk = DefineFastAccessor(name, ACCESSOR_GETTER, getter,
attributes);
=======================================
--- /branches/bleeding_edge/src/regexp.js Wed May 23 13:48:08 2012
+++ /branches/bleeding_edge/src/regexp.js Fri May 25 05:32:02 2012
@@ -427,6 +427,7 @@
LAST_INPUT(lastMatchInfo) = ToString(string);
};
+ %OptimizeObjectForAddingMultipleProperties($RegExp, 22);
%DefineOrRedefineAccessorProperty($RegExp, 'input', RegExpGetInput,
RegExpSetInput, DONT_DELETE);
%DefineOrRedefineAccessorProperty($RegExp, '$_', RegExpGetInput,
@@ -481,6 +482,7 @@
RegExpMakeCaptureGetter(i),
NoOpSetter,
DONT_DELETE);
}
+ %ToFastProperties($RegExp);
}
SetUpRegExp();
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev