Index: src/code-stubs.cc |
=================================================================== |
--- src/code-stubs.cc (revision 3980) |
+++ src/code-stubs.cc (working copy) |
@@ -83,6 +83,11 @@ |
} |
+int CodeStub::GetCodeKind() { |
+ return Code::STUB; |
+} |
+ |
+ |
Handle<Code> CodeStub::GetCode() { |
Code* code; |
if (!FindCodeInCache(&code)) { |
@@ -97,7 +102,10 @@ |
masm.GetCode(&desc); |
// Copy the generated code into a heap object. |
- Code::Flags flags = Code::ComputeFlags(Code::STUB, InLoop()); |
+ Code::Flags flags = Code::ComputeFlags( |
+ static_cast<Code::Kind>(GetCodeKind()), |
+ InLoop(), |
+ GetICState()); |
Handle<Code> new_object = |
Factory::NewCode(desc, NULL, flags, masm.CodeObject()); |
RecordCodeGeneration(*new_object, &masm); |
@@ -132,7 +140,10 @@ |
masm.GetCode(&desc); |
// Try to copy the generated code into a heap object. |
- Code::Flags flags = Code::ComputeFlags(Code::STUB, InLoop()); |
+ Code::Flags flags = Code::ComputeFlags( |
+ static_cast<Code::Kind>(GetCodeKind()), |
+ InLoop(), |
+ GetICState()); |
Object* new_object = |
Heap::CreateCode(desc, NULL, flags, masm.CodeObject()); |
if (new_object->IsFailure()) return new_object; |