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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 8983027: Rollback 10331: Make sure transitioned arrays efficiently call builtin Array functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-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 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2732 // Value is a smi. convert to a double and store. 2732 // Value is a smi. convert to a double and store.
2733 // Preserve original value. 2733 // Preserve original value.
2734 SmiToInteger32(kScratchRegister, maybe_number); 2734 SmiToInteger32(kScratchRegister, maybe_number);
2735 cvtlsi2sd(xmm_scratch, kScratchRegister); 2735 cvtlsi2sd(xmm_scratch, kScratchRegister);
2736 movsd(FieldOperand(elements, index, times_8, FixedDoubleArray::kHeaderSize), 2736 movsd(FieldOperand(elements, index, times_8, FixedDoubleArray::kHeaderSize),
2737 xmm_scratch); 2737 xmm_scratch);
2738 bind(&done); 2738 bind(&done);
2739 } 2739 }
2740 2740
2741 2741
2742 void MacroAssembler::CompareMap(Register obj,
2743 Handle<Map> map,
2744 Label* early_success,
2745 CompareMapMode mode) {
2746 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map);
2747 if (mode == ALLOW_ELEMENT_TRANSITION_MAPS) {
2748 bool ignore;
2749 Map* transitioned_fast_element_map(
2750 map->LookupElementsTransitionMap(FAST_ELEMENTS, &ignore));
2751 ASSERT(transitioned_fast_element_map == NULL ||
2752 map->elements_kind() != FAST_ELEMENTS);
2753 if (transitioned_fast_element_map != NULL) {
2754 j(equal, early_success, Label::kNear);
2755 Cmp(FieldOperand(obj, HeapObject::kMapOffset),
2756 Handle<Map>(transitioned_fast_element_map));
2757 }
2758
2759 Map* transitioned_double_map(
2760 map->LookupElementsTransitionMap(FAST_DOUBLE_ELEMENTS, &ignore));
2761 ASSERT(transitioned_double_map == NULL ||
2762 map->elements_kind() == FAST_SMI_ONLY_ELEMENTS);
2763 if (transitioned_double_map != NULL) {
2764 j(equal, early_success, Label::kNear);
2765 Cmp(FieldOperand(obj, HeapObject::kMapOffset),
2766 Handle<Map>(transitioned_double_map));
2767 }
2768 }
2769 }
2770
2771
2772 void MacroAssembler::CheckMap(Register obj, 2742 void MacroAssembler::CheckMap(Register obj,
2773 Handle<Map> map, 2743 Handle<Map> map,
2774 Label* fail, 2744 Label* fail,
2775 SmiCheckType smi_check_type, 2745 SmiCheckType smi_check_type) {
2776 CompareMapMode mode) {
2777 if (smi_check_type == DO_SMI_CHECK) { 2746 if (smi_check_type == DO_SMI_CHECK) {
2778 JumpIfSmi(obj, fail); 2747 JumpIfSmi(obj, fail);
2779 } 2748 }
2780 2749 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map);
2781 Label success;
2782 CompareMap(obj, map, &success, mode);
2783 j(not_equal, fail); 2750 j(not_equal, fail);
2784 bind(&success);
2785 } 2751 }
2786 2752
2787 2753
2788 void MacroAssembler::ClampUint8(Register reg) { 2754 void MacroAssembler::ClampUint8(Register reg) {
2789 Label done; 2755 Label done;
2790 testl(reg, Immediate(0xFFFFFF00)); 2756 testl(reg, Immediate(0xFFFFFF00));
2791 j(zero, &done, Label::kNear); 2757 j(zero, &done, Label::kNear);
2792 setcc(negative, reg); // 1 if negative, 0 if positive. 2758 setcc(negative, reg); // 1 if negative, 0 if positive.
2793 decb(reg); // 0 if negative, 255 if positive. 2759 decb(reg); // 0 if negative, 255 if positive.
2794 bind(&done); 2760 bind(&done);
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
4313 4279
4314 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); 4280 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask));
4315 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); 4281 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length);
4316 4282
4317 bind(&done); 4283 bind(&done);
4318 } 4284 }
4319 4285
4320 } } // namespace v8::internal 4286 } } // namespace v8::internal
4321 4287
4322 #endif // V8_TARGET_ARCH_X64 4288 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698