Revision: 21713
Author:   [email protected]
Date:     Fri Jun  6 13:09:06 2014 UTC
Log:      Version 3.27.22 (based on bleeding_edge revision r21712)

Performance and stability improvements on all platforms.
http://code.google.com/p/v8/source/detail?r=21713

Added:
 /trunk/test/mjsunit/regress/regress-380092.js
Modified:
 /trunk/BUILD.gn
 /trunk/ChangeLog
 /trunk/src/api.cc
 /trunk/src/arguments.h
 /trunk/src/bootstrapper.cc
 /trunk/src/hydrogen-dehoist.cc
 /trunk/src/hydrogen-instructions.h
 /trunk/src/version.cc
 /trunk/tools/plot-timer-events
 /trunk/tools/profviz/composer.js

=======================================
--- /dev/null
+++ /trunk/test/mjsunit/regress/regress-380092.js Fri Jun 6 13:09:06 2014 UTC
@@ -0,0 +1,14 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function many_hoist(o, index) {
+  return o[index + 33554427];
+}
+
+var obj = {};
+many_hoist(obj, 0);
+%OptimizeFunctionOnNextCall(many_hoist);
+many_hoist(obj, 5);
=======================================
--- /trunk/BUILD.gn     Fri Jun  6 00:04:56 2014 UTC
+++ /trunk/BUILD.gn     Fri Jun  6 13:09:06 2014 UTC
@@ -14,7 +14,7 @@
 v8_interpreted_regexp = false
 v8_object_print = false
 v8_postmortem_support = false
-v8_use_default_platform = true
+v8_use_default_platform = false
 v8_use_snapshot = true
 v8_use_external_startup_data = false
 v8_enable_extra_checks = is_debug
@@ -345,6 +345,7 @@
     "$target_gen_dir/experimental-libraries.cc",
     "$target_gen_dir/trig-table.cc",
     "$target_gen_dir/snapshot.cc",
+    "src/snapshot-common.cc",
   ]

   configs -= [ "//build/config/compiler:chromium_code" ]
=======================================
--- /trunk/ChangeLog    Fri Jun  6 00:04:56 2014 UTC
+++ /trunk/ChangeLog    Fri Jun  6 13:09:06 2014 UTC
@@ -1,3 +1,8 @@
+2014-06-06: Version 3.27.22
+
+        Performance and stability improvements on all platforms.
+
+
 2014-06-06: Version 3.27.21

         Turn on harmony_collections for es_staging (issue 1622).
=======================================
--- /trunk/src/api.cc   Fri Jun  6 00:04:56 2014 UTC
+++ /trunk/src/api.cc   Fri Jun  6 13:09:06 2014 UTC
@@ -6649,6 +6649,8 @@


 void Isolate::SetEventLogger(LogEventCallback that) {
+  // Do not overwrite the event logger if we want to log explicitly.
+  if (i::FLAG_log_timer_events) return;
   i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
   isolate->set_event_logger(that);
 }
=======================================
--- /trunk/src/arguments.h      Wed Jun  4 00:06:13 2014 UTC
+++ /trunk/src/arguments.h      Fri Jun  6 13:09:06 2014 UTC
@@ -21,6 +21,9 @@
 //   Object* Runtime_function(Arguments args) {
 //     ... use args[i] here ...
 //   }
+//
+// Note that length_ (whose value is in the integer range) is defined
+// as intptr_t to provide endian-neutrality on 64-bit archs.

 class Arguments BASE_EMBEDDED {
  public:
@@ -50,12 +53,12 @@
   }

   // Get the total number of arguments including the receiver.
-  int length() const { return length_; }
+  int length() const { return static_cast<int>(length_); }

   Object** arguments() { return arguments_; }

  private:
-  int length_;
+  intptr_t length_;
   Object** arguments_;
 };

=======================================
--- /trunk/src/bootstrapper.cc  Wed Jun  4 00:06:13 2014 UTC
+++ /trunk/src/bootstrapper.cc  Fri Jun  6 13:09:06 2014 UTC
@@ -1071,7 +1071,7 @@
     native_context()->set_json_object(*json_object);
   }

-  { // -- A r r a y B u f f e r
+  {  // -- A r r a y B u f f e r
     Handle<JSFunction> array_buffer_fun =
         InstallFunction(
             global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE,
@@ -1081,7 +1081,7 @@
     native_context()->set_array_buffer_fun(*array_buffer_fun);
   }

-  { // -- T y p e d A r r a y s
+  {  // -- T y p e d A r r a y s
#define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ { \ Handle<JSFunction> fun; \
=======================================
--- /trunk/src/hydrogen-dehoist.cc      Wed Jun  4 00:06:13 2014 UTC
+++ /trunk/src/hydrogen-dehoist.cc      Fri Jun  6 13:09:06 2014 UTC
@@ -28,15 +28,25 @@
   if (!constant->HasInteger32Value()) return;
   int32_t sign = binary_operation->IsSub() ? -1 : 1;
   int32_t value = constant->Integer32Value() * sign;
-  // We limit offset values to 30 bits because we want to avoid the risk of
-  // overflows when the offset is added to the object header size.
- if (value >= 1 << array_operation->MaxBaseOffsetBits() || value < 0) return;
+  if (value < 0) return;
+
+  // Check for overflow.
+  // TODO(mvstanton): replace with safe_math.h operations when that code is
+  // integrated.
+  int32_t shift_amount =
+      1 << ElementsKindToShiftSize(array_operation->elements_kind());
+  int32_t multiplication_result = value * shift_amount;
+  if ((multiplication_result >> shift_amount) != value) return;
+  value = multiplication_result;
+
+  // Ensure that the array operation can add value to existing base offset
+  // without overflowing.
+  if (!array_operation->CanIncreaseBaseOffset(value)) return;
   array_operation->SetKey(subexpression);
   if (binary_operation->HasNoUses()) {
     binary_operation->DeleteAndReplaceWith(NULL);
   }
-  value <<= ElementsKindToShiftSize(array_operation->elements_kind());
-  array_operation->IncreaseBaseOffset(static_cast<uint32_t>(value));
+  array_operation->IncreaseBaseOffset(value);
   array_operation->SetDehoisted(true);
 }

=======================================
--- /trunk/src/hydrogen-instructions.h  Fri Jun  6 00:04:56 2014 UTC
+++ /trunk/src/hydrogen-instructions.h  Fri Jun  6 13:09:06 2014 UTC
@@ -6404,8 +6404,9 @@
   virtual HValue* GetKey() = 0;
   virtual void SetKey(HValue* key) = 0;
   virtual ElementsKind elements_kind() const = 0;
-  virtual void IncreaseBaseOffset(uint32_t base_offset) = 0;
-  virtual int MaxBaseOffsetBits() = 0;
+  // increase_by_value should be non-negative
+  virtual bool CanIncreaseBaseOffset(int32_t increase_by_value) = 0;
+  virtual void IncreaseBaseOffset(int32_t increase_by_value) = 0;
   virtual bool IsDehoisted() = 0;
   virtual void SetDehoisted(bool is_dehoisted) = 0;
   virtual ~ArrayInstructionInterface() { }
@@ -6451,13 +6452,20 @@
     return OperandAt(2);
   }
   bool HasDependency() const { return OperandAt(0) != OperandAt(2); }
-  uint32_t base_offset() { return BaseOffsetField::decode(bit_field_); }
-  void IncreaseBaseOffset(uint32_t base_offset) {
-    base_offset += BaseOffsetField::decode(bit_field_);
-    bit_field_ = BaseOffsetField::update(bit_field_, base_offset);
+  uint32_t base_offset() {
+    int32_t base_offset_value = BaseOffsetField::decode(bit_field_);
+    ASSERT(base_offset_value >= 0);
+    return static_cast<uint32_t>(base_offset_value);
   }
-  virtual int MaxBaseOffsetBits() {
-    return kBitsForBaseOffset;
+  bool CanIncreaseBaseOffset(int32_t increase_by_value) {
+    ASSERT(increase_by_value >= 0);
+ int32_t new_value = BaseOffsetField::decode(bit_field_) + increase_by_value;
+    return (new_value >= 0 && BaseOffsetField::is_valid(new_value));
+  }
+  void IncreaseBaseOffset(int32_t increase_by_value) {
+    ASSERT(increase_by_value >= 0);
+    increase_by_value += BaseOffsetField::decode(bit_field_);
+    bit_field_ = BaseOffsetField::update(bit_field_, increase_by_value);
   }
   HValue* GetKey() { return key(); }
   void SetKey(HValue* key) { SetOperandAt(1, key); }
@@ -6607,7 +6615,7 @@
     public BitField<LoadKeyedHoleMode, kStartHoleMode, kBitsForHoleMode>
     {};  // NOLINT
   class BaseOffsetField:
-    public BitField<uint32_t, kStartBaseOffset, kBitsForBaseOffset>
+    public BitField<int32_t, kStartBaseOffset, kBitsForBaseOffset>
     {};  // NOLINT
   class IsDehoistedField:
     public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted>
@@ -6921,12 +6929,18 @@
   }
   StoreFieldOrKeyedMode store_mode() const { return store_mode_; }
   ElementsKind elements_kind() const { return elements_kind_; }
-  uint32_t base_offset() { return base_offset_; }
-  void IncreaseBaseOffset(uint32_t base_offset) {
-    base_offset_ += base_offset;
+  uint32_t base_offset() {
+    ASSERT(base_offset_ >= 0);
+    return static_cast<uint32_t>(base_offset_);
   }
-  virtual int MaxBaseOffsetBits() {
-    return 31 - ElementsKindToShiftSize(elements_kind_);
+  bool CanIncreaseBaseOffset(int32_t increase_by_value) {
+    ASSERT(increase_by_value >= 0);
+    // Guard against overflow
+    return (increase_by_value + base_offset_) >= 0;
+  }
+  void IncreaseBaseOffset(int32_t increase_by_value) {
+    ASSERT(increase_by_value >= 0);
+    base_offset_ += increase_by_value;
   }
   HValue* GetKey() { return key(); }
   void SetKey(HValue* key) { SetOperandAt(1, key); }
@@ -7017,7 +7031,7 @@
   }

   ElementsKind elements_kind_;
-  uint32_t base_offset_;
+  int32_t base_offset_;
   bool is_dehoisted_ : 1;
   bool is_uninitialized_ : 1;
   StoreFieldOrKeyedMode store_mode_: 1;
=======================================
--- /trunk/src/version.cc       Fri Jun  6 00:04:56 2014 UTC
+++ /trunk/src/version.cc       Fri Jun  6 13:09:06 2014 UTC
@@ -34,7 +34,7 @@
 // system so their names cannot be changed without changing the scripts.
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     27
-#define BUILD_NUMBER      21
+#define BUILD_NUMBER      22
 #define PATCH_LEVEL       0
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
=======================================
--- /trunk/tools/plot-timer-events      Mon May 19 00:04:51 2014 UTC
+++ /trunk/tools/plot-timer-events      Fri Jun  6 13:09:06 2014 UTC
@@ -15,7 +15,7 @@
   if test -x "$d8_public"; then D8_PATH=$(dirname "$d8_public"); fi
 fi

-if test -n "$D8_PATH"; then
+if test ! -n "$D8_PATH"; then
   D8_PATH=$tools_path/..
 fi

=======================================
--- /trunk/tools/profviz/composer.js    Mon Sep 30 13:42:25 2013 UTC
+++ /trunk/tools/profviz/composer.js    Fri Jun  6 13:09:06 2014 UTC
@@ -502,7 +502,8 @@
     execution_pauses.sort(
         function(a, b) { return b.duration() - a.duration(); });

-    var max_pause_time = execution_pauses[0].duration();
+    var max_pause_time = execution_pauses.length > 0
+        ? execution_pauses[0].duration() : 0;
     padding = kPauseLabelPadding * (range_end - range_start) / kResX;
     var y_scale = kY1Offset / max_pause_time / 2;
for (var i = 0; i < execution_pauses.length && i < kNumPauseLabels; i++) {

--
--
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