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

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

Issue 12385050: 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: Fix including platforms 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 | src/ia32/builtins-ia32.cc » ('j') | 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 if (FLAG_debug_code) { 550 if (FLAG_debug_code) {
551 // The array construct code is only set for the builtin and internal 551 // The array construct code is only set for the builtin and internal
552 // Array functions which always have a map. 552 // Array functions which always have a map.
553 // Initial map for the builtin Array function should be a map. 553 // Initial map for the builtin Array function should be a map.
554 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); 554 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset));
555 __ tst(r3, Operand(kSmiTagMask)); 555 __ tst(r3, Operand(kSmiTagMask));
556 __ Assert(ne, "Unexpected initial map for Array function"); 556 __ Assert(ne, "Unexpected initial map for Array function");
557 __ CompareObjectType(r1, r3, r4, MAP_TYPE); 557 __ CompareObjectType(r1, r3, r4, MAP_TYPE);
558 __ Assert(eq, "Unexpected initial map for Array function"); 558 __ Assert(eq, "Unexpected initial map for Array function");
559 559
560 // We should either have undefined in r2 or a valid jsglobalpropertycell 560 if (FLAG_optimize_constructed_arrays) {
561 Label okay_here; 561 // We should either have undefined in r2 or a valid jsglobalpropertycell
562 Handle<Object> undefined_sentinel( 562 Label okay_here;
563 masm->isolate()->heap()->undefined_value(), masm->isolate()); 563 Handle<Object> undefined_sentinel(
564 Handle<Map> global_property_cell_map( 564 masm->isolate()->heap()->undefined_value(), masm->isolate());
565 masm->isolate()->heap()->global_property_cell_map()); 565 Handle<Map> global_property_cell_map(
566 __ cmp(r2, Operand(undefined_sentinel)); 566 masm->isolate()->heap()->global_property_cell_map());
567 __ b(eq, &okay_here); 567 __ cmp(r2, Operand(undefined_sentinel));
568 __ ldr(r3, FieldMemOperand(r2, 0)); 568 __ b(eq, &okay_here);
569 __ cmp(r3, Operand(global_property_cell_map)); 569 __ ldr(r3, FieldMemOperand(r2, 0));
570 __ Assert(eq, "Expected property cell in register ebx"); 570 __ cmp(r3, Operand(global_property_cell_map));
571 __ bind(&okay_here); 571 __ Assert(eq, "Expected property cell in register ebx");
572 __ bind(&okay_here);
573 }
572 } 574 }
573 575
574 if (FLAG_optimize_constructed_arrays) { 576 if (FLAG_optimize_constructed_arrays) {
575 Label not_zero_case, not_one_case; 577 Label not_zero_case, not_one_case;
576 __ tst(r0, r0); 578 __ tst(r0, r0);
577 __ b(ne, &not_zero_case); 579 __ b(ne, &not_zero_case);
578 ArrayNoArgumentConstructorStub no_argument_stub; 580 ArrayNoArgumentConstructorStub no_argument_stub;
579 __ TailCallStub(&no_argument_stub); 581 __ TailCallStub(&no_argument_stub);
580 582
581 __ bind(&not_zero_case); 583 __ bind(&not_zero_case);
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 __ bind(&dont_adapt_arguments); 1892 __ bind(&dont_adapt_arguments);
1891 __ Jump(r3); 1893 __ Jump(r3);
1892 } 1894 }
1893 1895
1894 1896
1895 #undef __ 1897 #undef __
1896 1898
1897 } } // namespace v8::internal 1899 } } // namespace v8::internal
1898 1900
1899 #endif // V8_TARGET_ARCH_ARM 1901 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698