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

Side by Side Diff: src/ia32/builtins-ia32.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 | « src/arm/builtins-arm.cc ('k') | src/x64/builtins-x64.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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 // builtin Array functions which always have maps. 1489 // builtin Array functions which always have maps.
1490 1490
1491 // Initial map for the builtin Array function should be a map. 1491 // Initial map for the builtin Array function should be a map.
1492 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); 1492 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset));
1493 // Will both indicate a NULL and a Smi. 1493 // Will both indicate a NULL and a Smi.
1494 __ test(ecx, Immediate(kSmiTagMask)); 1494 __ test(ecx, Immediate(kSmiTagMask));
1495 __ Assert(not_zero, "Unexpected initial map for Array function"); 1495 __ Assert(not_zero, "Unexpected initial map for Array function");
1496 __ CmpObjectType(ecx, MAP_TYPE, ecx); 1496 __ CmpObjectType(ecx, MAP_TYPE, ecx);
1497 __ Assert(equal, "Unexpected initial map for Array function"); 1497 __ Assert(equal, "Unexpected initial map for Array function");
1498 1498
1499 // We should either have undefined in ebx or a valid jsglobalpropertycell 1499 if (FLAG_optimize_constructed_arrays) {
1500 Label okay_here; 1500 // We should either have undefined in ebx or a valid jsglobalpropertycell
1501 Handle<Object> undefined_sentinel( 1501 Label okay_here;
1502 masm->isolate()->heap()->undefined_value(), masm->isolate()); 1502 Handle<Object> undefined_sentinel(
1503 Handle<Map> global_property_cell_map( 1503 masm->isolate()->heap()->undefined_value(), masm->isolate());
1504 masm->isolate()->heap()->global_property_cell_map()); 1504 Handle<Map> global_property_cell_map(
1505 __ cmp(ebx, Immediate(undefined_sentinel)); 1505 masm->isolate()->heap()->global_property_cell_map());
1506 __ j(equal, &okay_here); 1506 __ cmp(ebx, Immediate(undefined_sentinel));
1507 __ cmp(FieldOperand(ebx, 0), Immediate(global_property_cell_map)); 1507 __ j(equal, &okay_here);
1508 __ Assert(equal, "Expected property cell in register ebx"); 1508 __ cmp(FieldOperand(ebx, 0), Immediate(global_property_cell_map));
1509 __ bind(&okay_here); 1509 __ Assert(equal, "Expected property cell in register ebx");
1510 __ bind(&okay_here);
1511 }
1510 } 1512 }
1511 1513
1512 if (FLAG_optimize_constructed_arrays) { 1514 if (FLAG_optimize_constructed_arrays) {
1513 Label not_zero_case, not_one_case; 1515 Label not_zero_case, not_one_case;
1514 __ test(eax, eax); 1516 __ test(eax, eax);
1515 __ j(not_zero, &not_zero_case); 1517 __ j(not_zero, &not_zero_case);
1516 ArrayNoArgumentConstructorStub no_argument_stub; 1518 ArrayNoArgumentConstructorStub no_argument_stub;
1517 __ TailCallStub(&no_argument_stub); 1519 __ TailCallStub(&no_argument_stub);
1518 1520
1519 __ bind(&not_zero_case); 1521 __ bind(&not_zero_case);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1860 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1859 generator.Generate(); 1861 generator.Generate();
1860 } 1862 }
1861 1863
1862 1864
1863 #undef __ 1865 #undef __
1864 } 1866 }
1865 } // namespace v8::internal 1867 } // namespace v8::internal
1866 1868
1867 #endif // V8_TARGET_ARCH_IA32 1869 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698