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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 18277006: Bugfix: array constructor stub was missing a case (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorrectly commented out test code Created 7 years, 5 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/code-stubs-arm.cc ('k') | src/x64/code-stubs-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 7610 matching lines...) Expand 10 before | Expand all | Expand 10 after
7621 Label no_info, switch_ready; 7621 Label no_info, switch_ready;
7622 // Get the elements kind and case on that. 7622 // Get the elements kind and case on that.
7623 __ cmp(ebx, Immediate(undefined_sentinel)); 7623 __ cmp(ebx, Immediate(undefined_sentinel));
7624 __ j(equal, &no_info); 7624 __ j(equal, &no_info);
7625 __ mov(edx, FieldOperand(ebx, Cell::kValueOffset)); 7625 __ mov(edx, FieldOperand(ebx, Cell::kValueOffset));
7626 7626
7627 // The type cell may have undefined in its value. 7627 // The type cell may have undefined in its value.
7628 __ cmp(edx, Immediate(undefined_sentinel)); 7628 __ cmp(edx, Immediate(undefined_sentinel));
7629 __ j(equal, &no_info); 7629 __ j(equal, &no_info);
7630 7630
7631 // We should have an allocation site object 7631 // The type cell has either an AllocationSite or a JSFunction
7632 if (FLAG_debug_code) { 7632 __ cmp(FieldOperand(edx, 0), Immediate(Handle<Map>(
7633 __ cmp(FieldOperand(edx, 0), 7633 masm->isolate()->heap()->allocation_site_map())));
7634 Immediate(Handle<Map>( 7634 __ j(not_equal, &no_info);
7635 masm->isolate()->heap()->allocation_site_map())));
7636 __ Assert(equal, "Expected AllocationSite object in register edx");
7637 }
7638 7635
7639 __ mov(edx, FieldOperand(edx, AllocationSite::kPayloadOffset)); 7636 __ mov(edx, FieldOperand(edx, AllocationSite::kPayloadOffset));
7640 __ SmiUntag(edx); 7637 __ SmiUntag(edx);
7641 __ jmp(&switch_ready); 7638 __ jmp(&switch_ready);
7642 __ bind(&no_info); 7639 __ bind(&no_info);
7643 __ mov(edx, Immediate(GetInitialFastElementsKind())); 7640 __ mov(edx, Immediate(GetInitialFastElementsKind()));
7644 __ bind(&switch_ready); 7641 __ bind(&switch_ready);
7645 7642
7646 if (argument_count_ == ANY) { 7643 if (argument_count_ == ANY) {
7647 Label not_zero_case, not_one_case; 7644 Label not_zero_case, not_one_case;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
7754 __ bind(&fast_elements_case); 7751 __ bind(&fast_elements_case);
7755 GenerateCase(masm, FAST_ELEMENTS); 7752 GenerateCase(masm, FAST_ELEMENTS);
7756 } 7753 }
7757 7754
7758 7755
7759 #undef __ 7756 #undef __
7760 7757
7761 } } // namespace v8::internal 7758 } } // namespace v8::internal
7762 7759
7763 #endif // V8_TARGET_ARCH_IA32 7760 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698