Index: src/code-stubs.cc |
=================================================================== |
--- src/code-stubs.cc (revision 3626) |
+++ src/code-stubs.cc (working copy) |
@@ -78,6 +78,16 @@ |
} |
+int CodeStub::GetCodeKind() { |
+ return Code::STUB; |
+} |
+ |
+ |
+int CodeStub::GetICState() { |
+ return UNINITIALIZED; |
+} |
+ |
+ |
Handle<Code> CodeStub::GetCode() { |
Code* code; |
if (!FindCodeInCache(&code)) { |
@@ -92,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(), |
+ static_cast<InlineCacheState>(GetICState())); |
Handle<Code> new_object = |
Factory::NewCode(desc, NULL, flags, masm.CodeObject()); |
RecordCodeGeneration(*new_object, &masm); |
@@ -127,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(), |
+ static_cast<InlineCacheState>(GetICState())); |
Object* new_object = |
Heap::CreateCode(desc, NULL, flags, masm.CodeObject()); |
if (new_object->IsFailure()) return new_object; |