Pretty printing for array code stubs. The minor keys encode things like specialized ElementsKind for each stub. This can be useful to see in disassembly traces.
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/110103002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3c7aae759b
commit
1dd19c450a
@ -585,6 +585,28 @@ void CallConstructStub::PrintName(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
void ArrayConstructorStub::PrintName(StringStream* stream) {
|
||||
stream->Add("ArrayConstructorStub");
|
||||
switch (argument_count_) {
|
||||
case ANY: stream->Add("_Any"); break;
|
||||
case NONE: stream->Add("_None"); break;
|
||||
case ONE: stream->Add("_One"); break;
|
||||
case MORE_THAN_ONE: stream->Add("_More_Than_One"); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ArrayConstructorStubBase::BasePrintName(const char* name,
|
||||
StringStream* stream) {
|
||||
stream->Add(name);
|
||||
stream->Add("_");
|
||||
stream->Add(ElementsKindToString(elements_kind()));
|
||||
if (override_mode() == DISABLE_ALLOCATION_SITES) {
|
||||
stream->Add("_DISABLE_ALLOCATION_SITES");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ToBooleanStub::UpdateStatus(Handle<Object> object) {
|
||||
Types old_types(types_);
|
||||
bool to_boolean_value = types_.UpdateStatus(object);
|
||||
|
@ -741,6 +741,7 @@ class ArrayConstructorStub: public PlatformCodeStub {
|
||||
private:
|
||||
void GenerateDispatchToArrayStub(MacroAssembler* masm,
|
||||
AllocationSiteOverrideMode mode);
|
||||
virtual void PrintName(StringStream* stream);
|
||||
|
||||
virtual CodeStub::Major MajorKey() { return ArrayConstructor; }
|
||||
virtual int MinorKey() { return argument_count_; }
|
||||
@ -1933,6 +1934,9 @@ class ArrayConstructorStubBase : public HydrogenCodeStub {
|
||||
static const int kConstructor = 0;
|
||||
static const int kPropertyCell = 1;
|
||||
|
||||
protected:
|
||||
void BasePrintName(const char* name, StringStream* stream);
|
||||
|
||||
private:
|
||||
int NotMissMinorKey() { return bit_field_; }
|
||||
|
||||
@ -1968,6 +1972,10 @@ class ArrayNoArgumentConstructorStub : public ArrayConstructorStubBase {
|
||||
private:
|
||||
Major MajorKey() { return ArrayNoArgumentConstructor; }
|
||||
|
||||
virtual void PrintName(StringStream* stream) {
|
||||
BasePrintName("ArrayNoArgumentConstructorStub", stream);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ArrayNoArgumentConstructorStub);
|
||||
};
|
||||
|
||||
@ -1990,6 +1998,10 @@ class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase {
|
||||
private:
|
||||
Major MajorKey() { return ArraySingleArgumentConstructor; }
|
||||
|
||||
virtual void PrintName(StringStream* stream) {
|
||||
BasePrintName("ArraySingleArgumentConstructorStub", stream);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ArraySingleArgumentConstructorStub);
|
||||
};
|
||||
|
||||
@ -2012,6 +2024,10 @@ class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
|
||||
private:
|
||||
Major MajorKey() { return ArrayNArgumentsConstructor; }
|
||||
|
||||
virtual void PrintName(StringStream* stream) {
|
||||
BasePrintName("ArrayNArgumentsConstructorStub", stream);
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user