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

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

Issue 7029030: Use page header information to test for InNewSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Addressed review comments. Created 9 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('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 2011 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
(...skipping 3167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3178 __ lea(index_1, CodeGenerator::FixedArrayElementOperand(elements, index_1)); 3178 __ lea(index_1, CodeGenerator::FixedArrayElementOperand(elements, index_1));
3179 __ lea(index_2, CodeGenerator::FixedArrayElementOperand(elements, index_2)); 3179 __ lea(index_2, CodeGenerator::FixedArrayElementOperand(elements, index_2));
3180 3180
3181 // Swap elements. Use object and temp as scratch registers. 3181 // Swap elements. Use object and temp as scratch registers.
3182 __ mov(object, Operand(index_1, 0)); 3182 __ mov(object, Operand(index_1, 0));
3183 __ mov(temp, Operand(index_2, 0)); 3183 __ mov(temp, Operand(index_2, 0));
3184 __ mov(Operand(index_2, 0), object); 3184 __ mov(Operand(index_2, 0), object);
3185 __ mov(Operand(index_1, 0), temp); 3185 __ mov(Operand(index_1, 0), temp);
3186 3186
3187 NearLabel no_remembered_set; 3187 NearLabel no_remembered_set;
3188 __ InNewSpace(elements, temp, equal, &no_remembered_set); 3188 __ CheckPageFlag(elements, temp,
3189 __ CheckPageFlag(elements, 3189 MemoryChunk::SCAN_ON_SCAVENGE, not_zero,
3190 temp,
3191 MemoryChunk::SCAN_ON_SCAVENGE,
3192 not_zero,
3193 &no_remembered_set); 3190 &no_remembered_set);
3194 3191
3195 __ mov(object, elements); 3192 __ mov(object, elements);
3196 // Since we are swapping two objects, the incremental marker is not disturbed, 3193 // Since we are swapping two objects, the incremental marker is not disturbed,
3197 // so we don't call the stub that handles this. TODO(gc): Optimize by 3194 // so we don't call the stub that handles this. TODO(gc): Optimize by
3198 // checking the scan_on_scavenge flag, probably by calling the stub. 3195 // checking the scan_on_scavenge flag, probably by calling the stub.
3199 __ RememberedSetHelper(index_1, temp, kDontSaveFPRegs); 3196 __ RememberedSetHelper(index_1, temp, kDontSaveFPRegs);
3200 __ RememberedSetHelper(index_2, temp, kDontSaveFPRegs); 3197 __ RememberedSetHelper(index_2, temp, kDontSaveFPRegs);
3201 3198
3202 __ bind(&no_remembered_set); 3199 __ bind(&no_remembered_set);
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
4335 // And return. 4332 // And return.
4336 __ ret(0); 4333 __ ret(0);
4337 } 4334 }
4338 4335
4339 4336
4340 #undef __ 4337 #undef __
4341 4338
4342 } } // namespace v8::internal 4339 } } // namespace v8::internal
4343 4340
4344 #endif // V8_TARGET_ARCH_IA32 4341 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698