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

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: Created 9 years, 10 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
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 = ToRegister(instr->TempAt(0));
2199 __ str(value, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); 2199 Register scratch2 = scratch0();
2200
2201 // If the cell we are storing to contains the hole it could have
2202 // been deleted from the property dictionary. In that case, we need
2203 // to update the property details in the property dictionary to mark
2204 // it as no longer deleted. We deoptimize in that case.
2205 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell())));
2206 __ ldr(scratch2,
2207 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
2208 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2209 __ cmp(scratch2, ip);
2210 DeoptimizeIf(eq, instr->environment());
2211
2212 // Store the value.
2213 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
2200 } 2214 }
2201 2215
2202 2216
2203 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2217 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2204 // TODO(antonm): load a context with a separate instruction. 2218 // TODO(antonm): load a context with a separate instruction.
2205 Register result = ToRegister(instr->result()); 2219 Register result = ToRegister(instr->result());
2206 __ LoadContext(result, instr->context_chain_length()); 2220 __ LoadContext(result, instr->context_chain_length());
2207 __ ldr(result, ContextOperand(result, instr->slot_index())); 2221 __ ldr(result, ContextOperand(result, instr->slot_index()));
2208 } 2222 }
2209 2223
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
3670 3684
3671 3685
3672 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 3686 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
3673 Abort("DoOsrEntry unimplemented."); 3687 Abort("DoOsrEntry unimplemented.");
3674 } 3688 }
3675 3689
3676 3690
3677 #undef __ 3691 #undef __
3678 3692
3679 } } // namespace v8::internal 3693 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | src/x64/stub-cache-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698