Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index b4374360c60ebbbe7ceb86a6cf0a6644eb4352ae..cfbb815f8448f40acb6a60ad7f4a5049a22eae55 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -139,47 +139,6 @@ Handle<Code> CodeStub::GetCode() { |
} |
-MaybeObject* CodeStub::TryGetCode() { |
- Code* code; |
- if (!FindCodeInCache(&code)) { |
- // Generate the new code. |
- MacroAssembler masm(Isolate::Current(), NULL, 256); |
- GenerateCode(&masm); |
- Heap* heap = masm.isolate()->heap(); |
- |
- // Create the code object. |
- CodeDesc desc; |
- masm.GetCode(&desc); |
- |
- // Try to copy the generated code into a heap object. |
- Code::Flags flags = Code::ComputeFlags( |
- static_cast<Code::Kind>(GetCodeKind()), |
- GetICState()); |
- Object* new_object; |
- { MaybeObject* maybe_new_object = |
- heap->CreateCode(desc, flags, masm.CodeObject()); |
- if (!maybe_new_object->ToObject(&new_object)) return maybe_new_object; |
- } |
- code = Code::cast(new_object); |
- RecordCodeGeneration(code, &masm); |
- FinishCode(code); |
- |
- // Try to update the code cache but do not fail if unable. |
- MaybeObject* maybe_new_object = |
- heap->code_stubs()->AtNumberPut(GetKey(), code); |
- if (maybe_new_object->ToObject(&new_object)) { |
- heap->public_set_code_stubs(NumberDictionary::cast(new_object)); |
- } else if (MustBeInStubCache()) { |
- return maybe_new_object; |
- } |
- |
- Activate(code); |
- } |
- |
- return code; |
-} |
- |
- |
const char* CodeStub::MajorName(CodeStub::Major major_key, |
bool allow_unknown_keys) { |
switch (major_key) { |