From: lrn@chromium.org Date: Mon, 9 Aug 2010 12:44:48 +0000 (+0000) Subject: Fix cast that fails to build on Windows. X-Git-Tag: upstream/4.7.83~21398 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df8b3eb7423c7f7464c771a73dcaa4797f0a605f;p=platform%2Fupstream%2Fv8.git Fix cast that fails to build on Windows. Review URL: http://codereview.chromium.org/3044055 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc index 6ab0464..ba7785b 100644 --- a/src/ia32/codegen-ia32.cc +++ b/src/ia32/codegen-ia32.cc @@ -7594,9 +7594,7 @@ void CodeGenerator::GenerateIsRegExpEquivalent(ZoneList* args) { __ and_(Operand(tmp), right); __ test(Operand(tmp), Immediate(kSmiTagMask)); destination()->false_target()->Branch(equal); - __ mov(tmp, FieldOperand(left, HeapObject::kMapOffset)); - __ cmpb(FieldOperand(tmp, Map::kInstanceTypeOffset), - static_cast(JS_REGEXP_TYPE)); + __ CmpObjectType(left, JS_REGEXP_TYPE, tmp); destination()->false_target()->Branch(not_equal); __ cmp(tmp, FieldOperand(right, HeapObject::kMapOffset)); destination()->false_target()->Branch(not_equal); diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc index d68d8cc..eb944e6 100644 --- a/src/ia32/full-codegen-ia32.cc +++ b/src/ia32/full-codegen-ia32.cc @@ -2696,9 +2696,7 @@ void FullCodeGenerator::EmitIsRegExpEquivalent(ZoneList* args) { __ and_(Operand(tmp), right); __ test(Operand(tmp), Immediate(kSmiTagMask)); __ j(zero, &fail); - __ mov(tmp, FieldOperand(left, HeapObject::kMapOffset)); - __ cmpb(FieldOperand(tmp, Map::kInstanceTypeOffset), - static_cast(JS_REGEXP_TYPE)); + __ CmpObjectType(left, JS_REGEXP_TYPE, tmp); __ j(not_equal, &fail); __ cmp(tmp, FieldOperand(right, HeapObject::kMapOffset)); __ j(not_equal, &fail);