Revision: 24377
Author:   yang...@chromium.org
Date:     Thu Oct  2 07:04:28 2014 UTC
Log:      Fulfill some code serializer related TODOs.

R=mvstan...@chromium.org

Review URL: https://codereview.chromium.org/606083004
https://code.google.com/p/v8/source/detail?r=24377

Modified:
 /branches/bleeding_edge/src/code-stubs-hydrogen.cc
 /branches/bleeding_edge/src/code-stubs.cc
 /branches/bleeding_edge/src/lithium.cc
 /branches/bleeding_edge/src/serialize.cc

=======================================
--- /branches/bleeding_edge/src/code-stubs-hydrogen.cc Tue Sep 30 14:54:14 2014 UTC +++ /branches/bleeding_edge/src/code-stubs-hydrogen.cc Thu Oct 2 07:04:28 2014 UTC
@@ -271,8 +271,6 @@
   }
   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);
=======================================
--- /branches/bleeding_edge/src/code-stubs.cc   Tue Sep 30 14:54:14 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.cc   Thu Oct  2 07:04:28 2014 UTC
@@ -105,9 +105,6 @@
   // 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();
@@ -224,9 +221,8 @@
     CODE_STUB_LIST(DEF_CASE)
 #undef DEF_CASE
     case NUMBER_OF_IDS:
+    case NoCache:
       UNREACHABLE();
-    case NoCache:
-      *value_out = NULL;
       break;
   }
 }
=======================================
--- /branches/bleeding_edge/src/lithium.cc      Wed Sep 24 07:08:27 2014 UTC
+++ /branches/bleeding_edge/src/lithium.cc      Thu Oct  2 07:04:28 2014 UTC
@@ -463,8 +463,8 @@
   LOG_CODE_EVENT(info()->isolate(),
                  CodeStartLinePosInfoRecordEvent(
                      assembler.positions_recorder()));
-  // TODO(yangguo) remove this once the code serializer handles code stubs.
-  if (info()->will_serialize()) assembler.enable_serializer();
+  // Code serializer only takes unoptimized code.
+  DCHECK(!info()->will_serialize());
   LCodeGen generator(this, &assembler, info());

   MarkEmptyBlocks();
=======================================
--- /branches/bleeding_edge/src/serialize.cc    Mon Sep 29 07:53:22 2014 UTC
+++ /branches/bleeding_edge/src/serialize.cc    Thu Oct  2 07:04:28 2014 UTC
@@ -1985,6 +1985,7 @@
          (how_to_code == kFromCode && where_to_point == kInnerPointer));
   uint32_t stub_key = stub->stub_key();
   DCHECK(CodeStub::MajorKeyFromKey(stub_key) != CodeStub::NoCache);
+  DCHECK(!CodeStub::GetCode(isolate(), stub_key).is_null());

   int index = AddCodeStubKey(stub_key) + kCodeStubsBaseIndex;

--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to