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

Side by Side Diff: src/x64/lithium-codegen-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/mips/stub-cache-mips.cc ('k') | src/x64/stub-cache-x64.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 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 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 // been deleted from the property dictionary. In that case, we need 2040 // been deleted from the property dictionary. In that case, we need
2041 // to update the property details in the property dictionary to mark 2041 // to update the property details in the property dictionary to mark
2042 // it as no longer deleted. We deoptimize in that case. 2042 // it as no longer deleted. We deoptimize in that case.
2043 if (instr->hydrogen()->RequiresHoleCheck()) { 2043 if (instr->hydrogen()->RequiresHoleCheck()) {
2044 __ CompareRoot(Operand(address, 0), Heap::kTheHoleValueRootIndex); 2044 __ CompareRoot(Operand(address, 0), Heap::kTheHoleValueRootIndex);
2045 DeoptimizeIf(equal, instr->environment()); 2045 DeoptimizeIf(equal, instr->environment());
2046 } 2046 }
2047 2047
2048 // Store the value. 2048 // Store the value.
2049 __ movq(Operand(address, 0), value); 2049 __ movq(Operand(address, 0), value);
2050 2050 // Cells are always rescanned, so no write barrier here.
2051 if (instr->hydrogen()->NeedsWriteBarrier()) {
2052 Label smi_store;
2053 HType type = instr->hydrogen()->value()->type();
2054 if (!type.IsHeapNumber() && !type.IsString() && !type.IsNonPrimitive()) {
2055 __ JumpIfSmi(value, &smi_store, Label::kNear);
2056 }
2057
2058 int offset = JSGlobalPropertyCell::kValueOffset - kHeapObjectTag;
2059 __ lea(object, Operand(address, -offset));
2060 // Cells are always in the remembered set.
2061 __ RecordWrite(object,
2062 address,
2063 value,
2064 kSaveFPRegs,
2065 OMIT_REMEMBERED_SET,
2066 OMIT_SMI_CHECK);
2067 __ bind(&smi_store);
2068 }
2069 } 2051 }
2070 2052
2071 2053
2072 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { 2054 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
2073 ASSERT(ToRegister(instr->global_object()).is(rdx)); 2055 ASSERT(ToRegister(instr->global_object()).is(rdx));
2074 ASSERT(ToRegister(instr->value()).is(rax)); 2056 ASSERT(ToRegister(instr->value()).is(rax));
2075 2057
2076 __ Move(rcx, instr->name()); 2058 __ Move(rcx, instr->name());
2077 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) 2059 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode)
2078 ? isolate()->builtins()->StoreIC_Initialize_Strict() 2060 ? isolate()->builtins()->StoreIC_Initialize_Strict()
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after
4326 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4308 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4327 ASSERT(osr_pc_offset_ == -1); 4309 ASSERT(osr_pc_offset_ == -1);
4328 osr_pc_offset_ = masm()->pc_offset(); 4310 osr_pc_offset_ = masm()->pc_offset();
4329 } 4311 }
4330 4312
4331 #undef __ 4313 #undef __
4332 4314
4333 } } // namespace v8::internal 4315 } } // namespace v8::internal
4334 4316
4335 #endif // V8_TARGET_ARCH_X64 4317 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698