trace compare_nil_ic state in --trace-ic output
BUG= R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/15735020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2a28f53b18
commit
2952a77d0b
@ -434,6 +434,23 @@ void CompareNilICStub::Record(Handle<Object> object) {
|
||||
}
|
||||
|
||||
|
||||
void CompareNilICStub::Types::TraceTransition(Types to) const {
|
||||
#ifdef DEBUG
|
||||
if (!FLAG_trace_ic) return;
|
||||
char buffer[100];
|
||||
NoAllocationStringAllocator allocator(buffer,
|
||||
static_cast<unsigned>(sizeof(buffer)));
|
||||
StringStream stream(&allocator);
|
||||
stream.Add("[CompareNilIC : ");
|
||||
Print(&stream);
|
||||
stream.Add("=>");
|
||||
to.Print(&stream);
|
||||
stream.Add("]\n");
|
||||
stream.OutputToStdOut();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void CompareNilICStub::PrintName(StringStream* stream) {
|
||||
stream->Add("CompareNilICStub_");
|
||||
types_.Print(stream);
|
||||
@ -578,17 +595,19 @@ void ToBooleanStub::Types::Print(StringStream* stream) const {
|
||||
|
||||
|
||||
void ToBooleanStub::Types::TraceTransition(Types to) const {
|
||||
#ifdef DEBUG
|
||||
if (!FLAG_trace_ic) return;
|
||||
char buffer[100];
|
||||
NoAllocationStringAllocator allocator(buffer,
|
||||
static_cast<unsigned>(sizeof(buffer)));
|
||||
StringStream stream(&allocator);
|
||||
stream.Add("[ToBooleanIC (");
|
||||
stream.Add("[ToBooleanIC : ");
|
||||
Print(&stream);
|
||||
stream.Add("->");
|
||||
stream.Add("=>");
|
||||
to.Print(&stream);
|
||||
stream.Add(")]\n");
|
||||
stream.Add("]\n");
|
||||
stream.OutputToStdOut();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1084,6 +1084,7 @@ class CompareNilICStub : public HydrogenCodeStub {
|
||||
}
|
||||
|
||||
void Print(StringStream* stream) const;
|
||||
void TraceTransition(Types to) const;
|
||||
};
|
||||
|
||||
// At most 6 different types can be distinguished, because the Code object
|
||||
|
@ -2928,7 +2928,9 @@ MaybeObject* CompareNilIC::CompareNil(Handle<Object> object) {
|
||||
// types must be supported as a result of the miss.
|
||||
bool already_monomorphic = stub.IsMonomorphic();
|
||||
|
||||
CompareNilICStub::Types old_types = stub.GetTypes();
|
||||
stub.Record(object);
|
||||
old_types.TraceTransition(stub.GetTypes());
|
||||
|
||||
EqualityKind kind = stub.GetKind();
|
||||
NilValue nil = stub.GetNilValue();
|
||||
|
Loading…
Reference in New Issue
Block a user