From 9739fb0be192fc1c88368e2246e6842029f78dbc Mon Sep 17 00:00:00 2001 From: "mvstanton@chromium.org" Date: Wed, 6 Mar 2013 12:25:42 +0000 Subject: [PATCH] MIPS: A debug code assert needed to be behind the new optimize_constructed_arrays flag. Port r13791 (fe11ffe7) BUG= Review URL: https://codereview.chromium.org/12512002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/builtins-mips.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc index f6365f3..433d3c3 100644 --- a/src/mips/builtins-mips.cc +++ b/src/mips/builtins-mips.cc @@ -572,17 +572,19 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { __ Assert(eq, "Unexpected initial map for Array function (4)", t0, Operand(MAP_TYPE)); - // We should either have undefined in a2 or a valid jsglobalpropertycell - Label okay_here; - Handle undefined_sentinel( - masm->isolate()->heap()->undefined_value(), masm->isolate()); - Handle global_property_cell_map( - masm->isolate()->heap()->global_property_cell_map()); - __ Branch(&okay_here, eq, a2, Operand(undefined_sentinel)); - __ lw(a3, FieldMemOperand(a2, 0)); - __ Assert(eq, "Expected property cell in register a3", - a3, Operand(global_property_cell_map)); - __ bind(&okay_here); + if (FLAG_optimize_constructed_arrays) { + // We should either have undefined in a2 or a valid jsglobalpropertycell + Label okay_here; + Handle undefined_sentinel( + masm->isolate()->heap()->undefined_value(), masm->isolate()); + Handle global_property_cell_map( + masm->isolate()->heap()->global_property_cell_map()); + __ Branch(&okay_here, eq, a2, Operand(undefined_sentinel)); + __ lw(a3, FieldMemOperand(a2, 0)); + __ Assert(eq, "Expected property cell in register a3", + a3, Operand(global_property_cell_map)); + __ bind(&okay_here); + } } if (FLAG_optimize_constructed_arrays) { -- 2.7.4