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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 10170030: Implement tracking and optimizations of packed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ia32 ready to go Created 8 years, 7 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
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 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2695 __ b(eq, &done); 2695 __ b(eq, &done);
2696 __ LoadRoot(ip, Heap::kFixedCOWArrayMapRootIndex); 2696 __ LoadRoot(ip, Heap::kFixedCOWArrayMapRootIndex);
2697 __ cmp(scratch, ip); 2697 __ cmp(scratch, ip);
2698 __ b(eq, &done); 2698 __ b(eq, &done);
2699 // |scratch| still contains |input|'s map. 2699 // |scratch| still contains |input|'s map.
2700 __ ldr(scratch, FieldMemOperand(scratch, Map::kBitField2Offset)); 2700 __ ldr(scratch, FieldMemOperand(scratch, Map::kBitField2Offset));
2701 __ ubfx(scratch, scratch, Map::kElementsKindShift, 2701 __ ubfx(scratch, scratch, Map::kElementsKindShift,
2702 Map::kElementsKindBitCount); 2702 Map::kElementsKindBitCount);
2703 __ cmp(scratch, Operand(FAST_ELEMENTS)); 2703 __ cmp(scratch, Operand(FAST_ELEMENTS));
2704 __ b(eq, &done); 2704 __ b(eq, &done);
2705 __ cmp(scratch, Operand(FAST_HOLEY_ELEMENTS));
2706 __ b(eq, &done);
2705 __ cmp(scratch, Operand(FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND)); 2707 __ cmp(scratch, Operand(FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND));
2706 __ b(lt, &fail); 2708 __ b(lt, &fail);
2707 __ cmp(scratch, Operand(LAST_EXTERNAL_ARRAY_ELEMENTS_KIND)); 2709 __ cmp(scratch, Operand(LAST_EXTERNAL_ARRAY_ELEMENTS_KIND));
2708 __ b(le, &done); 2710 __ b(le, &done);
2709 __ bind(&fail); 2711 __ bind(&fail);
2710 __ Abort("Check for fast or external elements failed."); 2712 __ Abort("Check for fast or external elements failed.");
2711 __ bind(&done); 2713 __ bind(&done);
2712 } 2714 }
2713 } 2715 }
2714 2716
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after
4668 } 4670 }
4669 4671
4670 4672
4671 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { 4673 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) {
4672 Heap* heap = isolate()->heap(); 4674 Heap* heap = isolate()->heap();
4673 ElementsKind boilerplate_elements_kind = 4675 ElementsKind boilerplate_elements_kind =
4674 instr->hydrogen()->boilerplate_elements_kind(); 4676 instr->hydrogen()->boilerplate_elements_kind();
4675 4677
4676 // Deopt if the array literal boilerplate ElementsKind is of a type different 4678 // Deopt if the array literal boilerplate ElementsKind is of a type different
4677 // than the expected one. The check isn't necessary if the boilerplate has 4679 // than the expected one. The check isn't necessary if the boilerplate has
4678 // already been converted to FAST_ELEMENTS. 4680 // already been converted to TERMINAL_FAST_ELEMENTS_KIND.
4679 if (boilerplate_elements_kind != FAST_ELEMENTS) { 4681 if (boilerplate_elements_kind != TERMINAL_FAST_ELEMENTS_KIND) {
4680 __ LoadHeapObject(r1, instr->hydrogen()->boilerplate_object()); 4682 __ LoadHeapObject(r1, instr->hydrogen()->boilerplate_object());
4681 // Load map into r2. 4683 // Load map into r2.
4682 __ ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset)); 4684 __ ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset));
4683 // Load the map's "bit field 2". 4685 // Load the map's "bit field 2".
4684 __ ldrb(r2, FieldMemOperand(r2, Map::kBitField2Offset)); 4686 __ ldrb(r2, FieldMemOperand(r2, Map::kBitField2Offset));
4685 // Retrieve elements_kind from bit field 2. 4687 // Retrieve elements_kind from bit field 2.
4686 __ ubfx(r2, r2, Map::kElementsKindShift, Map::kElementsKindBitCount); 4688 __ ubfx(r2, r2, Map::kElementsKindShift, Map::kElementsKindBitCount);
4687 __ cmp(r2, Operand(boilerplate_elements_kind)); 4689 __ cmp(r2, Operand(boilerplate_elements_kind));
4688 DeoptimizeIf(ne, instr->environment()); 4690 DeoptimizeIf(ne, instr->environment());
4689 } 4691 }
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
5311 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 5313 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
5312 __ ldr(result, FieldMemOperand(scratch, 5314 __ ldr(result, FieldMemOperand(scratch,
5313 FixedArray::kHeaderSize - kPointerSize)); 5315 FixedArray::kHeaderSize - kPointerSize));
5314 __ bind(&done); 5316 __ bind(&done);
5315 } 5317 }
5316 5318
5317 5319
5318 #undef __ 5320 #undef __
5319 5321
5320 } } // namespace v8::internal 5322 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | src/elements.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698