A debug code assert needed to be behind the new optimize_constructed_arrays flag.

BUG=

Review URL: https://codereview.chromium.org/12385050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c4caf766
......@@ -557,18 +557,20 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ CompareObjectType(r1, r3, r4, MAP_TYPE);
__ Assert(eq, "Unexpected initial map for Array function");
// We should either have undefined in r2 or a valid jsglobalpropertycell
Label okay_here;
Handle<Object> undefined_sentinel(
masm->isolate()->heap()->undefined_value(), masm->isolate());
Handle<Map> global_property_cell_map(
masm->isolate()->heap()->global_property_cell_map());
__ cmp(r2, Operand(undefined_sentinel));
__ b(eq, &okay_here);
__ ldr(r3, FieldMemOperand(r2, 0));
__ cmp(r3, Operand(global_property_cell_map));
__ Assert(eq, "Expected property cell in register ebx");
__ bind(&okay_here);
if (FLAG_optimize_constructed_arrays) {
// We should either have undefined in r2 or a valid jsglobalpropertycell
Label okay_here;
Handle<Object> undefined_sentinel(
masm->isolate()->heap()->undefined_value(), masm->isolate());
Handle<Map> global_property_cell_map(
masm->isolate()->heap()->global_property_cell_map());
__ cmp(r2, Operand(undefined_sentinel));
__ b(eq, &okay_here);
__ ldr(r3, FieldMemOperand(r2, 0));
__ cmp(r3, Operand(global_property_cell_map));
__ Assert(eq, "Expected property cell in register ebx");
__ bind(&okay_here);
}
}
if (FLAG_optimize_constructed_arrays) {
......
......@@ -1496,17 +1496,19 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ CmpObjectType(ecx, MAP_TYPE, ecx);
__ Assert(equal, "Unexpected initial map for Array function");
// We should either have undefined in ebx or a valid jsglobalpropertycell
Label okay_here;
Handle<Object> undefined_sentinel(
masm->isolate()->heap()->undefined_value(), masm->isolate());
Handle<Map> global_property_cell_map(
masm->isolate()->heap()->global_property_cell_map());
__ cmp(ebx, Immediate(undefined_sentinel));
__ j(equal, &okay_here);
__ cmp(FieldOperand(ebx, 0), Immediate(global_property_cell_map));
__ Assert(equal, "Expected property cell in register ebx");
__ bind(&okay_here);
if (FLAG_optimize_constructed_arrays) {
// We should either have undefined in ebx or a valid jsglobalpropertycell
Label okay_here;
Handle<Object> undefined_sentinel(
masm->isolate()->heap()->undefined_value(), masm->isolate());
Handle<Map> global_property_cell_map(
masm->isolate()->heap()->global_property_cell_map());
__ cmp(ebx, Immediate(undefined_sentinel));
__ j(equal, &okay_here);
__ cmp(FieldOperand(ebx, 0), Immediate(global_property_cell_map));
__ Assert(equal, "Expected property cell in register ebx");
__ bind(&okay_here);
}
}
if (FLAG_optimize_constructed_arrays) {
......
......@@ -1524,17 +1524,19 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ CmpObjectType(rcx, MAP_TYPE, rcx);
__ Check(equal, "Unexpected initial map for Array function");
// We should either have undefined in ebx or a valid jsglobalpropertycell
Label okay_here;
Handle<Object> undefined_sentinel(
masm->isolate()->factory()->undefined_value());
Handle<Map> global_property_cell_map(
masm->isolate()->heap()->global_property_cell_map());
__ Cmp(rbx, undefined_sentinel);
__ j(equal, &okay_here);
__ Cmp(FieldOperand(rbx, 0), global_property_cell_map);
__ Assert(equal, "Expected property cell in register rbx");
__ bind(&okay_here);
if (FLAG_optimize_constructed_arrays) {
// We should either have undefined in ebx or a valid jsglobalpropertycell
Label okay_here;
Handle<Object> undefined_sentinel(
masm->isolate()->factory()->undefined_value());
Handle<Map> global_property_cell_map(
masm->isolate()->heap()->global_property_cell_map());
__ Cmp(rbx, undefined_sentinel);
__ j(equal, &okay_here);
__ Cmp(FieldOperand(rbx, 0), global_property_cell_map);
__ Assert(equal, "Expected property cell in register rbx");
__ bind(&okay_here);
}
}
if (FLAG_optimize_constructed_arrays) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment