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

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

Issue 9235007: Handle single element array growth + transition in generic KeyedStoreIC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase to tot 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
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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 static void AllocateEmptyJSArray(MacroAssembler* masm, 1000 static void AllocateEmptyJSArray(MacroAssembler* masm,
1001 Register array_function, 1001 Register array_function,
1002 Register result, 1002 Register result,
1003 Register scratch1, 1003 Register scratch1,
1004 Register scratch2, 1004 Register scratch2,
1005 Register scratch3, 1005 Register scratch3,
1006 Label* gc_required) { 1006 Label* gc_required) {
1007 const int initial_capacity = JSArray::kPreallocatedArrayElements; 1007 const int initial_capacity = JSArray::kPreallocatedArrayElements;
1008 STATIC_ASSERT(initial_capacity >= 0); 1008 STATIC_ASSERT(initial_capacity >= 0);
1009 1009
1010 __ LoadGlobalInitialConstructedArrayMap(array_function, scratch2, scratch1); 1010 __ LoadInitialArrayMap(array_function, scratch2, scratch1);
1011 1011
1012 // Allocate the JSArray object together with space for a fixed array with the 1012 // Allocate the JSArray object together with space for a fixed array with the
1013 // requested elements. 1013 // requested elements.
1014 int size = JSArray::kSize; 1014 int size = JSArray::kSize;
1015 if (initial_capacity > 0) { 1015 if (initial_capacity > 0) {
1016 size += FixedArray::SizeFor(initial_capacity); 1016 size += FixedArray::SizeFor(initial_capacity);
1017 } 1017 }
1018 __ AllocateInNewSpace(size, 1018 __ AllocateInNewSpace(size,
1019 result, 1019 result,
1020 scratch2, 1020 scratch2,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 // register elements_array is scratched. 1099 // register elements_array is scratched.
1100 static void AllocateJSArray(MacroAssembler* masm, 1100 static void AllocateJSArray(MacroAssembler* masm,
1101 Register array_function, // Array function. 1101 Register array_function, // Array function.
1102 Register array_size, // As a smi, cannot be 0. 1102 Register array_size, // As a smi, cannot be 0.
1103 Register result, 1103 Register result,
1104 Register elements_array, 1104 Register elements_array,
1105 Register elements_array_end, 1105 Register elements_array_end,
1106 Register scratch, 1106 Register scratch,
1107 bool fill_with_hole, 1107 bool fill_with_hole,
1108 Label* gc_required) { 1108 Label* gc_required) {
1109 __ LoadGlobalInitialConstructedArrayMap(array_function, 1109 __ LoadInitialArrayMap(array_function, scratch, elements_array);
1110 scratch,
1111 elements_array);
1112 1110
1113 if (FLAG_debug_code) { // Assert that array size is not zero. 1111 if (FLAG_debug_code) { // Assert that array size is not zero.
1114 __ testq(array_size, array_size); 1112 __ testq(array_size, array_size);
1115 __ Assert(not_zero, "array size is unexpectedly 0"); 1113 __ Assert(not_zero, "array size is unexpectedly 0");
1116 } 1114 }
1117 1115
1118 // Allocate the JSArray object together with space for a FixedArray with the 1116 // Allocate the JSArray object together with space for a FixedArray with the
1119 // requested elements. 1117 // requested elements.
1120 SmiIndex index = 1118 SmiIndex index =
1121 masm->SmiToIndex(kScratchRegister, array_size, kPointerSizeLog2); 1119 masm->SmiToIndex(kScratchRegister, array_size, kPointerSizeLog2);
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1612 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1615 generator.Generate(); 1613 generator.Generate();
1616 } 1614 }
1617 1615
1618 1616
1619 #undef __ 1617 #undef __
1620 1618
1621 } } // namespace v8::internal 1619 } } // namespace v8::internal
1622 1620
1623 #endif // V8_TARGET_ARCH_X64 1621 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ia32/macro-assembler-ia32.h ('K') | « src/objects-printer.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698