Reviewers: Jakob,

Description:
Speed up FastElementsAccessor::ValidContents by removing redundant handle scope.

[email protected]
BUG=

Please review this at https://codereview.chromium.org/1002203003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+2, -3 lines):
  M src/elements.cc
  M src/flag-definitions.h


Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index cd7ba984af092c426fe539a4260681912208e251..014a5359260b99531d51adfc09770f7a76576e1a 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -992,9 +992,8 @@ class FastElementsAccessor
             ((map == isolate->heap()->fixed_array_map() && length == 0) ||
              map == isolate->heap()->fixed_double_array_map())));
     DisallowHeapAllocation no_gc;
+ Handle<BackingStore> backing_store = Handle<BackingStore>::cast(elements);
     for (int i = 0; i < length; i++) {
-      HandleScope scope(isolate);
- Handle<BackingStore> backing_store = Handle<BackingStore>::cast(elements);
       DCHECK((!IsFastSmiElementsKind(KindTraits::Kind) ||
               BackingStore::get(backing_store, i)->IsSmi()) ||
              (IsFastHoleyElementsKind(KindTraits::Kind) ==
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index 0ced9334c373262e473f991d8d8370d3b9a3d899..f5b17094bf91c0b87d0aa3b81585b6c2db05ff99 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -419,7 +419,7 @@ DEFINE_BOOL(turbo_verify_allocation, DEBUG_BOOL,
             "verify register allocation in TurboFan")
DEFINE_BOOL(turbo_move_optimization, true, "optimize gap moves in TurboFan")
 DEFINE_BOOL(turbo_jt, true, "enable jump threading in TurboFan")
-DEFINE_BOOL(turbo_osr, false, "enable OSR in TurboFan")
+DEFINE_BOOL(turbo_osr, true, "enable OSR in TurboFan")
DEFINE_BOOL(turbo_exceptions, false, "enable exception handling in TurboFan")
 DEFINE_BOOL(turbo_stress_loop_peeling, false,
             "stress loop peeling optimization")


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to