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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 2144006: Cardmarking writebarrier. (Closed)
Patch Set: change NewSpace and SemiSpace Contains to match HasHeapObjectTag Created 10 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 1003
1004 // We got a map in register rax. Get the enumeration cache from it. 1004 // We got a map in register rax. Get the enumeration cache from it.
1005 __ movq(rcx, FieldOperand(rax, Map::kInstanceDescriptorsOffset)); 1005 __ movq(rcx, FieldOperand(rax, Map::kInstanceDescriptorsOffset));
1006 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kEnumerationIndexOffset)); 1006 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kEnumerationIndexOffset));
1007 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset)); 1007 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset));
1008 1008
1009 // Setup the four remaining stack slots. 1009 // Setup the four remaining stack slots.
1010 __ push(rax); // Map. 1010 __ push(rax); // Map.
1011 __ push(rdx); // Enumeration cache. 1011 __ push(rdx); // Enumeration cache.
1012 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); 1012 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset));
1013 __ Integer32ToSmi(rax, rax);
1014 __ push(rax); // Enumeration cache length (as smi). 1013 __ push(rax); // Enumeration cache length (as smi).
1015 __ Push(Smi::FromInt(0)); // Initial index. 1014 __ Push(Smi::FromInt(0)); // Initial index.
1016 __ jmp(&loop); 1015 __ jmp(&loop);
1017 1016
1018 // We got a fixed array in register rax. Iterate through that. 1017 // We got a fixed array in register rax. Iterate through that.
1019 __ bind(&fixed_array); 1018 __ bind(&fixed_array);
1020 __ Push(Smi::FromInt(0)); // Map (0) - force slow check. 1019 __ Push(Smi::FromInt(0)); // Map (0) - force slow check.
1021 __ push(rax); 1020 __ push(rax);
1022 __ movq(rax, FieldOperand(rax, FixedArray::kLengthOffset)); 1021 __ movq(rax, FieldOperand(rax, FixedArray::kLengthOffset));
1023 __ Integer32ToSmi(rax, rax);
1024 __ push(rax); // Fixed array length (as smi). 1022 __ push(rax); // Fixed array length (as smi).
1025 __ Push(Smi::FromInt(0)); // Initial index. 1023 __ Push(Smi::FromInt(0)); // Initial index.
1026 1024
1027 // Generate code for doing the condition check. 1025 // Generate code for doing the condition check.
1028 __ bind(&loop); 1026 __ bind(&loop);
1029 __ movq(rax, Operand(rsp, 0 * kPointerSize)); // Get the current index. 1027 __ movq(rax, Operand(rsp, 0 * kPointerSize)); // Get the current index.
1030 __ cmpq(rax, Operand(rsp, 1 * kPointerSize)); // Compare to the array length. 1028 __ cmpq(rax, Operand(rsp, 1 * kPointerSize)); // Compare to the array length.
1031 __ j(above_equal, loop_statement.break_target()); 1029 __ j(above_equal, loop_statement.break_target());
1032 1030
1033 // Get the current entry of the array into register rbx. 1031 // Get the current entry of the array into register rbx.
(...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3212 __ ret(0); 3210 __ ret(0);
3213 } 3211 }
3214 3212
3215 3213
3216 #undef __ 3214 #undef __
3217 3215
3218 3216
3219 } } // namespace v8::internal 3217 } } // namespace v8::internal
3220 3218
3221 #endif // V8_TARGET_ARCH_X64 3219 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/spaces.cc ('K') | « src/x64/codegen-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698