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,6 +557,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { ...@@ -557,6 +557,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ CompareObjectType(r1, r3, r4, MAP_TYPE); __ CompareObjectType(r1, r3, r4, MAP_TYPE);
__ Assert(eq, "Unexpected initial map for Array function"); __ Assert(eq, "Unexpected initial map for Array function");
if (FLAG_optimize_constructed_arrays) {
// We should either have undefined in r2 or a valid jsglobalpropertycell // We should either have undefined in r2 or a valid jsglobalpropertycell
Label okay_here; Label okay_here;
Handle<Object> undefined_sentinel( Handle<Object> undefined_sentinel(
...@@ -570,6 +571,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { ...@@ -570,6 +571,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ Assert(eq, "Expected property cell in register ebx"); __ Assert(eq, "Expected property cell in register ebx");
__ bind(&okay_here); __ bind(&okay_here);
} }
}
if (FLAG_optimize_constructed_arrays) { if (FLAG_optimize_constructed_arrays) {
Label not_zero_case, not_one_case; Label not_zero_case, not_one_case;
......
...@@ -1496,6 +1496,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { ...@@ -1496,6 +1496,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ CmpObjectType(ecx, MAP_TYPE, ecx); __ CmpObjectType(ecx, MAP_TYPE, ecx);
__ Assert(equal, "Unexpected initial map for Array function"); __ Assert(equal, "Unexpected initial map for Array function");
if (FLAG_optimize_constructed_arrays) {
// We should either have undefined in ebx or a valid jsglobalpropertycell // We should either have undefined in ebx or a valid jsglobalpropertycell
Label okay_here; Label okay_here;
Handle<Object> undefined_sentinel( Handle<Object> undefined_sentinel(
...@@ -1508,6 +1509,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { ...@@ -1508,6 +1509,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ Assert(equal, "Expected property cell in register ebx"); __ Assert(equal, "Expected property cell in register ebx");
__ bind(&okay_here); __ bind(&okay_here);
} }
}
if (FLAG_optimize_constructed_arrays) { if (FLAG_optimize_constructed_arrays) {
Label not_zero_case, not_one_case; Label not_zero_case, not_one_case;
......
...@@ -1524,6 +1524,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { ...@@ -1524,6 +1524,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ CmpObjectType(rcx, MAP_TYPE, rcx); __ CmpObjectType(rcx, MAP_TYPE, rcx);
__ Check(equal, "Unexpected initial map for Array function"); __ Check(equal, "Unexpected initial map for Array function");
if (FLAG_optimize_constructed_arrays) {
// We should either have undefined in ebx or a valid jsglobalpropertycell // We should either have undefined in ebx or a valid jsglobalpropertycell
Label okay_here; Label okay_here;
Handle<Object> undefined_sentinel( Handle<Object> undefined_sentinel(
...@@ -1536,6 +1537,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { ...@@ -1536,6 +1537,7 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
__ Assert(equal, "Expected property cell in register rbx"); __ Assert(equal, "Expected property cell in register rbx");
__ bind(&okay_here); __ bind(&okay_here);
} }
}
if (FLAG_optimize_constructed_arrays) { if (FLAG_optimize_constructed_arrays) {
Label not_zero_case, not_one_case; Label not_zero_case, not_one_case;
......
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