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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 9190007: Merge r10187, r10188 from the bleeding_edge to the 3.7 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.7/
Patch Set: Created 8 years, 11 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/version.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 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 // been deleted from the property dictionary. In that case, we need 2042 // been deleted from the property dictionary. In that case, we need
2043 // to update the property details in the property dictionary to mark 2043 // to update the property details in the property dictionary to mark
2044 // it as no longer deleted. We deoptimize in that case. 2044 // it as no longer deleted. We deoptimize in that case.
2045 if (instr->hydrogen()->RequiresHoleCheck()) { 2045 if (instr->hydrogen()->RequiresHoleCheck()) {
2046 __ CompareRoot(Operand(address, 0), Heap::kTheHoleValueRootIndex); 2046 __ CompareRoot(Operand(address, 0), Heap::kTheHoleValueRootIndex);
2047 DeoptimizeIf(equal, instr->environment()); 2047 DeoptimizeIf(equal, instr->environment());
2048 } 2048 }
2049 2049
2050 // Store the value. 2050 // Store the value.
2051 __ movq(Operand(address, 0), value); 2051 __ movq(Operand(address, 0), value);
2052 2052 // Cells are always rescanned, so no write barrier here.
2053 if (instr->hydrogen()->NeedsWriteBarrier()) {
2054 Label smi_store;
2055 HType type = instr->hydrogen()->value()->type();
2056 if (!type.IsHeapNumber() && !type.IsString() && !type.IsNonPrimitive()) {
2057 __ JumpIfSmi(value, &smi_store, Label::kNear);
2058 }
2059
2060 int offset = JSGlobalPropertyCell::kValueOffset - kHeapObjectTag;
2061 __ lea(object, Operand(address, -offset));
2062 // Cells are always in the remembered set.
2063 __ RecordWrite(object,
2064 address,
2065 value,
2066 kSaveFPRegs,
2067 OMIT_REMEMBERED_SET,
2068 OMIT_SMI_CHECK);
2069 __ bind(&smi_store);
2070 }
2071 } 2053 }
2072 2054
2073 2055
2074 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { 2056 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
2075 ASSERT(ToRegister(instr->global_object()).is(rdx)); 2057 ASSERT(ToRegister(instr->global_object()).is(rdx));
2076 ASSERT(ToRegister(instr->value()).is(rax)); 2058 ASSERT(ToRegister(instr->value()).is(rax));
2077 2059
2078 __ Move(rcx, instr->name()); 2060 __ Move(rcx, instr->name());
2079 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) 2061 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode)
2080 ? isolate()->builtins()->StoreIC_Initialize_Strict() 2062 ? isolate()->builtins()->StoreIC_Initialize_Strict()
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after
4313 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4295 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4314 ASSERT(osr_pc_offset_ == -1); 4296 ASSERT(osr_pc_offset_ == -1);
4315 osr_pc_offset_ = masm()->pc_offset(); 4297 osr_pc_offset_ = masm()->pc_offset();
4316 } 4298 }
4317 4299
4318 #undef __ 4300 #undef __
4319 4301
4320 } } // namespace v8::internal 4302 } } // namespace v8::internal
4321 4303
4322 #endif // V8_TARGET_ARCH_X64 4304 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698