Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: src/mips/builtins-mips.cc

Issue 12512002: MIPS: A debug code assert needed to be behind the new optimize_constructed_arrays flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 // Array functions which always have a map. 565 // Array functions which always have a map.
566 // Initial map for the builtin Array function should be a map. 566 // Initial map for the builtin Array function should be a map.
567 __ lw(a3, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset)); 567 __ lw(a3, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset));
568 __ And(t0, a3, Operand(kSmiTagMask)); 568 __ And(t0, a3, Operand(kSmiTagMask));
569 __ Assert(ne, "Unexpected initial map for Array function (3)", 569 __ Assert(ne, "Unexpected initial map for Array function (3)",
570 t0, Operand(zero_reg)); 570 t0, Operand(zero_reg));
571 __ GetObjectType(a1, a3, t0); 571 __ GetObjectType(a1, a3, t0);
572 __ Assert(eq, "Unexpected initial map for Array function (4)", 572 __ Assert(eq, "Unexpected initial map for Array function (4)",
573 t0, Operand(MAP_TYPE)); 573 t0, Operand(MAP_TYPE));
574 574
575 // We should either have undefined in a2 or a valid jsglobalpropertycell 575 if (FLAG_optimize_constructed_arrays) {
576 Label okay_here; 576 // We should either have undefined in a2 or a valid jsglobalpropertycell
577 Handle<Object> undefined_sentinel( 577 Label okay_here;
578 masm->isolate()->heap()->undefined_value(), masm->isolate()); 578 Handle<Object> undefined_sentinel(
579 Handle<Map> global_property_cell_map( 579 masm->isolate()->heap()->undefined_value(), masm->isolate());
580 masm->isolate()->heap()->global_property_cell_map()); 580 Handle<Map> global_property_cell_map(
581 __ Branch(&okay_here, eq, a2, Operand(undefined_sentinel)); 581 masm->isolate()->heap()->global_property_cell_map());
582 __ lw(a3, FieldMemOperand(a2, 0)); 582 __ Branch(&okay_here, eq, a2, Operand(undefined_sentinel));
583 __ Assert(eq, "Expected property cell in register a3", 583 __ lw(a3, FieldMemOperand(a2, 0));
584 a3, Operand(global_property_cell_map)); 584 __ Assert(eq, "Expected property cell in register a3",
585 __ bind(&okay_here); 585 a3, Operand(global_property_cell_map));
586 __ bind(&okay_here);
587 }
586 } 588 }
587 589
588 if (FLAG_optimize_constructed_arrays) { 590 if (FLAG_optimize_constructed_arrays) {
589 Label not_zero_case, not_one_case; 591 Label not_zero_case, not_one_case;
590 __ Branch(&not_zero_case, ne, a0, Operand(zero_reg)); 592 __ Branch(&not_zero_case, ne, a0, Operand(zero_reg));
591 ArrayNoArgumentConstructorStub no_argument_stub; 593 ArrayNoArgumentConstructorStub no_argument_stub;
592 __ TailCallStub(&no_argument_stub); 594 __ TailCallStub(&no_argument_stub);
593 595
594 __ bind(&not_zero_case); 596 __ bind(&not_zero_case);
595 __ Branch(&not_one_case, gt, a0, Operand(1)); 597 __ Branch(&not_one_case, gt, a0, Operand(1));
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 __ bind(&dont_adapt_arguments); 1930 __ bind(&dont_adapt_arguments);
1929 __ Jump(a3); 1931 __ Jump(a3);
1930 } 1932 }
1931 1933
1932 1934
1933 #undef __ 1935 #undef __
1934 1936
1935 } } // namespace v8::internal 1937 } } // namespace v8::internal
1936 1938
1937 #endif // V8_TARGET_ARCH_MIPS 1939 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698