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

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

Issue 2255004: Cardmarking writebarrier. (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/ic-ia32.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 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 1002
1003 // We got a map in register eax. Get the enumeration cache from it. 1003 // We got a map in register eax. Get the enumeration cache from it.
1004 __ mov(ecx, FieldOperand(eax, Map::kInstanceDescriptorsOffset)); 1004 __ mov(ecx, FieldOperand(eax, Map::kInstanceDescriptorsOffset));
1005 __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumerationIndexOffset)); 1005 __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumerationIndexOffset));
1006 __ mov(edx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeCacheOffset)); 1006 __ mov(edx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeCacheOffset));
1007 1007
1008 // Setup the four remaining stack slots. 1008 // Setup the four remaining stack slots.
1009 __ push(eax); // Map. 1009 __ push(eax); // Map.
1010 __ push(edx); // Enumeration cache. 1010 __ push(edx); // Enumeration cache.
1011 __ mov(eax, FieldOperand(edx, FixedArray::kLengthOffset)); 1011 __ mov(eax, FieldOperand(edx, FixedArray::kLengthOffset));
1012 __ SmiTag(eax);
1013 __ push(eax); // Enumeration cache length (as smi). 1012 __ push(eax); // Enumeration cache length (as smi).
1014 __ push(Immediate(Smi::FromInt(0))); // Initial index. 1013 __ push(Immediate(Smi::FromInt(0))); // Initial index.
1015 __ jmp(&loop); 1014 __ jmp(&loop);
1016 1015
1017 // We got a fixed array in register eax. Iterate through that. 1016 // We got a fixed array in register eax. Iterate through that.
1018 __ bind(&fixed_array); 1017 __ bind(&fixed_array);
1019 __ push(Immediate(Smi::FromInt(0))); // Map (0) - force slow check. 1018 __ push(Immediate(Smi::FromInt(0))); // Map (0) - force slow check.
1020 __ push(eax); 1019 __ push(eax);
1021 __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset)); 1020 __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset));
1022 __ SmiTag(eax);
1023 __ push(eax); // Fixed array length (as smi). 1021 __ push(eax); // Fixed array length (as smi).
1024 __ push(Immediate(Smi::FromInt(0))); // Initial index. 1022 __ push(Immediate(Smi::FromInt(0))); // Initial index.
1025 1023
1026 // Generate code for doing the condition check. 1024 // Generate code for doing the condition check.
1027 __ bind(&loop); 1025 __ bind(&loop);
1028 __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index. 1026 __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index.
1029 __ cmp(eax, Operand(esp, 1 * kPointerSize)); // Compare to the array length. 1027 __ cmp(eax, Operand(esp, 1 * kPointerSize)); // Compare to the array length.
1030 __ j(above_equal, loop_statement.break_target()); 1028 __ j(above_equal, loop_statement.break_target());
1031 1029
1032 // Get the current entry of the array into register ebx. 1030 // Get the current entry of the array into register ebx.
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after
3236 // And return. 3234 // And return.
3237 __ ret(0); 3235 __ ret(0);
3238 } 3236 }
3239 3237
3240 3238
3241 #undef __ 3239 #undef __
3242 3240
3243 } } // namespace v8::internal 3241 } } // namespace v8::internal
3244 3242
3245 #endif // V8_TARGET_ARCH_IA32 3243 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698