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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 8834005: Remove write barriers for cells on x64, ARM and MIPS. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years 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/lithium-codegen-x64.cc ('k') | no next file » | 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 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 2363
2364 // Check that the value in the cell is not the hole. If it is, this 2364 // Check that the value in the cell is not the hole. If it is, this
2365 // cell could have been deleted and reintroducing the global needs 2365 // cell could have been deleted and reintroducing the global needs
2366 // to update the property details in the property dictionary of the 2366 // to update the property details in the property dictionary of the
2367 // global object. We bail out to the runtime system to do that. 2367 // global object. We bail out to the runtime system to do that.
2368 __ CompareRoot(cell_operand, Heap::kTheHoleValueRootIndex); 2368 __ CompareRoot(cell_operand, Heap::kTheHoleValueRootIndex);
2369 __ j(equal, &miss); 2369 __ j(equal, &miss);
2370 2370
2371 // Store the value in the cell. 2371 // Store the value in the cell.
2372 __ movq(cell_operand, rax); 2372 __ movq(cell_operand, rax);
2373 Label done; 2373 // Cells are always rescanned, so no write barrier here.
2374 __ JumpIfSmi(rax, &done);
2375
2376 __ movq(rcx, rax);
2377 __ lea(rdx, cell_operand);
2378 // Cells are always in the remembered set.
2379 __ RecordWrite(rbx, // Object.
2380 rdx, // Address.
2381 rcx, // Value.
2382 kDontSaveFPRegs,
2383 OMIT_REMEMBERED_SET,
2384 OMIT_SMI_CHECK);
2385
2386 2374
2387 // Return the value (register rax). 2375 // Return the value (register rax).
2388 __ bind(&done);
2389
2390 Counters* counters = isolate()->counters(); 2376 Counters* counters = isolate()->counters();
2391 __ IncrementCounter(counters->named_store_global_inline(), 1); 2377 __ IncrementCounter(counters->named_store_global_inline(), 1);
2392 __ ret(0); 2378 __ ret(0);
2393 2379
2394 // Handle store cache miss. 2380 // Handle store cache miss.
2395 __ bind(&miss); 2381 __ bind(&miss);
2396 __ IncrementCounter(counters->named_store_global_inline_miss(), 1); 2382 __ IncrementCounter(counters->named_store_global_inline_miss(), 1);
2397 Handle<Code> ic = isolate()->builtins()->StoreIC_Miss(); 2383 Handle<Code> ic = isolate()->builtins()->StoreIC_Miss();
2398 __ Jump(ic, RelocInfo::CODE_TARGET); 2384 __ Jump(ic, RelocInfo::CODE_TARGET);
2399 2385
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
3614 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 3600 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
3615 __ jmp(ic_miss, RelocInfo::CODE_TARGET); 3601 __ jmp(ic_miss, RelocInfo::CODE_TARGET);
3616 } 3602 }
3617 3603
3618 3604
3619 #undef __ 3605 #undef __
3620 3606
3621 } } // namespace v8::internal 3607 } } // namespace v8::internal
3622 3608
3623 #endif // V8_TARGET_ARCH_X64 3609 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698