Version 3.3.9.

Added DateTimeFormat class to experimental i18n API.

Extended preparser to give early errors for some strict mode restrictions.

Removed legacy execScript function from V8.

Extended isolate API with the ability to add embedder-specific data to an isolate.

Added basic support for polymorphic loads from JS and external arrays.

Fixed bug in handling of switch statements in the optimizing compiler.



git-svn-id: http://v8.googlecode.com/svn/trunk@7972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/test/cctest/test-alloc.cc b/test/cctest/test-alloc.cc
index 0ccf4b8..4d9c218 100644
--- a/test/cctest/test-alloc.cc
+++ b/test/cctest/test-alloc.cc
@@ -139,11 +139,11 @@
   // Patch the map to have an accessor for "get".
   Handle<Map> map(function->initial_map());
   Handle<DescriptorArray> instance_descriptors(map->instance_descriptors());
-  Handle<Proxy> proxy = FACTORY->NewProxy(&kDescriptor);
-  instance_descriptors = FACTORY->CopyAppendProxyDescriptor(
+  Handle<Foreign> foreign = FACTORY->NewForeign(&kDescriptor);
+  instance_descriptors = FACTORY->CopyAppendForeignDescriptor(
       instance_descriptors,
       FACTORY->NewStringFromAscii(Vector<const char>("get", 3)),
-      proxy,
+      foreign,
       static_cast<PropertyAttributes>(0));
   map->set_instance_descriptors(*instance_descriptors);
   // Add the Foo constructor the global object.
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index e9d77ec..1121210 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -14431,8 +14431,6 @@
   CHECK_EQ(42, result->Int32Value());
   result = CompileRun("(function(e) { return e('42'); })(eval)");
   CHECK_EQ(42, result->Int32Value());
-  result = CompileRun("execScript('42')");
-  CHECK(!result.IsEmpty());
   result = CompileRun("var f = new Function('return 42'); f()");
   CHECK_EQ(42, result->Int32Value());
 }
@@ -14451,11 +14449,6 @@
   CHECK(try_catch.HasCaught());
   try_catch.Reset();
 
-  result = CompileRun("execScript('42')");
-  CHECK(result.IsEmpty());
-  CHECK(try_catch.HasCaught());
-  try_catch.Reset();
-
   result = CompileRun("var f = new Function('return 42'); f()");
   CHECK(result.IsEmpty());
   CHECK(try_catch.HasCaught());
@@ -14478,10 +14471,10 @@
   v8::HandleScope scope;
   LocalContext context;
 
-  // eval, execScript and the Function constructor allowed by default.
+  // eval and the Function constructor allowed by default.
   CheckCodeGenerationAllowed();
 
-  // Disallow eval, execScript and the Function constructor.
+  // Disallow eval and the Function constructor.
   context->AllowCodeGenerationFromStrings(false);
   CheckCodeGenerationDisallowed();
 
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 749ac15..beb73c5 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -26,9 +26,6 @@
   ProfileGenerator generator(&profiles);
   ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
   processor.Start();
-  while (!processor.running()) {
-    i::Thread::YieldCPU();
-  }
   processor.Stop();
   processor.Join();
 }
@@ -90,9 +87,6 @@
   ProfileGenerator generator(&profiles);
   ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
   processor.Start();
-  while (!processor.running()) {
-    i::Thread::YieldCPU();
-  }
 
   // Enqueue code creation events.
   i::HandleScope scope;
@@ -154,9 +148,6 @@
   ProfileGenerator generator(&profiles);
   ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
   processor.Start();
-  while (!processor.running()) {
-    i::Thread::YieldCPU();
-  }
 
   processor.CodeCreateEvent(i::Logger::BUILTIN_TAG,
                             "bbb",
@@ -238,6 +229,46 @@
 }
 
 
+// http://code.google.com/p/v8/issues/detail?id=1398
+// Long stacks (exceeding max frames limit) must not be erased.
+TEST(Issue1398) {
+  TestSetup test_setup;
+  CpuProfilesCollection profiles;
+  profiles.StartProfiling("", 1);
+  ProfileGenerator generator(&profiles);
+  ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
+  processor.Start();
+
+  processor.CodeCreateEvent(i::Logger::BUILTIN_TAG,
+                            "bbb",
+                            ToAddress(0x1200),
+                            0x80);
+
+  i::TickSample* sample = processor.TickSampleEvent();
+  sample->pc = ToAddress(0x1200);
+  sample->tos = 0;
+  sample->frames_count = i::TickSample::kMaxFramesCount;
+  for (int i = 0; i < sample->frames_count; ++i) {
+    sample->stack[i] = ToAddress(0x1200);
+  }
+
+  processor.Stop();
+  processor.Join();
+  CpuProfile* profile =
+      profiles.StopProfiling(TokenEnumerator::kNoSecurityToken, "", 1);
+  CHECK_NE(NULL, profile);
+
+  int actual_depth = 0;
+  const ProfileNode* node = profile->top_down()->root();
+  while (node->children()->length() > 0) {
+    node = node->children()->last();
+    ++actual_depth;
+  }
+
+  CHECK_EQ(1 + i::TickSample::kMaxFramesCount, actual_depth);  // +1 for PC.
+}
+
+
 TEST(DeleteAllCpuProfiles) {
   InitializeVM();
   TestSetup test_setup;