Revision: 24016
Author:   [email protected]
Date:     Thu Sep 18 00:05:06 2014 UTC
Log:      Version 3.29.74 (based on bleeding_edge revision r24014)

Support stepping into generator function (issue 3572).

Class syntax parsing (issue 3330).

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

Added:
 /trunk/test/mjsunit/es6/debug-stepin-generators.js
Modified:
 /trunk/ChangeLog
 /trunk/src/arm/builtins-arm.cc
 /trunk/src/arm/lithium-codegen-arm.cc
 /trunk/src/arm64/builtins-arm64.cc
 /trunk/src/arm64/lithium-codegen-arm64.cc
 /trunk/src/array.js
 /trunk/src/ast-value-factory.h
 /trunk/src/ast.cc
 /trunk/src/ast.h
 /trunk/src/builtins.h
 /trunk/src/code-stubs.cc
 /trunk/src/code-stubs.h
 /trunk/src/compiler/ast-graph-builder.cc
 /trunk/src/compiler/js-inlining.cc
 /trunk/src/compiler/js-typed-lowering.cc
 /trunk/src/compiler/opcodes.h
 /trunk/src/compiler/simplified-lowering.cc
 /trunk/src/compiler/simplified-operator.cc
 /trunk/src/compiler/simplified-operator.h
 /trunk/src/compiler/typer.cc
 /trunk/src/compiler.cc
 /trunk/src/compiler.h
 /trunk/src/d8.cc
 /trunk/src/debug.cc
 /trunk/src/flag-definitions.h
 /trunk/src/full-codegen.cc
 /trunk/src/generator.js
 /trunk/src/heap/gc-tracer.cc
 /trunk/src/heap/gc-tracer.h
 /trunk/src/heap/mark-compact.cc
 /trunk/src/hydrogen-instructions.h
 /trunk/src/hydrogen.cc
 /trunk/src/ia32/builtins-ia32.cc
 /trunk/src/ia32/lithium-codegen-ia32.cc
 /trunk/src/ia32/macro-assembler-ia32.cc
 /trunk/src/ia32/macro-assembler-ia32.h
 /trunk/src/ic/x87/handler-compiler-x87.cc
 /trunk/src/ic/x87/ic-compiler-x87.cc
 /trunk/src/log.cc
 /trunk/src/macros.py
 /trunk/src/messages.js
 /trunk/src/mips/builtins-mips.cc
 /trunk/src/mips/lithium-codegen-mips.cc
 /trunk/src/mips64/builtins-mips64.cc
 /trunk/src/mips64/lithium-codegen-mips64.cc
 /trunk/src/mips64/simulator-mips64.cc
 /trunk/src/mips64/simulator-mips64.h
 /trunk/src/objects-inl.h
 /trunk/src/objects.cc
 /trunk/src/objects.h
 /trunk/src/parser.cc
 /trunk/src/parser.h
 /trunk/src/preparser.cc
 /trunk/src/preparser.h
 /trunk/src/prettyprinter.cc
 /trunk/src/prettyprinter.h
 /trunk/src/runtime.cc
 /trunk/src/runtime.h
 /trunk/src/scanner.cc
 /trunk/src/scanner.h
 /trunk/src/serialize.cc
 /trunk/src/serialize.h
 /trunk/src/token.h
 /trunk/src/typing.cc
 /trunk/src/version.cc
 /trunk/src/x64/builtins-x64.cc
 /trunk/src/x64/lithium-codegen-x64.cc
 /trunk/src/x64/macro-assembler-x64.cc
 /trunk/src/x64/macro-assembler-x64.h
 /trunk/src/x87/builtins-x87.cc
 /trunk/src/x87/code-stubs-x87.cc
 /trunk/src/x87/full-codegen-x87.cc
 /trunk/src/x87/lithium-codegen-x87.cc
 /trunk/src/x87/macro-assembler-x87.cc
 /trunk/src/x87/macro-assembler-x87.h
 /trunk/test/cctest/cctest.cc
 /trunk/test/cctest/cctest.status
 /trunk/test/cctest/compiler/function-tester.h
 /trunk/test/cctest/compiler/test-changes-lowering.cc
 /trunk/test/cctest/compiler/test-codegen-deopt.cc
 /trunk/test/cctest/compiler/test-js-typed-lowering.cc
 /trunk/test/cctest/compiler/test-pipeline.cc
 /trunk/test/cctest/compiler/test-simplified-lowering.cc
 /trunk/test/cctest/test-assembler-mips64.cc
 /trunk/test/cctest/test-heap-profiler.cc
 /trunk/test/cctest/test-parsing.cc
 /trunk/test/fuzz-natives/fuzz-natives.status
 /trunk/test/mjsunit/array-sort.js
 /trunk/test/mjsunit/compiler/osr-warm.js
 /trunk/test/mjsunit/mjsunit.status

=======================================
--- /dev/null
+++ /trunk/test/mjsunit/es6/debug-stepin-generators.js Thu Sep 18 00:05:06 2014 UTC
@@ -0,0 +1,45 @@
+// 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: --expose-debug-as debug
+
+Debug = debug.Debug
+var exception = null;
+var yields = 0;
+
+function listener(event, exec_state, event_data, data) {
+  if (event != Debug.DebugEvent.Break) return;
+  try {
+    var source = exec_state.frame(0).sourceLineText();
+    print(source);
+    if (/stop stepping/.test(source)) return;
+    if (/yield/.test(source)) yields++;
+    exec_state.prepareStep(Debug.StepAction.StepIn, 1);
+  } catch (e) {
+    print(e, e.stack);
+    exception = e;
+  }
+};
+
+Debug.setListener(listener);
+
+function* g() {
+  for (var i = 0; i < 3; ++i) {
+    yield i;
+  }
+}
+
+var i = g();
+debugger;
+for (var num of g()) {}
+i.next();
+
+print(); // stop stepping
+
+// Not stepped into.
+i.next();
+i.next();
+
+assertNull(exception);
+assertEquals(4, yields);
=======================================
--- /trunk/ChangeLog    Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/ChangeLog    Thu Sep 18 00:05:06 2014 UTC
@@ -1,3 +1,12 @@
+2014-09-18: Version 3.29.74
+
+        Support stepping into generator function (issue 3572).
+
+        Class syntax parsing (issue 3330).
+
+        Performance and stability improvements on all platforms.
+
+
 2014-09-17: Version 3.29.70

         Enable ES6 generators (issue 2355).
=======================================
--- /trunk/src/arm/builtins-arm.cc      Sun Aug 24 11:34:17 2014 UTC
+++ /trunk/src/arm/builtins-arm.cc      Thu Sep 18 00:05:06 2014 UTC
@@ -807,8 +807,8 @@
 }


-void Builtins::Generate_CompileUnoptimized(MacroAssembler* masm) {
-  CallRuntimePassFunction(masm, Runtime::kCompileUnoptimized);
+void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
+  CallRuntimePassFunction(masm, Runtime::kCompileLazy);
   GenerateTailCallToReturnedCode(masm);
 }

=======================================
--- /trunk/src/arm/lithium-codegen-arm.cc       Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/arm/lithium-codegen-arm.cc       Thu Sep 18 00:05:06 2014 UTC
@@ -4975,16 +4975,17 @@
     __ bind(&check_false);
     __ LoadRoot(ip, Heap::kFalseValueRootIndex);
     __ cmp(scratch2, Operand(ip));
+    __ RecordComment("Deferred TaggedToI: cannot truncate");
     DeoptimizeIf(ne, instr->environment());
     __ mov(input_reg, Operand::Zero());
-    __ b(&done);
   } else {
-    // Deoptimize if we don't have a heap number.
+    __ RecordComment("Deferred TaggedToI: not a heap number");
     DeoptimizeIf(ne, instr->environment());

     __ sub(ip, scratch2, Operand(kHeapObjectTag));
     __ vldr(double_scratch2, ip, HeapNumber::kValueOffset);
     __ TryDoubleToInt32Exact(input_reg, double_scratch2, double_scratch);
+    __ RecordComment("Deferred TaggedToI: lost precision or NaN");
     DeoptimizeIf(ne, instr->environment());

     if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
@@ -4992,6 +4993,7 @@
       __ b(ne, &done);
       __ VmovHigh(scratch1, double_scratch2);
       __ tst(scratch1, Operand(HeapNumber::kSignMask));
+      __ RecordComment("Deferred TaggedToI: minus zero");
       DeoptimizeIf(ne, instr->environment());
     }
   }
=======================================
--- /trunk/src/arm64/builtins-arm64.cc  Sun Aug 24 11:34:17 2014 UTC
+++ /trunk/src/arm64/builtins-arm64.cc  Thu Sep 18 00:05:06 2014 UTC
@@ -780,8 +780,8 @@
 }


-void Builtins::Generate_CompileUnoptimized(MacroAssembler* masm) {
-  CallRuntimePassFunction(masm, Runtime::kCompileUnoptimized);
+void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
+  CallRuntimePassFunction(masm, Runtime::kCompileLazy);
   GenerateTailCallToReturnedCode(masm);
 }

=======================================
--- /trunk/src/arm64/lithium-codegen-arm64.cc   Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/arm64/lithium-codegen-arm64.cc   Thu Sep 18 00:05:06 2014 UTC
@@ -5645,10 +5645,9 @@
                         instr->environment());
   } else {
     Register output = ToRegister32(instr->result());
-
     DoubleRegister dbl_scratch2 = ToDoubleRegister(temp2);

-    // Deoptimized if it's not a heap number.
+    __ RecordComment("Deferred TaggedToI: not a heap number");
     DeoptimizeIfNotRoot(scratch1, Heap::kHeapNumberMapRootIndex,
                         instr->environment());

@@ -5656,12 +5655,14 @@
     // function. If the result is out of range, branch to deoptimize.
     __ Ldr(dbl_scratch1, FieldMemOperand(input, HeapNumber::kValueOffset));
     __ TryRepresentDoubleAsInt32(output, dbl_scratch1, dbl_scratch2);
+    __ RecordComment("Deferred TaggedToI: lost precision or NaN");
     DeoptimizeIf(ne, instr->environment());

     if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
       __ Cmp(output, 0);
       __ B(ne, &done);
       __ Fmov(scratch1, dbl_scratch1);
+      __ RecordComment("Deferred TaggedToI: minus zero");
       DeoptimizeIfNegative(scratch1, instr->environment());
     }
   }
=======================================
--- /trunk/src/array.js Thu Sep 11 00:05:22 2014 UTC
+++ /trunk/src/array.js Thu Sep 18 00:05:06 2014 UTC
@@ -863,11 +863,12 @@
     var t_array = [];
     // Use both 'from' and 'to' to determine the pivot candidates.
     var increment = 200 + ((to - from) & 15);
-    for (var i = from + 1; i < to - 1; i += increment) {
-      t_array.push([i, a[i]]);
+    for (var i = from + 1, j = 0; i < to - 1; i += increment, j++) {
+      t_array[j] = [i, a[i]];
     }
-    t_array.sort(function(a, b) {
-        return %_CallFunction(receiver, a[1], b[1], comparefn) } );
+    %_CallFunction(t_array, function(a, b) {
+      return %_CallFunction(receiver, a[1], b[1], comparefn);
+    }, ArraySort);
     var third_index = t_array[t_array.length >> 1][0];
     return third_index;
   }
@@ -969,7 +970,7 @@
         // It's an interval.
         var proto_length = indices;
         for (var i = 0; i < proto_length; i++) {
-          if (!obj.hasOwnProperty(i) && proto.hasOwnProperty(i)) {
+          if (!HAS_OWN_PROPERTY(obj, i) && HAS_OWN_PROPERTY(proto, i)) {
             obj[i] = proto[i];
             if (i >= max) { max = i + 1; }
           }
@@ -977,8 +978,8 @@
       } else {
         for (var i = 0; i < indices.length; i++) {
           var index = indices[i];
-          if (!IS_UNDEFINED(index) &&
-              !obj.hasOwnProperty(index) && proto.hasOwnProperty(index)) {
+          if (!IS_UNDEFINED(index) && !HAS_OWN_PROPERTY(obj, index)
+              && HAS_OWN_PROPERTY(proto, index)) {
             obj[index] = proto[index];
             if (index >= max) { max = index + 1; }
           }
@@ -998,7 +999,7 @@
         // It's an interval.
         var proto_length = indices;
         for (var i = from; i < proto_length; i++) {
-          if (proto.hasOwnProperty(i)) {
+          if (HAS_OWN_PROPERTY(proto, i)) {
             obj[i] = UNDEFINED;
           }
         }
@@ -1006,7 +1007,7 @@
         for (var i = 0; i < indices.length; i++) {
           var index = indices[i];
           if (!IS_UNDEFINED(index) && from <= index &&
-              proto.hasOwnProperty(index)) {
+              HAS_OWN_PROPERTY(proto, index)) {
             obj[index] = UNDEFINED;
           }
         }
@@ -1029,14 +1030,14 @@
       }
// Maintain the invariant num_holes = the number of holes in the original
       // array with indices <= first_undefined or > last_defined.
-      if (!obj.hasOwnProperty(first_undefined)) {
+      if (!HAS_OWN_PROPERTY(obj, first_undefined)) {
         num_holes++;
       }

       // Find last defined element.
       while (first_undefined < last_defined &&
              IS_UNDEFINED(obj[last_defined])) {
-        if (!obj.hasOwnProperty(last_defined)) {
+        if (!HAS_OWN_PROPERTY(obj, last_defined)) {
           num_holes++;
         }
         last_defined--;
=======================================
--- /trunk/src/ast-value-factory.h      Tue Sep  2 12:59:15 2014 UTC
+++ /trunk/src/ast-value-factory.h      Thu Sep 18 00:05:06 2014 UTC
@@ -235,32 +235,33 @@


 // For generating string constants.
-#define STRING_CONSTANTS(F) \
-  F(anonymous_function, "(anonymous function)") \
-  F(arguments, "arguments") \
-  F(done, "done") \
-  F(dot, ".") \
-  F(dot_for, ".for") \
-  F(dot_generator, ".generator") \
-  F(dot_generator_object, ".generator_object") \
-  F(dot_iterator, ".iterator") \
-  F(dot_module, ".module") \
-  F(dot_result, ".result") \
-  F(empty, "") \
-  F(eval, "eval") \
+#define STRING_CONSTANTS(F)                           \
+  F(anonymous_function, "(anonymous function)")       \
+  F(arguments, "arguments")                           \
+  F(constructor, "constructor")                       \
+  F(done, "done")                                     \
+  F(dot, ".")                                         \
+  F(dot_for, ".for")                                  \
+  F(dot_generator, ".generator")                      \
+  F(dot_generator_object, ".generator_object")        \
+  F(dot_iterator, ".iterator")                        \
+  F(dot_module, ".module")                            \
+  F(dot_result, ".result")                            \
+  F(empty, "")                                        \
+  F(eval, "eval")                                     \
   F(initialize_const_global, "initializeConstGlobal") \
-  F(initialize_var_global, "initializeVarGlobal") \
-  F(make_reference_error, "MakeReferenceError") \
-  F(make_syntax_error, "MakeSyntaxError") \
-  F(make_type_error, "MakeTypeError") \
-  F(module, "module") \
-  F(native, "native") \
-  F(next, "next") \
-  F(proto, "__proto__") \
-  F(prototype, "prototype") \
-  F(this, "this") \
-  F(use_asm, "use asm") \
-  F(use_strict, "use strict") \
+  F(initialize_var_global, "initializeVarGlobal")     \
+  F(make_reference_error, "MakeReferenceError")       \
+  F(make_syntax_error, "MakeSyntaxError")             \
+  F(make_type_error, "MakeTypeError")                 \
+  F(module, "module")                                 \
+  F(native, "native")                                 \
+  F(next, "next")                                     \
+  F(proto, "__proto__")                               \
+  F(prototype, "prototype")                           \
+  F(this, "this")                                     \
+  F(use_asm, "use asm")                               \
+  F(use_strict, "use strict")                         \
   F(value, "value")


=======================================
--- /trunk/src/ast.cc   Tue Sep 16 07:50:38 2014 UTC
+++ /trunk/src/ast.cc   Thu Sep 18 00:05:06 2014 UTC
@@ -173,10 +173,12 @@

 ObjectLiteralProperty::ObjectLiteralProperty(Zone* zone,
AstValueFactory* ast_value_factory, - Literal* key, Expression* value) { + Literal* key, Expression* value,
+                                             bool is_static) {
   emit_store_ = true;
   key_ = key;
   value_ = value;
+  is_static_ = is_static;
   if (key->raw_value()->EqualsString(ast_value_factory->proto_string())) {
     kind_ = PROTOTYPE;
   } else if (value_->AsMaterializedLiteral() != NULL) {
@@ -189,11 +191,13 @@
 }


-ObjectLiteralProperty::ObjectLiteralProperty(
-    Zone* zone, bool is_getter, FunctionLiteral* value) {
+ObjectLiteralProperty::ObjectLiteralProperty(Zone* zone, bool is_getter,
+                                             FunctionLiteral* value,
+                                             bool is_static) {
   emit_store_ = true;
   value_ = value;
   kind_ = is_getter ? GETTER : SETTER;
+  is_static_ = is_static;
 }


@@ -1090,6 +1094,7 @@
 DONT_OPTIMIZE_NODE(ModuleStatement)
 DONT_OPTIMIZE_NODE(WithStatement)
 DONT_OPTIMIZE_NODE(DebuggerStatement)
+DONT_OPTIMIZE_NODE(ClassLiteral)
 DONT_OPTIMIZE_NODE(NativeFunctionLiteral)
 DONT_OPTIMIZE_NODE(SuperReference)

=======================================
--- /trunk/src/ast.h    Tue Sep 16 07:50:38 2014 UTC
+++ /trunk/src/ast.h    Thu Sep 18 00:05:06 2014 UTC
@@ -40,12 +40,12 @@
 // Nodes of the abstract syntax tree. Only concrete classes are
 // enumerated here.

-#define DECLARATION_NODE_LIST(V)                \
-  V(VariableDeclaration)                        \
-  V(FunctionDeclaration)                        \
-  V(ModuleDeclaration)                          \
-  V(ImportDeclaration)                          \
-  V(ExportDeclaration)                          \
+#define DECLARATION_NODE_LIST(V) \
+  V(VariableDeclaration)         \
+  V(FunctionDeclaration)         \
+  V(ModuleDeclaration)           \
+  V(ImportDeclaration)           \
+  V(ExportDeclaration)

 #define MODULE_NODE_LIST(V)                     \
   V(ModuleLiteral)                              \
@@ -73,28 +73,29 @@
   V(TryFinallyStatement)                        \
   V(DebuggerStatement)

-#define EXPRESSION_NODE_LIST(V)                 \
-  V(FunctionLiteral)                            \
-  V(NativeFunctionLiteral)                      \
-  V(Conditional)                                \
-  V(VariableProxy)                              \
-  V(Literal)                                    \
-  V(RegExpLiteral)                              \
-  V(ObjectLiteral)                              \
-  V(ArrayLiteral)                               \
-  V(Assignment)                                 \
-  V(Yield)                                      \
-  V(Throw)                                      \
-  V(Property)                                   \
-  V(Call)                                       \
-  V(CallNew)                                    \
-  V(CallRuntime)                                \
-  V(UnaryOperation)                             \
-  V(CountOperation)                             \
-  V(BinaryOperation)                            \
-  V(CompareOperation)                           \
-  V(ThisFunction)                               \
-  V(SuperReference)                             \
+#define EXPRESSION_NODE_LIST(V) \
+  V(FunctionLiteral)            \
+  V(ClassLiteral)               \
+  V(NativeFunctionLiteral)      \
+  V(Conditional)                \
+  V(VariableProxy)              \
+  V(Literal)                    \
+  V(RegExpLiteral)              \
+  V(ObjectLiteral)              \
+  V(ArrayLiteral)               \
+  V(Assignment)                 \
+  V(Yield)                      \
+  V(Throw)                      \
+  V(Property)                   \
+  V(Call)                       \
+  V(CallNew)                    \
+  V(CallRuntime)                \
+  V(UnaryOperation)             \
+  V(CountOperation)             \
+  V(BinaryOperation)            \
+  V(CompareOperation)           \
+  V(ThisFunction)               \
+  V(SuperReference)             \
   V(CaseClause)

 #define AST_NODE_LIST(V)                        \
@@ -1459,7 +1460,7 @@
   };

   ObjectLiteralProperty(Zone* zone, AstValueFactory* ast_value_factory,
-                        Literal* key, Expression* value);
+                        Literal* key, Expression* value, bool is_static);

   Literal* key() { return key_; }
   Expression* value() { return value_; }
@@ -1478,7 +1479,8 @@
  protected:
   template<class> friend class AstNodeFactory;

- ObjectLiteralProperty(Zone* zone, bool is_getter, FunctionLiteral* value);
+  ObjectLiteralProperty(Zone* zone, bool is_getter, FunctionLiteral* value,
+                        bool is_static);
   void set_key(Literal* key) { key_ = key; }

  private:
@@ -1486,6 +1488,7 @@
   Expression* value_;
   Kind kind_;
   bool emit_store_;
+  bool is_static_;
   Handle<Map> receiver_type_;
 };

@@ -2497,6 +2500,40 @@
   class FunctionKindBits : public BitField<FunctionKind, 6, 3> {};
 };

+
+class ClassLiteral FINAL : public Expression {
+ public:
+  typedef ObjectLiteralProperty Property;
+
+  DECLARE_NODE_TYPE(ClassLiteral)
+
+  Handle<String> name() const { return raw_name_->string(); }
+  const AstRawString* raw_name() const { return raw_name_; }
+  Expression* extends() const { return extends_; }
+  FunctionLiteral* constructor() const { return constructor_; }
+  ZoneList<Property*>* properties() const { return properties_; }
+
+ protected:
+  ClassLiteral(Zone* zone, const AstRawString* name, Expression* extends,
+ FunctionLiteral* constructor, ZoneList<Property*>* properties, + AstValueFactory* ast_value_factory, int position, IdGen* id_gen)
+      : Expression(zone, position, id_gen),
+        raw_name_(name),
+        raw_inferred_name_(ast_value_factory->empty_string()),
+        extends_(extends),
+        constructor_(constructor),
+        properties_(properties) {}
+
+ private:
+  const AstRawString* raw_name_;
+  Handle<String> name_;
+  const AstString* raw_inferred_name_;
+  Handle<String> inferred_name_;
+  Expression* extends_;
+  FunctionLiteral* constructor_;
+  ZoneList<Property*>* properties_;
+};
+

 class NativeFunctionLiteral FINAL : public Expression {
  public:
@@ -3300,16 +3337,17 @@
   }

   ObjectLiteral::Property* NewObjectLiteralProperty(Literal* key,
-                                                    Expression* value) {
-    return new (zone_)
-        ObjectLiteral::Property(zone_, ast_value_factory_, key, value);
+                                                    Expression* value,
+                                                    bool is_static) {
+ return new (zone_) ObjectLiteral::Property(zone_, ast_value_factory_, key,
+                                               value, is_static);
   }

   ObjectLiteral::Property* NewObjectLiteralProperty(bool is_getter,
                                                     FunctionLiteral* value,
-                                                    int pos) {
+ int pos, bool is_static) {
     ObjectLiteral::Property* prop =
-        new(zone_) ObjectLiteral::Property(zone_, is_getter, value);
+ new (zone_) ObjectLiteral::Property(zone_, is_getter, value, is_static);
     prop->set_key(NewStringLiteral(value->raw_name(), pos));
     return prop;  // Not an AST node, will not be visited.
   }
@@ -3464,6 +3502,17 @@
     }
     return lit;
   }
+
+ ClassLiteral* NewClassLiteral(const AstRawString* name, Expression* extends,
+                                FunctionLiteral* constructor,
+ ZoneList<ObjectLiteral::Property*>* properties,
+                                AstValueFactory* ast_value_factory,
+                                int position) {
+    ClassLiteral* lit =
+ new (zone_) ClassLiteral(zone_, name, extends, constructor, properties,
+                                 ast_value_factory, position, id_gen_);
+    VISIT_AND_RETURN(ClassLiteral, lit)
+  }

   NativeFunctionLiteral* NewNativeFunctionLiteral(const AstRawString* name,
                                                   v8::Extension* extension,
=======================================
--- /trunk/src/builtins.h       Tue Aug  5 00:05:55 2014 UTC
+++ /trunk/src/builtins.h       Thu Sep 18 00:05:06 2014 UTC
@@ -63,105 +63,68 @@
   V(GeneratorPoisonPill, NO_EXTRA_ARGUMENTS)

 // Define list of builtins implemented in assembly.
-#define BUILTIN_LIST_A(V)                                               \
-  V(ArgumentsAdaptorTrampoline,     BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(InOptimizationQueue,            BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(JSConstructStubGeneric,         BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(JSConstructStubApi,             BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(JSEntryTrampoline,              BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(JSConstructEntryTrampoline,     BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(CompileUnoptimized,             BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(CompileOptimized,               BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(CompileOptimizedConcurrent,     BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(NotifyDeoptimized,              BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(NotifySoftDeoptimized,          BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(NotifyLazyDeoptimized,          BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(NotifyStubFailure,              BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(NotifyStubFailureSaveDoubles,   BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-                                                                        \
-  V(LoadIC_Miss,                    BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(KeyedLoadIC_Miss,               BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(StoreIC_Miss,                   BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(KeyedStoreIC_Miss,              BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(LoadIC_Getter_ForDeopt,         LOAD_IC, MONOMORPHIC,               \
-                                    kNoExtraICState)                    \
-  V(KeyedLoadIC_Initialize,         KEYED_LOAD_IC, UNINITIALIZED,       \
-                                    kNoExtraICState)                    \
-  V(KeyedLoadIC_PreMonomorphic,     KEYED_LOAD_IC, PREMONOMORPHIC,      \
-                                    kNoExtraICState)                    \
-  V(KeyedLoadIC_Generic,            KEYED_LOAD_IC, GENERIC,             \
-                                    kNoExtraICState)                    \
-  V(KeyedLoadIC_String,             KEYED_LOAD_IC, MEGAMORPHIC,         \
-                                    kNoExtraICState)                    \
-  V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, MONOMORPHIC,         \
-                                    kNoExtraICState)                    \
-  V(KeyedLoadIC_SloppyArguments,    KEYED_LOAD_IC, MONOMORPHIC,         \
-                                    kNoExtraICState)                    \
-                                                                        \
-  V(StoreIC_Setter_ForDeopt,        STORE_IC, MONOMORPHIC,              \
-                                    StoreIC::kStrictModeState)          \
-                                                                        \
-  V(KeyedStoreIC_Initialize,        KEYED_STORE_IC, UNINITIALIZED,      \
-                                    kNoExtraICState)                    \
-  V(KeyedStoreIC_PreMonomorphic,    KEYED_STORE_IC, PREMONOMORPHIC,     \
-                                    kNoExtraICState)                    \
-  V(KeyedStoreIC_Generic,           KEYED_STORE_IC, GENERIC,            \
-                                    kNoExtraICState)                    \
-                                                                        \
-  V(KeyedStoreIC_Initialize_Strict, KEYED_STORE_IC, UNINITIALIZED,      \
-                                    StoreIC::kStrictModeState)          \
-  V(KeyedStoreIC_PreMonomorphic_Strict, KEYED_STORE_IC, PREMONOMORPHIC, \
-                                    StoreIC::kStrictModeState)          \
-  V(KeyedStoreIC_Generic_Strict,    KEYED_STORE_IC, GENERIC,            \
-                                    StoreIC::kStrictModeState)          \
-  V(KeyedStoreIC_SloppyArguments,   KEYED_STORE_IC, MONOMORPHIC,        \
-                                    kNoExtraICState)                    \
-                                                                        \
-  /* Uses KeyedLoadIC_Initialize; must be after in list. */             \
-  V(FunctionCall,                   BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(FunctionApply,                  BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-                                                                        \
-  V(InternalArrayCode,              BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(ArrayCode,                      BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-                                                                        \
-  V(StringConstructCode,            BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-                                                                        \
-  V(OnStackReplacement,             BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(InterruptCheck,                 BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(OsrAfterStackCheck,             BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(StackCheck,                     BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-                                                                        \
-  V(MarkCodeAsExecutedOnce,         BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
-  V(MarkCodeAsExecutedTwice,        BUILTIN, UNINITIALIZED,             \
-                                    kNoExtraICState)                    \
+#define BUILTIN_LIST_A(V) \ + V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(InOptimizationQueue, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(JSConstructStubApi, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(JSEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(CompileLazy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(CompileOptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(CompileOptimizedConcurrent, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(NotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(NotifyStubFailure, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(NotifyStubFailureSaveDoubles, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + \ + V(LoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(StoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(LoadIC_Getter_ForDeopt, LOAD_IC, MONOMORPHIC, kNoExtraICState) \ + V(KeyedLoadIC_Initialize, KEYED_LOAD_IC, UNINITIALIZED, kNoExtraICState) \ + V(KeyedLoadIC_PreMonomorphic, KEYED_LOAD_IC, PREMONOMORPHIC, \ + kNoExtraICState) \ + V(KeyedLoadIC_Generic, KEYED_LOAD_IC, GENERIC, kNoExtraICState) \ + V(KeyedLoadIC_String, KEYED_LOAD_IC, MEGAMORPHIC, kNoExtraICState) \ + V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, MONOMORPHIC, \ + kNoExtraICState) \ + V(KeyedLoadIC_SloppyArguments, KEYED_LOAD_IC, MONOMORPHIC, kNoExtraICState) \ + \ + V(StoreIC_Setter_ForDeopt, STORE_IC, MONOMORPHIC, StoreIC::kStrictModeState) \ + \ + V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED, kNoExtraICState) \ + V(KeyedStoreIC_PreMonomorphic, KEYED_STORE_IC, PREMONOMORPHIC, \ + kNoExtraICState) \ + V(KeyedStoreIC_Generic, KEYED_STORE_IC, GENERIC, kNoExtraICState) \ + \ + V(KeyedStoreIC_Initialize_Strict, KEYED_STORE_IC, UNINITIALIZED, \ + StoreIC::kStrictModeState) \ + V(KeyedStoreIC_PreMonomorphic_Strict, KEYED_STORE_IC, PREMONOMORPHIC, \ + StoreIC::kStrictModeState) \ + V(KeyedStoreIC_Generic_Strict, KEYED_STORE_IC, GENERIC, \ + StoreIC::kStrictModeState) \ + V(KeyedStoreIC_SloppyArguments, KEYED_STORE_IC, MONOMORPHIC, \ + kNoExtraICState) \ + \ + /* Uses KeyedLoadIC_Initialize; must be after in list. */ \ + V(FunctionCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(FunctionApply, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + \ + V(InternalArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(ArrayCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + \ + V(StringConstructCode, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + \ + V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(OsrAfterStackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + \ + V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ + V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \
   CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V)

 // Define list of builtin handlers implemented in assembly.
@@ -334,7 +297,7 @@
   static void Generate_Adaptor(MacroAssembler* masm,
                                CFunctionId id,
                                BuiltinExtraArguments extra_args);
-  static void Generate_CompileUnoptimized(MacroAssembler* masm);
+  static void Generate_CompileLazy(MacroAssembler* masm);
   static void Generate_InOptimizationQueue(MacroAssembler* masm);
   static void Generate_CompileOptimized(MacroAssembler* masm);
   static void Generate_CompileOptimizedConcurrent(MacroAssembler* masm);
=======================================
--- /trunk/src/code-stubs.cc    Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/code-stubs.cc    Thu Sep 18 00:05:06 2014 UTC
@@ -244,6 +244,22 @@
   void** value_out = reinterpret_cast<void**>(desc);
   Dispatch(isolate, key, value_out, &InitializeDescriptorDispatchedCall);
 }
+
+
+void CodeStub::GetCodeDispatchCall(CodeStub* stub, void** value_out) {
+  Handle<Code>* code_out = reinterpret_cast<Handle<Code>*>(value_out);
+  // Code stubs with special cache cannot be recreated from stub key.
+  *code_out = stub->UseSpecialCache() ? Handle<Code>() : stub->GetCode();
+}
+
+
+MaybeHandle<Code> CodeStub::GetCode(Isolate* isolate, uint32_t key) {
+  HandleScope scope(isolate);
+  Handle<Code> code;
+  void** value_out = reinterpret_cast<void**>(&code);
+  Dispatch(isolate, key, value_out, &GetCodeDispatchCall);
+  return scope.CloseAndEscape(code);
+}


 // static
=======================================
--- /trunk/src/code-stubs.h     Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/code-stubs.h     Thu Sep 18 00:05:06 2014 UTC
@@ -187,6 +187,8 @@
   static void InitializeDescriptor(Isolate* isolate, uint32_t key,
                                    CodeStubDescriptor* desc);

+  static MaybeHandle<Code> GetCode(Isolate* isolate, uint32_t key);
+
   // Returns information for computing the number key.
   virtual Major MajorKey() const = 0;
   uint32_t MinorKey() const { return minor_key_; }
@@ -261,6 +263,8 @@
   static void Dispatch(Isolate* isolate, uint32_t key, void** value_out,
                        DispatchedCall call);

+  static void GetCodeDispatchCall(CodeStub* stub, void** value_out);
+
   STATIC_ASSERT(NUMBER_OF_IDS < (1 << kStubMajorKeyBits));
   class MajorKeyBits: public BitField<uint32_t, 0, kStubMajorKeyBits> {};
   class MinorKeyBits: public BitField<uint32_t,
=======================================
--- /trunk/src/compiler/ast-graph-builder.cc    Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/compiler/ast-graph-builder.cc    Thu Sep 18 00:05:06 2014 UTC
@@ -810,6 +810,12 @@
   Node* value = NewNode(op, context, info, pretenure);
   ast_context()->ProduceValue(value);
 }
+
+
+void AstGraphBuilder::VisitClassLiteral(ClassLiteral* expr) {
+  // TODO(arv): Implement.
+  UNREACHABLE();
+}


void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) {
=======================================
--- /trunk/src/compiler/js-inlining.cc  Mon Sep 15 00:05:18 2014 UTC
+++ /trunk/src/compiler/js-inlining.cc  Thu Sep 18 00:05:06 2014 UTC
@@ -54,8 +54,6 @@
 // test cases, where similar code is currently duplicated).
static void Parse(Handle<JSFunction> function, CompilationInfoWithZone* info) {
   CHECK(Parser::Parse(info));
-  StrictMode strict_mode = info->function()->strict_mode();
-  info->SetStrictMode(strict_mode);
   info->SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
   CHECK(Rewriter::Rewrite(info));
   CHECK(Scope::Analyze(info));
=======================================
--- /trunk/src/compiler/js-typed-lowering.cc    Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/compiler/js-typed-lowering.cc    Thu Sep 18 00:05:06 2014 UTC
@@ -444,7 +444,11 @@
     // JSToNumber(null) => #0
     return ReplaceWith(jsgraph()->ZeroConstant());
   }
-  // TODO(turbofan): js-typed-lowering of ToNumber(x:boolean)
+  if (input_type->Is(Type::Boolean())) {
+    // JSToNumber(x:boolean) => BooleanToNumber(x)
+    return ReplaceWith(
+        graph()->NewNode(simplified()->BooleanToNumber(), input));
+  }
   // TODO(turbofan): js-typed-lowering of ToNumber(x:string)
   return NoChange();
 }
=======================================
--- /trunk/src/compiler/opcodes.h       Thu Sep 11 00:05:22 2014 UTC
+++ /trunk/src/compiler/opcodes.h       Thu Sep 18 00:05:06 2014 UTC
@@ -131,6 +131,7 @@
 // Opcodes for VirtuaMachine-level operators.
 #define SIMPLIFIED_OP_LIST(V) \
   V(BooleanNot)               \
+  V(BooleanToNumber)          \
   V(NumberEqual)              \
   V(NumberLessThan)           \
   V(NumberLessThanOrEqual)    \
=======================================
--- /trunk/src/compiler/simplified-lowering.cc  Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/compiler/simplified-lowering.cc  Thu Sep 18 00:05:06 2014 UTC
@@ -432,6 +432,24 @@
         }
         break;
       }
+      case IrOpcode::kBooleanToNumber: {
+        if (lower()) {
+          MachineTypeUnion input = GetInfo(node->InputAt(0))->output;
+          if (input & kRepBit) {
+            // BooleanToNumber(x: kRepBit) => x
+            DeferReplacement(node, node->InputAt(0));
+          } else {
+            // BooleanToNumber(x: kRepTagged) => WordEqual(x, #true)
+            node->set_op(lowering->machine()->WordEqual());
+            node->AppendInput(jsgraph_->zone(), jsgraph_->TrueConstant());
+          }
+        } else {
+          // No input representation requirement; adapt during lowering.
+          ProcessInput(node, 0, kTypeBool);
+          SetOutput(node, kMachInt32);
+        }
+        break;
+      }
       case IrOpcode::kNumberEqual:
       case IrOpcode::kNumberLessThan:
       case IrOpcode::kNumberLessThanOrEqual: {
=======================================
--- /trunk/src/compiler/simplified-operator.cc  Tue Sep 16 07:50:38 2014 UTC
+++ /trunk/src/compiler/simplified-operator.cc  Thu Sep 18 00:05:06 2014 UTC
@@ -65,6 +65,7 @@

 #define PURE_OP_LIST(V)                                \
   V(BooleanNot, Operator::kNoProperties, 1)            \
+  V(BooleanToNumber, Operator::kNoProperties, 1)       \
   V(NumberEqual, Operator::kCommutative, 2)            \
   V(NumberLessThan, Operator::kNoProperties, 2)        \
   V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \
=======================================
--- /trunk/src/compiler/simplified-operator.h   Tue Sep 16 07:50:38 2014 UTC
+++ /trunk/src/compiler/simplified-operator.h   Thu Sep 18 00:05:06 2014 UTC
@@ -91,6 +91,7 @@
   explicit SimplifiedOperatorBuilder(Zone* zone);

   const Operator* BooleanNot();
+  const Operator* BooleanToNumber();

   const Operator* NumberEqual();
   const Operator* NumberLessThan();
=======================================
--- /trunk/src/compiler/typer.cc        Tue Sep 16 07:50:38 2014 UTC
+++ /trunk/src/compiler/typer.cc        Thu Sep 18 00:05:06 2014 UTC
@@ -642,6 +642,11 @@
 Bounds Typer::Visitor::TypeBooleanNot(Node* node) {
   return Bounds(Type::Boolean(zone()));
 }
+
+
+Bounds Typer::Visitor::TypeBooleanToNumber(Node* node) {
+  return Bounds(Type::Number(zone()));
+}


 Bounds Typer::Visitor::TypeNumberEqual(Node* node) {
=======================================
--- /trunk/src/compiler.cc      Mon Sep 15 00:05:18 2014 UTC
+++ /trunk/src/compiler.cc      Thu Sep 18 00:05:06 2014 UTC
@@ -617,37 +617,6 @@

   shared->set_expected_nof_properties(estimate);
 }
-
-
-static void UpdateSharedFunctionInfo(CompilationInfo* info) {
-  // Update the shared function info with the compiled code and the
-  // scope info.  Please note, that the order of the shared function
-  // info initialization is important since set_scope_info might
-  // trigger a GC, causing the DCHECK below to be invalid if the code
-  // was flushed. By setting the code object last we avoid this.
-  Handle<SharedFunctionInfo> shared = info->shared_info();
-  Handle<ScopeInfo> scope_info =
-      ScopeInfo::Create(info->scope(), info->zone());
-  shared->set_scope_info(*scope_info);
-
-  Handle<Code> code = info->code();
-  CHECK(code->kind() == Code::FUNCTION);
-  shared->ReplaceCode(*code);
-  if (shared->optimization_disabled()) code->set_optimizable(false);
-
-  shared->set_feedback_vector(*info->feedback_vector());
-
-  // Set the expected number of properties for instances.
-  FunctionLiteral* lit = info->function();
-  int expected = lit->expected_property_count();
-  SetExpectedNofPropertiesFromEstimate(shared, expected);
-
-  // Check the function has compiled code.
-  DCHECK(shared->is_compiled());
-  shared->set_bailout_reason(lit->dont_optimize_reason());
-  shared->set_ast_node_count(lit->ast_node_count());
-  shared->set_strict_mode(lit->strict_mode());
-}


 // Sets the function info on a function.
@@ -702,14 +671,33 @@
     CompilationInfo* info) {
   VMState<COMPILER> state(info->isolate());
   PostponeInterruptsScope postpone(info->isolate());
+
+  // Parse and update CompilationInfo with the results.
   if (!Parser::Parse(info)) return MaybeHandle<Code>();
-  info->SetStrictMode(info->function()->strict_mode());
+  Handle<SharedFunctionInfo> shared = info->shared_info();
+  FunctionLiteral* lit = info->function();
+  shared->set_strict_mode(lit->strict_mode());
+ SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
+  shared->set_bailout_reason(lit->dont_optimize_reason());
+  shared->set_ast_node_count(lit->ast_node_count());

+  // Compile unoptimized code.
   if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>();
+
+  CHECK_EQ(Code::FUNCTION, info->code()->kind());
   Compiler::RecordFunctionCompilation(
       Logger::LAZY_COMPILE_TAG, info, info->shared_info());
-  UpdateSharedFunctionInfo(info);
-  DCHECK_EQ(Code::FUNCTION, info->code()->kind());
+
+  // Update the shared function info with the scope info. Allocating the
+  // ScopeInfo object may cause a GC.
+ Handle<ScopeInfo> scope_info = ScopeInfo::Create(info->scope(), info->zone());
+  shared->set_scope_info(*scope_info);
+
+  // Update the code and feedback vector for the shared function info.
+  shared->ReplaceCode(*info->code());
+ if (shared->optimization_disabled()) info->code()->set_optimizable(false);
+  shared->set_feedback_vector(*info->feedback_vector());
+
   return info->code();
 }

@@ -726,6 +714,21 @@
   ASSIGN_RETURN_ON_EXCEPTION(info.isolate(), result,
                              GetUnoptimizedCodeCommon(&info),
                              Code);
+  return result;
+}
+
+
+MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) {
+  DCHECK(!function->GetIsolate()->has_pending_exception());
+  DCHECK(!function->is_compiled());
+  if (function->shared()->is_compiled()) {
+    return Handle<Code>(function->shared()->code());
+  }
+
+  CompilationInfoWithZone info(function);
+  Handle<Code> result;
+  ASSIGN_RETURN_ON_EXCEPTION(info.isolate(), result,
+                             GetUnoptimizedCodeCommon(&info), Code);

   if (FLAG_always_opt &&
       info.isolate()->use_crankshaft() &&
@@ -756,7 +759,7 @@
 bool Compiler::EnsureCompiled(Handle<JSFunction> function,
                               ClearExceptionFlag flag) {
   if (function->is_compiled()) return true;
-  MaybeHandle<Code> maybe_code = Compiler::GetUnoptimizedCode(function);
+  MaybeHandle<Code> maybe_code = Compiler::GetLazyCode(function);
   Handle<Code> code;
   if (!maybe_code.ToHandle(&code)) {
     if (flag == CLEAR_EXCEPTION) {
@@ -779,7 +782,7 @@
 // full code without debug break slots to full code with debug break slots
 // depends on the generated code is otherwise exactly the same.
 // If compilation fails, just keep the existing code.
-MaybeHandle<Code> Compiler::GetCodeForDebugging(Handle<JSFunction> function) {
+MaybeHandle<Code> Compiler::GetDebugCode(Handle<JSFunction> function) {
   CompilationInfoWithZone info(function);
   Isolate* isolate = info.isolate();
   VMState<COMPILER> state(isolate);
@@ -817,7 +820,6 @@

   info.MarkAsGlobal();
   if (!Parser::Parse(&info)) return;
-  info.SetStrictMode(info.function()->strict_mode());

   LiveEditFunctionTracker tracker(info.isolate(), info.function());
   if (!CompileUnoptimizedCode(&info)) return;
@@ -1113,7 +1115,7 @@
   // Generate code
   Handle<ScopeInfo> scope_info;
   if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) {
-    Handle<Code> code = isolate->builtins()->CompileUnoptimized();
+    Handle<Code> code = isolate->builtins()->CompileLazy();
     info.SetCode(code);
     scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate));
   } else if (FullCodeGenerator::MakeCode(&info)) {
@@ -1192,8 +1194,6 @@

 static bool CompileOptimizedPrologue(CompilationInfo* info) {
   if (!Parser::Parse(info)) return false;
-  info->SetStrictMode(info->function()->strict_mode());
-
   if (!Rewriter::Rewrite(info)) return false;
   if (!Scope::Analyze(info)) return false;
   DCHECK(info->scope() != NULL);
@@ -1369,8 +1369,7 @@
       info->isolate()->cpu_profiler()->is_profiling()) {
     Handle<Script> script = info->script();
     Handle<Code> code = info->code();
-    if (code.is_identical_to(
-            info->isolate()->builtins()->CompileUnoptimized())) {
+    if (code.is_identical_to(info->isolate()->builtins()->CompileLazy())) {
       return;
     }
int line_num = Script::GetLineNumber(script, shared->start_position()) + 1;
=======================================
--- /trunk/src/compiler.h       Mon Sep 15 00:05:18 2014 UTC
+++ /trunk/src/compiler.h       Thu Sep 18 00:05:06 2014 UTC
@@ -659,11 +659,13 @@
  public:
   MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode(
       Handle<JSFunction> function);
+  MUST_USE_RESULT static MaybeHandle<Code> GetLazyCode(
+      Handle<JSFunction> function);
   MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode(
       Handle<SharedFunctionInfo> shared);
   static bool EnsureCompiled(Handle<JSFunction> function,
                              ClearExceptionFlag flag);
-  MUST_USE_RESULT static MaybeHandle<Code> GetCodeForDebugging(
+  MUST_USE_RESULT static MaybeHandle<Code> GetDebugCode(
       Handle<JSFunction> function);

   static void CompileForLiveEdit(Handle<Script> script);
=======================================
--- /trunk/src/d8.cc    Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/d8.cc    Thu Sep 18 00:05:06 2014 UTC
@@ -54,7 +54,12 @@

 #if !defined(_WIN32) && !defined(_WIN64)
 #include <unistd.h>  // NOLINT
-#endif
+#else
+#include <windows.h>  // NOLINT
+#if defined(_MSC_VER)
+#include <crtdbg.h>  // NOLINT
+#endif               // defined(_MSC_VER)
+#endif               // !defined(_WIN32) && !defined(_WIN64)

 #ifndef DCHECK
 #define DCHECK(condition) assert(condition)
@@ -1595,6 +1600,21 @@


 int Shell::Main(int argc, char* argv[]) {
+#if (defined(_WIN32) || defined(_WIN64))
+  UINT new_flags =
+ SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX;
+  UINT existing_flags = SetErrorMode(new_flags);
+  SetErrorMode(existing_flags | new_flags);
+#if defined(_MSC_VER)
+  _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+  _set_error_mode(_OUT_TO_STDERR);
+#endif  // defined(_MSC_VER)
+#endif  // defined(_WIN32) || defined(_WIN64)
   if (!SetOptions(argc, argv)) return 1;
   v8::V8::InitializeICU(options.icu_data_file);
   v8::Platform* platform = v8::platform::CreateDefaultPlatform();
=======================================
--- /trunk/src/debug.cc Fri Sep 12 00:05:16 2014 UTC
+++ /trunk/src/debug.cc Thu Sep 18 00:05:06 2014 UTC
@@ -1880,7 +1880,7 @@
   // Make sure that the shared full code is compiled with debug
   // break slots.
   if (!function->shared()->code()->has_debug_break_slots()) {
-    MaybeHandle<Code> code = Compiler::GetCodeForDebugging(function);
+    MaybeHandle<Code> code = Compiler::GetDebugCode(function);
     // Recompilation can fail.  In that case leave the code as it was.
     if (!code.is_null()) function->ReplaceCode(*code.ToHandleChecked());
   } else {
@@ -1914,7 +1914,7 @@

     Deoptimizer::DeoptimizeAll(isolate_);

-    Handle<Code> lazy_compile = isolate_->builtins()->CompileUnoptimized();
+    Handle<Code> lazy_compile = isolate_->builtins()->CompileLazy();

     // There will be at least one break point when we are done.
     has_break_points_ = true;
=======================================
--- /trunk/src/flag-definitions.h       Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/flag-definitions.h       Thu Sep 18 00:05:06 2014 UTC
@@ -175,6 +175,8 @@
 DEFINE_IMPLICATION(harmony, harmony_classes)
 DEFINE_IMPLICATION(harmony, harmony_object_literals)
 DEFINE_IMPLICATION(harmony_modules, harmony_scoping)
+DEFINE_IMPLICATION(harmony_classes, harmony_scoping)
+DEFINE_IMPLICATION(harmony_classes, harmony_object_literals)

 DEFINE_IMPLICATION(harmony, es_staging)

@@ -436,6 +438,7 @@
             "trace deoptimization of generated code stubs")

DEFINE_BOOL(serialize_toplevel, false, "enable caching of toplevel scripts")
+DEFINE_BOOL(trace_code_serializer, false, "trace code serializer")

 // compiler.cc
 DEFINE_INT(min_preparse_length, 1024,
=======================================
--- /trunk/src/full-codegen.cc  Fri Sep 12 00:05:16 2014 UTC
+++ /trunk/src/full-codegen.cc  Thu Sep 18 00:05:06 2014 UTC
@@ -32,18 +32,22 @@
 void BreakableStatementChecker::VisitVariableDeclaration(
     VariableDeclaration* decl) {
 }
+

 void BreakableStatementChecker::VisitFunctionDeclaration(
     FunctionDeclaration* decl) {
 }
+

 void BreakableStatementChecker::VisitModuleDeclaration(
     ModuleDeclaration* decl) {
 }
+

 void BreakableStatementChecker::VisitImportDeclaration(
     ImportDeclaration* decl) {
 }
+

 void BreakableStatementChecker::VisitExportDeclaration(
     ExportDeclaration* decl) {
@@ -176,6 +180,13 @@

void BreakableStatementChecker::VisitFunctionLiteral(FunctionLiteral* expr) {
 }
+
+
+void BreakableStatementChecker::VisitClassLiteral(ClassLiteral* expr) {
+  if (expr->extends() != NULL) {
+    Visit(expr->extends());
+  }
+}


 void BreakableStatementChecker::VisitNativeFunctionLiteral(
@@ -1529,6 +1540,16 @@
   }
   EmitNewClosure(function_info, expr->pretenure());
 }
+
+
+void FullCodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
+  // TODO(arv): Implement
+  Comment cmnt(masm_, "[ ClassLiteral");
+  if (expr->extends() != NULL) {
+    VisitForEffect(expr->extends());
+  }
+  context()->Plug(isolate()->factory()->undefined_value());
+}


 void FullCodeGenerator::VisitNativeFunctionLiteral(
=======================================
--- /trunk/src/generator.js     Tue Sep  9 00:05:04 2014 UTC
+++ /trunk/src/generator.js     Thu Sep 18 00:05:06 2014 UTC
@@ -20,6 +20,7 @@
                         ['[Generator].prototype.next', this]);
   }

+  if (DEBUG_IS_ACTIVE) %DebugPrepareStepInIfStepping(this);
   return %_GeneratorNext(this, value);
 }

=======================================
--- /trunk/src/heap/gc-tracer.cc        Sun Aug 24 11:34:17 2014 UTC
+++ /trunk/src/heap/gc-tracer.cc        Thu Sep 18 00:05:06 2014 UTC
@@ -17,6 +17,13 @@
   }
   return holes_size;
 }
+
+
+GCTracer::AllocationEvent::AllocationEvent(double duration,
+                                           intptr_t allocation_in_bytes) {
+  duration_ = duration;
+  allocation_in_bytes_ = allocation_in_bytes;
+}


 GCTracer::Event::Event(Type type, const char* gc_reason,
@@ -80,7 +87,8 @@
       cumulative_pure_incremental_marking_duration_(0.0),
       longest_incremental_marking_step_(0.0),
       cumulative_marking_duration_(0.0),
-      cumulative_sweeping_duration_(0.0) {
+      cumulative_sweeping_duration_(0.0),
+      new_space_top_after_gc_(0) {
   current_ = Event(Event::START, NULL, NULL);
   current_.end_time = base::OS::TimeCurrentMillis();
   previous_ = previous_mark_compactor_event_ = current_;
@@ -90,6 +98,13 @@
 void GCTracer::Start(GarbageCollector collector, const char* gc_reason,
                      const char* collector_reason) {
   previous_ = current_;
+  double start_time = base::OS::TimeCurrentMillis();
+  if (new_space_top_after_gc_ != 0) {
+    AddNewSpaceAllocationTime(
+        start_time - previous_.end_time,
+        reinterpret_cast<intptr_t>((heap_->new_space()->top()) -
+                                   new_space_top_after_gc_));
+  }
   if (current_.type == Event::MARK_COMPACTOR)
     previous_mark_compactor_event_ = current_;

@@ -99,7 +114,7 @@
     current_ = Event(Event::MARK_COMPACTOR, gc_reason, collector_reason);
   }

-  current_.start_time = base::OS::TimeCurrentMillis();
+  current_.start_time = start_time;
   current_.start_object_size = heap_->SizeOfObjects();
current_.start_memory_size = heap_->isolate()->memory_allocator()->Size();
   current_.start_holes_size = CountTotalHolesSize(heap_);
@@ -127,6 +142,8 @@
   current_.end_object_size = heap_->SizeOfObjects();
   current_.end_memory_size = heap_->isolate()->memory_allocator()->Size();
   current_.end_holes_size = CountTotalHolesSize(heap_);
+  new_space_top_after_gc_ =
+      reinterpret_cast<intptr_t>(heap_->new_space()->top());

   if (current_.type == Event::SCAVENGER) {
     current_.incremental_marking_steps =
@@ -182,6 +199,12 @@
     heap_->PrintShortHeapStatistics();
   }
 }
+
+
+void GCTracer::AddNewSpaceAllocationTime(double duration,
+                                         intptr_t allocation_in_bytes) {
+ allocation_events_.push_front(AllocationEvent(duration, allocation_in_bytes));
+}


 void GCTracer::AddIncrementalMarkingStep(double duration, intptr_t bytes) {
@@ -294,6 +317,8 @@
   PrintF("nodes_promoted=%d ", heap_->nodes_promoted_);
   PrintF("promotion_rate=%.1f%% ", heap_->promotion_rate_);
   PrintF("semi_space_copy_rate=%.1f%% ", heap_->semi_space_copied_rate_);
+  PrintF("new_space_allocation_throughput=%" V8_PTR_PREFIX "d ",
+         NewSpaceAllocationThroughputInBytesPerMillisecond());

   if (current_.type == Event::SCAVENGER) {
     PrintF("steps_count=%d ", current_.incremental_marking_steps);
@@ -430,6 +455,22 @@
                  iter->pure_incremental_marking_duration;
     ++iter;
   }
+
+  if (durations == 0.0) return 0;
+
+  return static_cast<intptr_t>(bytes / durations);
+}
+
+
+intptr_t GCTracer::NewSpaceAllocationThroughputInBytesPerMillisecond() const {
+  intptr_t bytes = 0;
+  double durations = 0.0;
+  AllocationEventBuffer::const_iterator iter = allocation_events_.begin();
+  while (iter != allocation_events_.end()) {
+    bytes += iter->allocation_in_bytes_;
+    durations += iter->duration_;
+    ++iter;
+  }

   if (durations == 0.0) return 0;

=======================================
--- /trunk/src/heap/gc-tracer.h Sun Aug 24 11:34:17 2014 UTC
+++ /trunk/src/heap/gc-tracer.h Thu Sep 18 00:05:06 2014 UTC
@@ -129,6 +129,22 @@
   };


+  class AllocationEvent {
+   public:
+    // Default constructor leaves the event uninitialized.
+    AllocationEvent() {}
+
+    AllocationEvent(double duration, intptr_t allocation_in_bytes);
+
+ // Time spent in the mutator during the end of the last garbage collection
+    // to the beginning of the next garbage collection.
+    double duration_;
+
+    // Memory allocated in the new space during the end of the last garbage
+    // collection to the beginning of the next garbage collection.
+    intptr_t allocation_in_bytes_;
+  };
+
   class Event {
    public:
     enum Type { SCAVENGER = 0, MARK_COMPACTOR = 1, START = 2 };
@@ -223,6 +239,8 @@

   typedef RingBuffer<Event, kRingBufferMaxSize> EventBuffer;

+ typedef RingBuffer<AllocationEvent, kRingBufferMaxSize> AllocationEventBuffer;
+
   explicit GCTracer(Heap* heap);

   // Start collecting data.
@@ -232,6 +250,9 @@
   // Stop collecting data and print results.
   void Stop();

+  // Log an allocation throughput event.
+ void AddNewSpaceAllocationTime(double duration, intptr_t allocation_in_bytes);
+
   // Log an incremental marking step.
   void AddIncrementalMarkingStep(double duration, intptr_t bytes);

@@ -297,6 +318,10 @@
   // Returns 0 if no events have been recorded.
   intptr_t MarkCompactSpeedInBytesPerMillisecond() const;

+  // Allocation throughput in the new space in bytes/millisecond.
+  // Returns 0 if no events have been recorded.
+  intptr_t NewSpaceAllocationThroughputInBytesPerMillisecond() const;
+
  private:
   // Print one detailed trace line in name=value format.
   // TODO(ernstm): Move to Heap.
@@ -331,6 +356,9 @@
   // RingBuffers for MARK_COMPACTOR events.
   EventBuffer mark_compactor_events_;

+  // RingBuffer for allocation events.
+  AllocationEventBuffer allocation_events_;
+
// Cumulative number of incremental marking steps since creation of tracer.
   int cumulative_incremental_marking_steps_;

@@ -361,6 +389,10 @@
   // all sweeping operations performed on the main thread.
   double cumulative_sweeping_duration_;

+ // Holds the new space top pointer recorded at the end of the last garbage
+  // collection.
+  intptr_t new_space_top_after_gc_;
+
   DISALLOW_COPY_AND_ASSIGN(GCTracer);
 };
 }
=======================================
--- /trunk/src/heap/mark-compact.cc     Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/heap/mark-compact.cc     Thu Sep 18 00:05:06 2014 UTC
@@ -1024,8 +1024,7 @@
 // objects have been marked.

 void CodeFlusher::ProcessJSFunctionCandidates() {
-  Code* lazy_compile =
-      isolate_->builtins()->builtin(Builtins::kCompileUnoptimized);
+ Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kCompileLazy);
   Object* undefined = isolate_->heap()->undefined_value();

   JSFunction* candidate = jsfunction_candidates_head_;
@@ -1070,8 +1069,7 @@


 void CodeFlusher::ProcessSharedFunctionInfoCandidates() {
-  Code* lazy_compile =
-      isolate_->builtins()->builtin(Builtins::kCompileUnoptimized);
+ Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kCompileLazy);

   SharedFunctionInfo* candidate = shared_function_info_candidates_head_;
   SharedFunctionInfo* next_candidate;
=======================================
--- /trunk/src/hydrogen-instructions.h  Thu Sep 11 00:05:22 2014 UTC
+++ /trunk/src/hydrogen-instructions.h  Thu Sep 18 00:05:06 2014 UTC
@@ -3593,7 +3593,8 @@
if (HasDoubleValue() && FixedDoubleArray::is_the_hole_nan(double_value_)) {
       return true;
     }
-    return object_.IsKnownGlobal(isolate()->heap()->the_hole_value());
+    return object_.IsInitialized() &&
+           object_.IsKnownGlobal(isolate()->heap()->the_hole_value());
   }
   bool HasNumberValue() const { return has_double_value_; }
   int32_t NumberValueAsInteger32() const {
=======================================
--- /trunk/src/hydrogen.cc      Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/hydrogen.cc      Thu Sep 18 00:05:06 2014 UTC
@@ -5246,6 +5246,14 @@
       New<HFunctionLiteral>(shared_info, expr->pretenure());
   return ast_context()->ReturnInstruction(instr, expr->id());
 }
+
+
+void HOptimizedGraphBuilder::VisitClassLiteral(ClassLiteral* lit) {
+  DCHECK(!HasStackOverflow());
+  DCHECK(current_block() != NULL);
+  DCHECK(current_block()->HasPredecessor());
+  return Bailout(kClassLiteral);
+}


 void HOptimizedGraphBuilder::VisitNativeFunctionLiteral(
=======================================
--- /trunk/src/ia32/builtins-ia32.cc    Fri Sep 12 00:05:16 2014 UTC
+++ /trunk/src/ia32/builtins-ia32.cc    Thu Sep 18 00:05:06 2014 UTC
@@ -550,8 +550,8 @@
 }


-void Builtins::Generate_CompileUnoptimized(MacroAssembler* masm) {
-  CallRuntimePassFunction(masm, Runtime::kCompileUnoptimized);
+void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
+  CallRuntimePassFunction(masm, Runtime::kCompileLazy);
   GenerateTailCallToReturnedCode(masm);
 }

=======================================
--- /trunk/src/ia32/lithium-codegen-ia32.cc     Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/ia32/lithium-codegen-ia32.cc     Thu Sep 18 00:05:06 2014 UTC
@@ -4764,15 +4764,28 @@
     DeoptimizeIf(not_equal, instr->environment());
     __ Move(input_reg, Immediate(0));
   } else {
-    Label bailout;
-    XMMRegister scratch = (instr->temp() != NULL)
-        ? ToDoubleRegister(instr->temp())
-        : no_xmm_reg;
-    __ TaggedToI(input_reg, input_reg, scratch,
-                 instr->hydrogen()->GetMinusZeroMode(), &bailout);
-    __ jmp(done);
-    __ bind(&bailout);
-    DeoptimizeIf(no_condition, instr->environment());
+    XMMRegister scratch = ToDoubleRegister(instr->temp());
+    DCHECK(!scratch.is(xmm0));
+    __ cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
+           isolate()->factory()->heap_number_map());
+    __ RecordComment("Deferred TaggedToI: not a heap number");
+    DeoptimizeIf(not_equal, instr->environment());
+    __ movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset));
+    __ cvttsd2si(input_reg, Operand(xmm0));
+    __ Cvtsi2sd(scratch, Operand(input_reg));
+    __ ucomisd(xmm0, scratch);
+    __ RecordComment("Deferred TaggedToI: lost precision");
+    DeoptimizeIf(not_equal, instr->environment());
+    __ RecordComment("Deferred TaggedToI: NaN");
+    DeoptimizeIf(parity_even, instr->environment());
+    if (instr->hydrogen()->GetMinusZeroMode() == FAIL_ON_MINUS_ZERO) {
+      __ test(input_reg, Operand(input_reg));
+      __ j(not_zero, done);
+      __ movmskpd(input_reg, xmm0);
+      __ and_(input_reg, 1);
+      __ RecordComment("Deferred TaggedToI: minus zero");
+      DeoptimizeIf(not_zero, instr->environment());
+    }
   }
 }

=======================================
--- /trunk/src/ia32/macro-assembler-ia32.cc     Thu Sep 11 00:05:22 2014 UTC
+++ /trunk/src/ia32/macro-assembler-ia32.cc     Thu Sep 18 00:05:06 2014 UTC
@@ -344,40 +344,6 @@
   }
   bind(&done);
 }
-
-
-void MacroAssembler::TaggedToI(Register result_reg,
-                               Register input_reg,
-                               XMMRegister temp,
-                               MinusZeroMode minus_zero_mode,
-                               Label* lost_precision) {
-  Label done;
-  DCHECK(!temp.is(xmm0));
-
-  cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
-      isolate()->factory()->heap_number_map());
-  j(not_equal, lost_precision, Label::kNear);
-
-  DCHECK(!temp.is(no_xmm_reg));
-
-  movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset));
-  cvttsd2si(result_reg, Operand(xmm0));
-  Cvtsi2sd(temp, Operand(result_reg));
-  ucomisd(xmm0, temp);
-  RecordComment("Deferred TaggedToI: lost precision");
-  j(not_equal, lost_precision, Label::kNear);
-  RecordComment("Deferred TaggedToI: NaN");
-  j(parity_even, lost_precision, Label::kNear);
-  if (minus_zero_mode == FAIL_ON_MINUS_ZERO) {
-    test(result_reg, Operand(result_reg));
-    j(not_zero, &done, Label::kNear);
-    movmskpd(result_reg, xmm0);
-    and_(result_reg, 1);
-    RecordComment("Deferred TaggedToI: minus zero");
-    j(not_zero, lost_precision, Label::kNear);
-  }
-  bind(&done);
-}


 void MacroAssembler::LoadUint32(XMMRegister dst,
=======================================
--- /trunk/src/ia32/macro-assembler-ia32.h      Thu Sep 11 00:05:22 2014 UTC
+++ /trunk/src/ia32/macro-assembler-ia32.h      Thu Sep 18 00:05:06 2014 UTC
@@ -466,9 +466,6 @@
       XMMRegister scratch, MinusZeroMode minus_zero_mode,
       Label* conversion_failed, Label::Distance dst = Label::kFar);

-  void TaggedToI(Register result_reg, Register input_reg, XMMRegister temp,
-      MinusZeroMode minus_zero_mode, Label* lost_precision);
-
   // Smi tagging support.
   void SmiTag(Register reg) {
     STATIC_ASSERT(kSmiTag == 0);
=======================================
--- /trunk/src/ic/x87/handler-compiler-x87.cc   Mon Sep 15 00:05:18 2014 UTC
+++ /trunk/src/ic/x87/handler-compiler-x87.cc   Thu Sep 18 00:05:06 2014 UTC
@@ -8,6 +8,7 @@

 #include "src/ic/call-optimization.h"
 #include "src/ic/handler-compiler.h"
+#include "src/ic/ic.h"

 namespace v8 {
 namespace internal {
=======================================
--- /trunk/src/ic/x87/ic-compiler-x87.cc        Mon Sep  8 00:05:14 2014 UTC
+++ /trunk/src/ic/x87/ic-compiler-x87.cc        Thu Sep 18 00:05:06 2014 UTC
@@ -6,6 +6,7 @@

 #if V8_TARGET_ARCH_X87

+#include "src/ic/ic.h"
 #include "src/ic/ic-compiler.h"

 namespace v8 {
=======================================
--- /trunk/src/log.cc   Wed Aug 20 00:06:26 2014 UTC
+++ /trunk/src/log.cc   Thu Sep 18 00:05:06 2014 UTC
@@ -1221,8 +1221,7 @@
   CALL_LISTENERS(CodeCreateEvent(tag, code, shared, info, name));

   if (!FLAG_log_code || !log_->IsEnabled()) return;
-  if (code == isolate_->builtins()->builtin(Builtins::kCompileUnoptimized))
-    return;
+ if (code == isolate_->builtins()->builtin(Builtins::kCompileLazy)) return;

   Log::MessageBuilder msg(log_);
   AppendCodeCreateHeader(&msg, tag, code);
@@ -1755,8 +1754,7 @@
   // During iteration, there can be heap allocation due to
   // GetScriptLineNumber call.
   for (int i = 0; i < compiled_funcs_count; ++i) {
-    if (code_objects[i].is_identical_to(
-            isolate_->builtins()->CompileUnoptimized()))
+ if (code_objects[i].is_identical_to(isolate_->builtins()->CompileLazy()))
       continue;
     LogExistingFunction(sfis[i], code_objects[i]);
   }
=======================================
--- /trunk/src/macros.py        Thu Aug 21 07:23:04 2014 UTC
+++ /trunk/src/macros.py        Thu Sep 18 00:05:06 2014 UTC
@@ -166,6 +166,7 @@
macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber(arg)); macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg)); macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null"); +macro HAS_OWN_PROPERTY(obj, index) = (%_CallFunction(obj, index, ObjectHasOwnProperty));

 # Private names.
 # GET_PRIVATE should only be used if the property is known to exists on obj
=======================================
--- /trunk/src/messages.js      Sun Aug 24 11:34:17 2014 UTC
+++ /trunk/src/messages.js      Thu Sep 18 00:05:06 2014 UTC
@@ -8,6 +8,7 @@
   // Error
   cyclic_proto:                  ["Cyclic __proto__ value"],
   code_gen_from_strings:         ["%0"],
+ constructor_special_method: ["Class constructor may not be an accessor"],
   generator_running:             ["Generator is already running"],
   generator_finished:            ["Generator has already finished"],
   // TypeError
@@ -139,6 +140,7 @@
   array_indexof_not_defined:     ["Array.getIndexOf: Argument undefined"],
object_not_extensible: ["Can't add property ", "%0", ", object is not extensible"],
   illegal_access:                ["Illegal access"],
+ static_prototype: ["Classes may not have static property named prototype"], strict_mode_with: ["Strict mode code may not include a with statement"], strict_eval_arguments: ["Unexpected eval or arguments in strict mode"], too_many_arguments: ["Too many arguments in function call (only 65535 allowed)"],
=======================================
--- /trunk/src/mips/builtins-mips.cc    Mon Aug 25 19:57:56 2014 UTC
+++ /trunk/src/mips/builtins-mips.cc    Thu Sep 18 00:05:06 2014 UTC
@@ -824,8 +824,8 @@
 }


-void Builtins::Generate_CompileUnoptimized(MacroAssembler* masm) {
-  CallRuntimePassFunction(masm, Runtime::kCompileUnoptimized);
+void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
+  CallRuntimePassFunction(masm, Runtime::kCompileLazy);
   GenerateTailCallToReturnedCode(masm);
 }

=======================================
--- /trunk/src/mips/lithium-codegen-mips.cc     Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/mips/lithium-codegen-mips.cc     Thu Sep 18 00:05:06 2014 UTC
@@ -4934,11 +4934,12 @@

     __ bind(&check_false);
     __ LoadRoot(at, Heap::kFalseValueRootIndex);
+    __ RecordComment("Deferred TaggedToI: cannot truncate");
     DeoptimizeIf(ne, instr->environment(), scratch2, Operand(at));
     __ Branch(USE_DELAY_SLOT, &done);
     __ mov(input_reg, zero_reg);  // In delay slot.
   } else {
-    // Deoptimize if we don't have a heap number.
+    __ RecordComment("Deferred TaggedToI: not a heap number");
     DeoptimizeIf(ne, instr->environment(), scratch1, Operand(at));

     // Load the double value.
@@ -4954,7 +4955,7 @@
                        except_flag,
                        kCheckForInexactConversion);

-    // Deopt if the operation did not succeed.
+    __ RecordComment("Deferred TaggedToI: lost precision or NaN");
     DeoptimizeIf(ne, instr->environment(), except_flag, Operand(zero_reg));

     if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
@@ -4962,6 +4963,7 @@

       __ Mfhc1(scratch1, double_scratch);
       __ And(scratch1, scratch1, Operand(HeapNumber::kSignMask));
+      __ RecordComment("Deferred TaggedToI: minus zero");
       DeoptimizeIf(ne, instr->environment(), scratch1, Operand(zero_reg));
     }
   }
=======================================
--- /trunk/src/mips64/builtins-mips64.cc        Mon Aug 25 19:57:56 2014 UTC
+++ /trunk/src/mips64/builtins-mips64.cc        Thu Sep 18 00:05:06 2014 UTC
@@ -839,8 +839,8 @@
 }


-void Builtins::Generate_CompileUnoptimized(MacroAssembler* masm) {
-  CallRuntimePassFunction(masm, Runtime::kCompileUnoptimized);
+void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
+  CallRuntimePassFunction(masm, Runtime::kCompileLazy);
   GenerateTailCallToReturnedCode(masm);
 }

=======================================
--- /trunk/src/mips64/lithium-codegen-mips64.cc Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/mips64/lithium-codegen-mips64.cc Thu Sep 18 00:05:06 2014 UTC
@@ -4973,11 +4973,12 @@

     __ bind(&check_false);
     __ LoadRoot(at, Heap::kFalseValueRootIndex);
+    __ RecordComment("Deferred TaggedToI: cannot truncate");
     DeoptimizeIf(ne, instr->environment(), scratch2, Operand(at));
     __ Branch(USE_DELAY_SLOT, &done);
     __ mov(input_reg, zero_reg);  // In delay slot.
   } else {
-    // Deoptimize if we don't have a heap number.
+    __ RecordComment("Deferred TaggedToI: not a heap number");
     DeoptimizeIf(ne, instr->environment(), scratch1, Operand(at));

     // Load the double value.
@@ -4993,7 +4994,7 @@
                        except_flag,
                        kCheckForInexactConversion);

-    // Deopt if the operation did not succeed.
+    __ RecordComment("Deferred TaggedToI: lost precision or NaN");
     DeoptimizeIf(ne, instr->environment(), except_flag, Operand(zero_reg));

     if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
@@ -5001,6 +5002,7 @@

       __ mfhc1(scratch1, double_scratch);  // Get exponent/sign bits.
       __ And(scratch1, scratch1, Operand(HeapNumber::kSignMask));
+      __ RecordComment("Deferred TaggedToI: minus zero");
       DeoptimizeIf(ne, instr->environment(), scratch1, Operand(zero_reg));
     }
   }
=======================================
--- /trunk/src/mips64/simulator-mips64.cc       Tue Sep  9 00:05:04 2014 UTC
+++ /trunk/src/mips64/simulator-mips64.cc       Thu Sep 18 00:05:06 2014 UTC
@@ -1109,9 +1109,9 @@
 }


-uint32_t Simulator::get_fpu_register_hi_word(int fpureg) const {
+int32_t Simulator::get_fpu_register_hi_word(int fpureg) const {
   DCHECK((fpureg >= 0) && (fpureg < kNumFPURegisters));
-  return static_cast<uint32_t>((FPUregisters_[fpureg] >> 32) & 0xffffffff);
+  return static_cast<int32_t>((FPUregisters_[fpureg] >> 32) & 0xffffffff);
 }


=======================================
--- /trunk/src/mips64/simulator-mips64.h        Thu Jul 10 00:04:42 2014 UTC
+++ /trunk/src/mips64/simulator-mips64.h        Thu Sep 18 00:05:06 2014 UTC
@@ -200,7 +200,7 @@
   int64_t get_fpu_register(int fpureg) const;
   int32_t get_fpu_register_word(int fpureg) const;
   int32_t get_fpu_register_signed_word(int fpureg) const;
-  uint32_t get_fpu_register_hi_word(int fpureg) const;
+  int32_t get_fpu_register_hi_word(int fpureg) const;
   float get_fpu_register_float(int fpureg) const;
   double get_fpu_register_double(int fpureg) const;
   void set_fcsr_bit(uint32_t cc, bool value);
=======================================
--- /trunk/src/objects-inl.h    Thu Sep 11 00:05:22 2014 UTC
+++ /trunk/src/objects-inl.h    Thu Sep 18 00:05:06 2014 UTC
@@ -5667,8 +5667,7 @@


 bool SharedFunctionInfo::is_compiled() {
-  return code() !=
-      GetIsolate()->builtins()->builtin(Builtins::kCompileUnoptimized);
+ return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy);
 }


@@ -5942,8 +5941,7 @@


 bool JSFunction::is_compiled() {
-  return code() !=
-      GetIsolate()->builtins()->builtin(Builtins::kCompileUnoptimized);
+ return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy);
 }


=======================================
--- /trunk/src/objects.cc       Wed Sep 17 00:05:08 2014 UTC
+++ /trunk/src/objects.cc       Thu Sep 18 00:05:06 2014 UTC
@@ -13346,23 +13346,24 @@
 // Fill in the names of own properties into the supplied storage. The main
// purpose of this function is to provide reflection information for the object
 // mirrors.
-void JSObject::GetOwnPropertyNames(
-    FixedArray* storage, int index, PropertyAttributes filter) {
+int JSObject::GetOwnPropertyNames(FixedArray* storage, int index,
+                                  PropertyAttributes filter) {
   DCHECK(storage->length() >= (NumberOfOwnProperties(filter) - index));
   if (HasFastProperties()) {
+    int offset = 0;
     int real_size = map()->NumberOfOwnDescriptors();
     DescriptorArray* descs = map()->instance_descriptors();
     for (int i = 0; i < real_size; i++) {
       if ((descs->GetDetails(i).attributes() & filter) == 0 &&
           !FilterKey(descs->GetKey(i), filter)) {
-        storage->set(index++, descs->GetKey(i));
+        storage->set(index + offset, descs->GetKey(i));
+        offset++;
       }
     }
+    return offset;
   } else {
-    property_dictionary()->CopyKeysTo(storage,
-                                      index,
-                                      filter,
-                                      NameDictionary::UNSORTED);
+    return property_dictionary()->CopyKeysTo(storage, index, filter,
+                                             NameDictionary::UNSORTED);
   }
 }

@@ -14055,13 +14056,11 @@
 HashTable<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>::
     Shrink(Handle<SeededNumberDictionary>, uint32_t);

-template void Dictionary<NameDictionary, NameDictionaryShape, Handle<Name>
::
-    CopyKeysTo(
-        FixedArray*,
-        int,
-        PropertyAttributes,
-        Dictionary<
-            NameDictionary, NameDictionaryShape, Handle<Name> >::SortMode);
+template int
+ Dictionary<NameDictionary, NameDictionaryShape, Handle<Name>
::CopyKeysTo(
+        FixedArray*, int, PropertyAttributes,
+        Dictionary<NameDictionary, NameDictionaryShape,
+                   Handle<Name> >::SortMode);

 template int
 Dictionary<NameDictionary, NameDictionaryShape, Handle<Name> >::
@@ -15208,27 +15207,28 @@
 }


-template<typename Derived, typename Shape, typename Key>
-void Dictionary<Derived, Shape, Key>::CopyKeysTo(
-    FixedArray* storage,
-    int index,
-    PropertyAttributes filter,
+template <typename Derived, typename Shape, typename Key>
+int Dictionary<Derived, Shape, Key>::CopyKeysTo(
+    FixedArray* storage, int index, PropertyAttributes filter,
     typename Dictionary<Derived, Shape, Key>::SortMode sort_mode) {
   DCHECK(storage->length() >= NumberOfElementsFilterAttributes(filter));
   int capacity = DerivedHashTable::Capacity();
+  int offset = 0;
   for (int i = 0; i < capacity; i++) {
     Object* k = DerivedHashTable::KeyAt(i);
     if (DerivedHashTable::IsKey(k) && !FilterKey(k, filter)) {
       PropertyDetails details = DetailsAt(i);
       if (details.IsDeleted()) continue;
       PropertyAttributes attr = details.attributes();
-      if ((attr & filter) == 0) storage->set(index++, k);
+      if ((attr & filter) == 0) storage->set(index + offset, k);
+      offset++;
     }
   }
   if (sort_mode == Dictionary::SORTED) {
-    storage->SortPairs(storage, index);
+    storage->SortPairs(storage, index + offset);
   }
-  DCHECK(storage->length() >= index);
+  DCHECK(storage->length() >= index + offset);
+  return offset;
 }


=======================================
***Additional files exist in this changeset.***

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