Fix crashes in debug output of generated stubs
R=jkummerow@chromium.org Review URL: https://chromiumcodereview.appspot.com/11464027 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3f83e10f44
commit
e797e5a489
@ -1031,9 +1031,11 @@ void HChange::PrintDataTo(StringStream* stream) {
|
||||
|
||||
void HJSArrayLength::PrintDataTo(StringStream* stream) {
|
||||
value()->PrintNameTo(stream);
|
||||
if (HasTypeCheck()) {
|
||||
stream->Add(" ");
|
||||
typecheck()->PrintNameTo(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HValue* HUnaryMathOperation::Canonicalize() {
|
||||
@ -1144,9 +1146,11 @@ void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) {
|
||||
|
||||
void HLoadElements::PrintDataTo(StringStream* stream) {
|
||||
value()->PrintNameTo(stream);
|
||||
if (HasTypeCheck()) {
|
||||
stream->Add(" ");
|
||||
typecheck()->PrintNameTo(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HCheckMaps::PrintDataTo(StringStream* stream) {
|
||||
@ -2028,7 +2032,11 @@ void HLoadKeyed::PrintDataTo(StringStream* stream) {
|
||||
stream->Add("]");
|
||||
}
|
||||
|
||||
if (HasDependency()) {
|
||||
stream->Add(" ");
|
||||
dependency()->PrintNameTo(stream);
|
||||
}
|
||||
|
||||
if (RequiresHoleCheck()) {
|
||||
stream->Add(" check_hole");
|
||||
}
|
||||
|
@ -1937,7 +1937,7 @@ class HJSArrayLength: public HTemplateInstruction<2> {
|
||||
// object. It is guaranteed to be 32 bit integer, but it can be
|
||||
// represented as either a smi or heap number.
|
||||
SetOperandAt(0, value);
|
||||
SetOperandAt(1, typecheck);
|
||||
SetOperandAt(1, typecheck != NULL ? typecheck : value);
|
||||
set_representation(Representation::Tagged());
|
||||
SetFlag(kUseGVN);
|
||||
SetGVNFlag(kDependsOnArrayLengths);
|
||||
@ -1951,7 +1951,11 @@ class HJSArrayLength: public HTemplateInstruction<2> {
|
||||
virtual void PrintDataTo(StringStream* stream);
|
||||
|
||||
HValue* value() { return OperandAt(0); }
|
||||
HValue* typecheck() { return OperandAt(1); }
|
||||
HValue* typecheck() {
|
||||
ASSERT(HasTypeCheck());
|
||||
return OperandAt(1);
|
||||
}
|
||||
bool HasTypeCheck() const { return OperandAt(0) != OperandAt(1); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(JSArrayLength)
|
||||
|
||||
@ -2152,14 +2156,18 @@ class HLoadElements: public HTemplateInstruction<2> {
|
||||
public:
|
||||
HLoadElements(HValue* value, HValue* typecheck) {
|
||||
SetOperandAt(0, value);
|
||||
SetOperandAt(1, typecheck);
|
||||
SetOperandAt(1, typecheck != NULL ? typecheck : value);
|
||||
set_representation(Representation::Tagged());
|
||||
SetFlag(kUseGVN);
|
||||
SetGVNFlag(kDependsOnElementsPointer);
|
||||
}
|
||||
|
||||
HValue* value() { return OperandAt(0); }
|
||||
HValue* typecheck() { return OperandAt(1); }
|
||||
HValue* typecheck() {
|
||||
ASSERT(HasTypeCheck());
|
||||
return OperandAt(1);
|
||||
}
|
||||
bool HasTypeCheck() const { return OperandAt(0) != OperandAt(1); }
|
||||
|
||||
virtual void PrintDataTo(StringStream* stream);
|
||||
|
||||
@ -4366,7 +4374,7 @@ class HLoadKeyed
|
||||
|
||||
SetOperandAt(0, obj);
|
||||
SetOperandAt(1, key);
|
||||
SetOperandAt(2, dependency);
|
||||
SetOperandAt(2, dependency != NULL ? dependency : obj);
|
||||
|
||||
if (!is_external()) {
|
||||
// I can detect the case between storing double (holey and fast) and
|
||||
@ -4407,7 +4415,11 @@ class HLoadKeyed
|
||||
}
|
||||
HValue* elements() { return OperandAt(0); }
|
||||
HValue* key() { return OperandAt(1); }
|
||||
HValue* dependency() { return OperandAt(2); }
|
||||
HValue* dependency() {
|
||||
ASSERT(HasDependency());
|
||||
return OperandAt(2);
|
||||
}
|
||||
bool HasDependency() const { return OperandAt(0) != OperandAt(2); }
|
||||
uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); }
|
||||
void SetIndexOffset(uint32_t index_offset) {
|
||||
bit_field_ = IndexOffsetField::update(bit_field_, index_offset);
|
||||
|
Loading…
Reference in New Issue
Block a user