Revision: 22087
Author:   [email protected]
Date:     Mon Jun 30 11:33:07 2014 UTC
Log:      Version 3.28.7 (based on bleeding_edge revision r22083)

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

Added:
 /trunk/test/mjsunit/runtime-gen/internalizestring.js
Modified:
 /trunk/ChangeLog
 /trunk/src/array.js
 /trunk/src/ast.cc
 /trunk/src/ast.h
 /trunk/src/compiler.cc
 /trunk/src/heap.cc
 /trunk/src/hydrogen.cc
 /trunk/src/objects-inl.h
 /trunk/src/objects.h
 /trunk/src/runtime.cc
 /trunk/src/runtime.h
 /trunk/src/version.cc
 /trunk/tools/generate-runtime-tests.py
 /trunk/tools/whitespace.txt

=======================================
--- /dev/null
+++ /trunk/test/mjsunit/runtime-gen/internalizestring.js Mon Jun 30 11:33:07 2014 UTC
@@ -0,0 +1,5 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
+// Flags: --allow-natives-syntax --harmony
+var _string = "foo";
+%InternalizeString(_string);
=======================================
--- /trunk/ChangeLog    Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/ChangeLog    Mon Jun 30 11:33:07 2014 UTC
@@ -1,3 +1,8 @@
+2014-06-30: Version 3.28.7
+
+        Performance and stability improvements on all platforms.
+
+
 2014-06-30: Version 3.28.6

         Unbreak "os" stuff in shared d8 builds (issue 3407).
=======================================
--- /trunk/src/array.js Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/array.js Mon Jun 30 11:33:07 2014 UTC
@@ -443,9 +443,7 @@
   var m = %_ArgumentsLength();

   for (var i = 0; i < m; i++) {
- // Use SetProperty rather than a direct keyed store to ensure that the store - // site doesn't become poisened with an elements transition KeyedStoreIC.
-    %SetProperty(array, i+n, %_Arguments(i), kStrictMode);
+    array[i+n] = %_Arguments(i);
   }

   var new_length = n + m;
=======================================
--- /trunk/src/ast.cc   Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/ast.cc   Mon Jun 30 11:33:07 2014 UTC
@@ -1028,7 +1028,6 @@
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
     increase_node_count(); \
     set_dont_optimize_reason(k##NodeType); \
-    add_flag(kDontInline); \
     add_flag(kDontSelfOptimize); \
   }
 #define DONT_SELFOPTIMIZE_NODE(NodeType) \
@@ -1046,7 +1045,6 @@
   void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
     increase_node_count(); \
     set_dont_optimize_reason(k##NodeType); \
-    add_flag(kDontInline); \
     add_flag(kDontSelfOptimize); \
     add_flag(kDontCache); \
   }
@@ -1079,7 +1077,8 @@
 REGULAR_NODE_WITH_FEEDBACK_SLOTS(Call)
 REGULAR_NODE_WITH_FEEDBACK_SLOTS(CallNew)
 // In theory, for VariableProxy we'd have to add:
-// if (node->var()->IsLookupSlot()) add_flag(kDontInline);
+// if (node->var()->IsLookupSlot())
+// set_dont_optimize_reason(kReferenceToAVariableWhichRequiresDynamicLookup); // But node->var() is usually not bound yet at VariableProxy creation time, and // LOOKUP variables only result from constructs that cannot be inlined anyway.
 REGULAR_NODE(VariableProxy)
@@ -1111,9 +1110,8 @@
 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
   increase_node_count();
   if (node->is_jsruntime()) {
- // Don't try to inline JS runtime calls because we don't (currently) even
-    // optimize them.
-    add_flag(kDontInline);
+    // Don't try to optimize JS runtime calls because we bailout on them.
+    set_dont_optimize_reason(kCallToAJavaScriptRuntimeFunction);
   }
 }

=======================================
--- /trunk/src/ast.h    Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/ast.h    Mon Jun 30 11:33:07 2014 UTC
@@ -149,7 +149,6 @@


 enum AstPropertiesFlag {
-  kDontInline,
   kDontSelfOptimize,
   kDontSoftInline,
   kDontCache
=======================================
--- /trunk/src/compiler.cc      Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/compiler.cc      Mon Jun 30 11:33:07 2014 UTC
@@ -580,8 +580,7 @@

   // Check the function has compiled code.
   ASSERT(shared->is_compiled());
-  shared->set_dont_optimize_reason(lit->dont_optimize_reason());
-  shared->set_dont_inline(lit->flags()->Contains(kDontInline));
+  shared->set_bailout_reason(lit->dont_optimize_reason());
   shared->set_ast_node_count(lit->ast_node_count());
   shared->set_strict_mode(lit->strict_mode());
 }
@@ -613,8 +612,7 @@
function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
   function_info->set_ast_node_count(lit->ast_node_count());
   function_info->set_is_function(lit->is_function());
-  function_info->set_dont_optimize_reason(lit->dont_optimize_reason());
-  function_info->set_dont_inline(lit->flags()->Contains(kDontInline));
+  function_info->set_bailout_reason(lit->dont_optimize_reason());
   function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
   function_info->set_is_generator(lit->is_generator());
 }
=======================================
--- /trunk/src/heap.cc  Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/heap.cc  Mon Jun 30 11:33:07 2014 UTC
@@ -1991,6 +1991,11 @@
       if (alignment != kObjectAlignment) {
         target = EnsureDoubleAligned(heap, target, allocation_size);
       }
+
+      // Order is important here: Set the promotion limit before migrating
+      // the object. Otherwise we may end up overwriting promotion queue
+      // entries when we migrate the object.
+      heap->promotion_queue()->SetNewLimit(heap->new_space()->top());

       // Order is important: slot might be inside of the target if target
       // was allocated over a dead object and slot comes from the store
@@ -1998,7 +2003,6 @@
       *slot = target;
       MigrateObject(heap, object, target, object_size);

-      heap->promotion_queue()->SetNewLimit(heap->new_space()->top());
       heap->IncrementSemiSpaceCopiedObjectSize(object_size);
       return true;
     }
=======================================
--- /trunk/src/hydrogen.cc      Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/hydrogen.cc      Mon Jun 30 11:33:07 2014 UTC
@@ -1513,13 +1513,23 @@
               Token::BIT_AND,
               instance_type,
               Add<HConstant>(static_cast<int>(kIsNotInternalizedMask)));
-          DeoptimizeIf<HCompareNumericAndBranch>(
-              not_internalized_bit,
-              graph()->GetConstant0(),
-              Token::NE,
-              "BuildKeyedIndexCheck: string isn't internalized");
-          // Key guaranteed to be a unqiue string
+
+          IfBuilder internalized(this);
+          internalized.If<HCompareNumericAndBranch>(not_internalized_bit,
+ graph()->GetConstant0(),
+                                                    Token::EQ);
+          internalized.Then();
           Push(key);
+
+          internalized.Else();
+          Add<HPushArguments>(key);
+          HValue* intern_key = Add<HCallRuntime>(
+              isolate()->factory()->empty_string(),
+              Runtime::FunctionForId(Runtime::kInternalizeString), 1);
+          Push(intern_key);
+
+          internalized.End();
+          // Key guaranteed to be a unique string
         }
         string_index_if.JoinContinuation(join_continuation);
       }
@@ -7566,7 +7576,7 @@
     TraceInline(target, caller, "target not inlineable");
     return kNotInlinable;
   }
-  if (target_shared->dont_inline()) {
+  if (target_shared->DisableOptimizationReason() != kNoReason) {
TraceInline(target, caller, "target contains unsupported syntax [early]");
     return kNotInlinable;
   }
@@ -7653,8 +7663,7 @@
     TraceInline(target, caller, "target AST is too large [late]");
     return false;
   }
-  AstProperties::Flags* flags(function->flags());
-  if (flags->Contains(kDontInline) || function->dont_optimize()) {
+  if (function->dont_optimize()) {
TraceInline(target, caller, "target contains unsupported syntax [late]");
     return false;
   }
=======================================
--- /trunk/src/objects-inl.h    Thu Jun 26 08:57:53 2014 UTC
+++ /trunk/src/objects-inl.h    Mon Jun 30 11:33:07 2014 UTC
@@ -5447,7 +5447,6 @@
 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) -BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline)
 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache)
 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
=======================================
--- /trunk/src/objects.h        Thu Jun 26 08:57:53 2014 UTC
+++ /trunk/src/objects.h        Mon Jun 30 11:33:07 2014 UTC
@@ -7223,9 +7223,6 @@
   // Is this a function or top-level/eval code.
   DECL_BOOLEAN_ACCESSORS(is_function)

-  // Indicates that the function cannot be inlined.
-  DECL_BOOLEAN_ACCESSORS(dont_inline)
-
   // Indicates that code for this function cannot be cached.
   DECL_BOOLEAN_ACCESSORS(dont_cache)

@@ -7286,11 +7283,6 @@
DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(),
                                                reason));
   }
-
-  void set_dont_optimize_reason(BailoutReason reason) {
-    set_bailout_reason(reason);
-    set_dont_inline(reason != kNoReason);
-  }

   // Check whether or not this function is inlineable.
   bool IsInlineable();
@@ -7434,7 +7426,6 @@
     kIsAnonymous,
     kNameShouldPrintAsAnonymous,
     kIsFunction,
-    kDontInline,
     kDontCache,
     kDontFlush,
     kIsGenerator,
=======================================
--- /trunk/src/runtime.cc       Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/runtime.cc       Mon Jun 30 11:33:07 2014 UTC
@@ -4453,6 +4453,14 @@

   return *isolate->factory()->NewSubString(string, start, end);
 }
+
+
+RUNTIME_FUNCTION(Runtime_InternalizeString) {
+  HandleScope handles(isolate);
+  RUNTIME_ASSERT(args.length() == 1);
+  CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
+  return *isolate->factory()->InternalizeString(string);
+}


 RUNTIME_FUNCTION(Runtime_StringMatch) {
=======================================
--- /trunk/src/runtime.h        Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/runtime.h        Mon Jun 30 11:33:07 2014 UTC
@@ -403,6 +403,7 @@
   F(RegExpExecRT, 4, 1) \
   F(StringAdd, 2, 1)  \
   F(SubString, 3, 1) \
+  F(InternalizeString, 1, 1) \
   F(StringCompare, 2, 1) \
   F(StringCharCodeAtRT, 2, 1) \
   F(GetFromCache, 2, 1) \
=======================================
--- /trunk/src/version.cc       Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/src/version.cc       Mon Jun 30 11:33:07 2014 UTC
@@ -34,7 +34,7 @@
 // system so their names cannot be changed without changing the scripts.
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     28
-#define BUILD_NUMBER      6
+#define BUILD_NUMBER      7
 #define PATCH_LEVEL       0
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
=======================================
--- /trunk/tools/generate-runtime-tests.py      Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/tools/generate-runtime-tests.py      Mon Jun 30 11:33:07 2014 UTC
@@ -47,8 +47,8 @@
# that the parser doesn't bit-rot. Change the values as needed when you add, # remove or change runtime functions, but make sure we don't lose our ability
 # to parse them!
-EXPECTED_FUNCTION_COUNT = 414
-EXPECTED_FUZZABLE_COUNT = 329
+EXPECTED_FUNCTION_COUNT = 415
+EXPECTED_FUZZABLE_COUNT = 330
 EXPECTED_CCTEST_COUNT = 6
 EXPECTED_UNKNOWN_COUNT = 4
 EXPECTED_BUILTINS_COUNT = 806
=======================================
--- /trunk/tools/whitespace.txt Mon Jun 30 00:04:54 2014 UTC
+++ /trunk/tools/whitespace.txt Mon Jun 30 11:33:07 2014 UTC
@@ -3,4 +3,5 @@
 Try to write something funny. And please don't add trailing whitespace.

 A Smi walks into a bar and says:
-"I'm so deoptimized today!"...
+"I'm so deoptimized today!"
+The doubles heard this...

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