From df5c259bb2dd791b17592d5b4122303e4ee98eec Mon Sep 17 00:00:00 2001 From: "lrn@chromium.org" Date: Thu, 3 Mar 2011 13:36:31 +0000 Subject: [PATCH] Remove tests for being the normal array constructor from the ArrayConstructCode builtin. Review URL: http://codereview.chromium.org/6613016 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/builtins-arm.cc | 7 ++----- src/x64/builtins-x64.cc | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc index 169bc6b..961d3ce 100644 --- a/src/arm/builtins-arm.cc +++ b/src/arm/builtins-arm.cc @@ -458,11 +458,8 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { Label generic_constructor; if (FLAG_debug_code) { - // The array construct code is only set for the builtin Array function which - // always have a map. - GenerateLoadArrayFunction(masm, r2); - __ cmp(r1, r2); - __ Assert(eq, "Unexpected Array function"); + // The array construct code is only set for the builtin and internal + // Array functions which always have a map. // Initial map for the builtin Array function should be a map. __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); __ tst(r2, Operand(kSmiTagMask)); diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc index 4191792..b545876 100644 --- a/src/x64/builtins-x64.cc +++ b/src/x64/builtins-x64.cc @@ -1280,11 +1280,8 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { Label generic_constructor; if (FLAG_debug_code) { - // The array construct code is only set for the builtin Array function which - // does always have a map. - __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rbx); - __ cmpq(rdi, rbx); - __ Check(equal, "Unexpected Array function"); + // The array construct code is only set for the builtin and internal + // Array functions which always have a map. // Initial map for the builtin Array function should be a map. __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset)); // Will both indicate a NULL and a Smi. -- 2.7.4