Reviewers: mvstanton,

Description:
Flag for serialization when compiling code stubs if --serialize-toplevel.

[email protected]
BUG=v8:3465
LOG=N

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

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+5, -4 lines):
  M src/code-stubs.cc
  M src/code-stubs-hydrogen.cc
  M src/compiler.h
  M test/cctest/cctest.status


Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 27d34b4415353156250c348fbdbf76117c438714..c48317a49542430446740bfef0c05d86d34e1987 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -270,6 +270,8 @@ static Handle<Code> DoGenerateCode(Stub* stub) {
   }
   CodeStubGraphBuilder<Stub> builder(isolate, stub);
   LChunk* chunk = OptimizeGraph(builder.CreateGraph());
+  // TODO(yangguo) remove this once the code serializer handles code stubs.
+  if (FLAG_serialize_toplevel) chunk->info()->PrepareForSerializing();
   Handle<Code> code = chunk->Codegen();
   if (FLAG_profile_hydrogen_code_stub_compilation) {
     OFStream os(stdout);
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index ed0310e37d6db2f0d1197b8687dcc8327f17d5f2..efbd40c42467e86a13f8a1005e9c6a3c8d5411c2 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -149,6 +149,9 @@ Handle<Code> PlatformCodeStub::GenerateCode() {
   // Generate the new code.
   MacroAssembler masm(isolate(), NULL, 256);

+  // TODO(yangguo) remove this once the code serializer handles code stubs.
+  if (FLAG_serialize_toplevel) masm.enable_serializer();
+
   {
     // Update the static counter each time a new code stub is generated.
     isolate()->counters()->code_stubs()->Increment();
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 57c8baa710cce26504cbe3c3b0b6b6fab195f899..6b0bb1b658d9d4d3921c88e45791945ee7705284 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -184,7 +184,6 @@ class CompilationInfo {
   }

   void PrepareForSerializing() {
-    ASSERT(!is_lazy());
     flags_ |= PrepareForSerializing::encode(true);
   }

Index: test/cctest/cctest.status
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index 25d5711c5e6dc0cea13dd7db477bd7a6d219bfc2..e1d93b230c9d5b3bb1b4da48294fb96e3186f327 100644
--- a/test/cctest/cctest.status
+++ b/test/cctest/cctest.status
@@ -32,9 +32,6 @@

##############################################################################

-  # BUG(3465): SerializeToplevelIsolates crashes.
-  'test-serialize/SerializeToplevelIsolates': [SKIP],
-
   # BUG(382): Weird test. Can't guarantee that it never times out.
   'test-api/ApplyInterruption': [PASS, TIMEOUT],



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