Revision: 9579
Author: [email protected]
Date: Tue Oct 11 04:35:04 2011
Log: Add --noclever-optimizations to disable some things that have
caused trouble in the past.
Review URL: http://codereview.chromium.org/8229005
http://code.google.com/p/v8/source/detail?r=9579
Modified:
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/builtins.cc
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/handles.cc
/branches/bleeding_edge/src/mark-compact.cc
/branches/bleeding_edge/src/objects.cc
=======================================
--- /branches/bleeding_edge/src/api.cc Thu Oct 6 02:31:38 2011
+++ /branches/bleeding_edge/src/api.cc Tue Oct 11 04:35:04 2011
@@ -4500,6 +4500,7 @@
bool v8::String::CanMakeExternal() {
+ if (!internal::FLAG_clever_optimizations) return false;
i::Handle<i::String> obj = Utils::OpenHandle(this);
i::Isolate* isolate = obj->GetIsolate();
if (IsDeadCheck(isolate, "v8::String::CanMakeExternal()")) return false;
=======================================
--- /branches/bleeding_edge/src/builtins.cc Mon Oct 10 01:31:06 2011
+++ /branches/bleeding_edge/src/builtins.cc Tue Oct 11 04:35:04 2011
@@ -435,6 +435,7 @@
static inline bool IsJSArrayFastElementMovingAllowed(Heap* heap,
JSArray* receiver) {
+ if (!FLAG_clever_optimizations) return false;
Context* global_context = heap->isolate()->context()->global_context();
JSObject* array_proto =
JSObject::cast(global_context->array_function()->prototype());
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Tue Oct 11 02:28:06 2011
+++ /branches/bleeding_edge/src/flag-definitions.h Tue Oct 11 04:35:04 2011
@@ -107,6 +107,10 @@
DEFINE_bool(smi_only_arrays, false, "tracks arrays with only smi values")
DEFINE_bool(string_slices, false, "use string slices")
+DEFINE_bool(clever_optimizations,
+ true,
+ "Optimize object size, Array shift, DOM strings and string +")
+
// Flags for Crankshaft.
#ifdef V8_TARGET_ARCH_MIPS
DEFINE_bool(crankshaft, false, "use crankshaft")
=======================================
--- /branches/bleeding_edge/src/handles.cc Wed Oct 5 04:09:34 2011
+++ /branches/bleeding_edge/src/handles.cc Tue Oct 11 04:35:04 2011
@@ -190,7 +190,11 @@
// Inobject slack tracking will reclaim redundant inobject space later,
// so we can afford to adjust the estimate generously.
- return estimate + 8;
+ if (FLAG_clever_optimizations) {
+ return estimate + 8;
+ } else {
+ return estimate + 3;
+ }
}
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Wed Oct 5 02:42:20 2011
+++ /branches/bleeding_edge/src/mark-compact.cc Tue Oct 11 04:35:04 2011
@@ -716,6 +716,7 @@
// except the maps for the object and its possible substrings might be
// marked.
HeapObject* object = HeapObject::cast(*p);
+ if (!FLAG_clever_optimizations) return object;
Map* map = object->map();
InstanceType type = map->instance_type();
if ((type & kShortcutTypeMask) != kShortcutTypeTag) return object;
=======================================
--- /branches/bleeding_edge/src/objects.cc Tue Oct 11 02:33:00 2011
+++ /branches/bleeding_edge/src/objects.cc Tue Oct 11 04:35:04 2011
@@ -7242,6 +7242,8 @@
void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) {
ASSERT(!IsInobjectSlackTrackingInProgress());
+ if (!FLAG_clever_optimizations) return;
+
// Only initiate the tracking the first time.
if (live_objects_may_exist()) return;
set_live_objects_may_exist(true);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev