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

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

Issue 6306014: Fix reintroduction of global variables that have been deleted. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 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/arm/lithium-arm.cc ('k') | src/arm/stub-cache-arm.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 2177 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 if (instr->hydrogen()->check_hole_value()) { 2188 if (instr->hydrogen()->check_hole_value()) {
2189 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2189 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2190 __ cmp(result, ip); 2190 __ cmp(result, ip);
2191 DeoptimizeIf(eq, instr->environment()); 2191 DeoptimizeIf(eq, instr->environment());
2192 } 2192 }
2193 } 2193 }
2194 2194
2195 2195
2196 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 2196 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
2197 Register value = ToRegister(instr->InputAt(0)); 2197 Register value = ToRegister(instr->InputAt(0));
2198 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2198 Register scratch = scratch0();
2199 __ str(value, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); 2199
2200 // Load the cell.
2201 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell())));
2202
2203 // If the cell we are storing to contains the hole it could have
2204 // been deleted from the property dictionary. In that case, we need
2205 // to update the property details in the property dictionary to mark
2206 // it as no longer deleted.
2207 if (instr->hydrogen()->check_hole_value()) {
2208 Register scratch2 = ToRegister(instr->TempAt(0));
2209 __ ldr(scratch2,
2210 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
2211 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2212 __ cmp(scratch2, ip);
2213 DeoptimizeIf(eq, instr->environment());
2214 }
2215
2216 // Store the value.
2217 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
2200 } 2218 }
2201 2219
2202 2220
2203 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2221 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2204 // TODO(antonm): load a context with a separate instruction. 2222 // TODO(antonm): load a context with a separate instruction.
2205 Register result = ToRegister(instr->result()); 2223 Register result = ToRegister(instr->result());
2206 __ LoadContext(result, instr->context_chain_length()); 2224 __ LoadContext(result, instr->context_chain_length());
2207 __ ldr(result, ContextOperand(result, instr->slot_index())); 2225 __ ldr(result, ContextOperand(result, instr->slot_index()));
2208 } 2226 }
2209 2227
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
3670 3688
3671 3689
3672 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 3690 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
3673 Abort("DoOsrEntry unimplemented."); 3691 Abort("DoOsrEntry unimplemented.");
3674 } 3692 }
3675 3693
3676 3694
3677 #undef __ 3695 #undef __
3678 3696
3679 } } // namespace v8::internal 3697 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698