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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 8271007: Porting r9605 to x64 (elements kind conversion in generated code). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed a bunch of issues and included suggestions. Created 9 years, 2 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/x64/macro-assembler-x64.h ('k') | test/mjsunit/elements-transition.js » ('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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 // Clobber clobbered input registers when running with the debug-code flag 320 // Clobber clobbered input registers when running with the debug-code flag
321 // turned on to provoke errors. 321 // turned on to provoke errors.
322 if (emit_debug_code()) { 322 if (emit_debug_code()) {
323 movq(value, BitCast<int64_t>(kZapValue), RelocInfo::NONE); 323 movq(value, BitCast<int64_t>(kZapValue), RelocInfo::NONE);
324 movq(dst, BitCast<int64_t>(kZapValue), RelocInfo::NONE); 324 movq(dst, BitCast<int64_t>(kZapValue), RelocInfo::NONE);
325 } 325 }
326 } 326 }
327 327
328 328
329 void MacroAssembler::RecordWriteArray(Register object,
330 Register value,
331 Register index,
332 SaveFPRegsMode save_fp,
333 RememberedSetAction remembered_set_action,
334 SmiCheck smi_check) {
335 // First, check if a write barrier is even needed. The tests below
336 // catch stores of Smis.
337 Label done;
338
339 // Skip barrier if writing a smi.
340 if (smi_check == INLINE_SMI_CHECK) {
341 JumpIfSmi(value, &done);
342 }
343
344 // Array access: calculate the destination address. Index is not a smi.
345 Register dst = index;
346 lea(dst, Operand(object, index, times_pointer_size,
347 FixedArray::kHeaderSize - kHeapObjectTag));
348
349 RecordWrite(
350 object, dst, value, save_fp, remembered_set_action, OMIT_SMI_CHECK);
351
352 bind(&done);
353
354 // Clobber clobbered input registers when running with the debug-code flag
355 // turned on to provoke errors.
356 if (emit_debug_code()) {
357 movq(value, Immediate(BitCast<int64_t>(kZapValue)));
358 movq(index, Immediate(BitCast<int64_t>(kZapValue)));
359 }
360 }
361
362
329 void MacroAssembler::RecordWrite(Register object, 363 void MacroAssembler::RecordWrite(Register object,
330 Register address, 364 Register address,
331 Register value, 365 Register value,
332 SaveFPRegsMode fp_mode, 366 SaveFPRegsMode fp_mode,
333 RememberedSetAction remembered_set_action, 367 RememberedSetAction remembered_set_action,
334 SmiCheck smi_check) { 368 SmiCheck smi_check) {
335 // The compiled code assumes that record write doesn't change the 369 // The compiled code assumes that record write doesn't change the
336 // context register, so we check that none of the clobbered 370 // context register, so we check that none of the clobbered
337 // registers are rsi. 371 // registers are rsi.
338 ASSERT(!value.is(rsi) && !address.is(rsi)); 372 ASSERT(!value.is(rsi) && !address.is(rsi));
(...skipping 3935 matching lines...) Expand 10 before | Expand all | Expand 10 after
4274 4308
4275 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); 4309 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask));
4276 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); 4310 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length);
4277 4311
4278 bind(&done); 4312 bind(&done);
4279 } 4313 }
4280 4314
4281 } } // namespace v8::internal 4315 } } // namespace v8::internal
4282 4316
4283 #endif // V8_TARGET_ARCH_X64 4317 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/elements-transition.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698