Fulfill some code serializer related TODOs.
R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/606083004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
321dad9b8e
commit
2134c5c0ba
@ -271,8 +271,6 @@ 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);
|
||||
|
@ -105,9 +105,6 @@ 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();
|
||||
@ -224,9 +221,8 @@ void CodeStub::Dispatch(Isolate* isolate, uint32_t key, void** value_out,
|
||||
CODE_STUB_LIST(DEF_CASE)
|
||||
#undef DEF_CASE
|
||||
case NUMBER_OF_IDS:
|
||||
UNREACHABLE();
|
||||
case NoCache:
|
||||
*value_out = NULL;
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -463,8 +463,8 @@ Handle<Code> LChunk::Codegen() {
|
||||
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();
|
||||
|
@ -1985,6 +1985,7 @@ void CodeSerializer::SerializeCodeStub(Code* stub, HowToCode how_to_code,
|
||||
(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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user