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

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

Issue 24072016: Use Unique<Cell> and Unique<PropertyCell> in LoadGlobalCell and StoreGlobalCell. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/hydrogen-instructions.cc ('k') | src/mips/lithium-codegen-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 3144
3145 EmitReturn(instr, false); 3145 EmitReturn(instr, false);
3146 if (no_frame_start != -1) { 3146 if (no_frame_start != -1) {
3147 info()->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 3147 info()->AddNoFrameRange(no_frame_start, masm_->pc_offset());
3148 } 3148 }
3149 } 3149 }
3150 3150
3151 3151
3152 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { 3152 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
3153 Register result = ToRegister(instr->result()); 3153 Register result = ToRegister(instr->result());
3154 __ mov(result, Operand::ForCell(instr->hydrogen()->cell())); 3154 __ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle()));
3155 if (instr->hydrogen()->RequiresHoleCheck()) { 3155 if (instr->hydrogen()->RequiresHoleCheck()) {
3156 __ cmp(result, factory()->the_hole_value()); 3156 __ cmp(result, factory()->the_hole_value());
3157 DeoptimizeIf(equal, instr->environment()); 3157 DeoptimizeIf(equal, instr->environment());
3158 } 3158 }
3159 } 3159 }
3160 3160
3161 3161
3162 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3162 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3163 ASSERT(ToRegister(instr->context()).is(esi)); 3163 ASSERT(ToRegister(instr->context()).is(esi));
3164 ASSERT(ToRegister(instr->global_object()).is(edx)); 3164 ASSERT(ToRegister(instr->global_object()).is(edx));
3165 ASSERT(ToRegister(instr->result()).is(eax)); 3165 ASSERT(ToRegister(instr->result()).is(eax));
3166 3166
3167 __ mov(ecx, instr->name()); 3167 __ mov(ecx, instr->name());
3168 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : 3168 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET :
3169 RelocInfo::CODE_TARGET_CONTEXT; 3169 RelocInfo::CODE_TARGET_CONTEXT;
3170 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 3170 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
3171 CallCode(ic, mode, instr); 3171 CallCode(ic, mode, instr);
3172 } 3172 }
3173 3173
3174 3174
3175 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 3175 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
3176 Register value = ToRegister(instr->value()); 3176 Register value = ToRegister(instr->value());
3177 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell(); 3177 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle();
3178 3178
3179 // If the cell we are storing to contains the hole it could have 3179 // If the cell we are storing to contains the hole it could have
3180 // been deleted from the property dictionary. In that case, we need 3180 // been deleted from the property dictionary. In that case, we need
3181 // to update the property details in the property dictionary to mark 3181 // to update the property details in the property dictionary to mark
3182 // it as no longer deleted. We deoptimize in that case. 3182 // it as no longer deleted. We deoptimize in that case.
3183 if (instr->hydrogen()->RequiresHoleCheck()) { 3183 if (instr->hydrogen()->RequiresHoleCheck()) {
3184 __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value()); 3184 __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value());
3185 DeoptimizeIf(equal, instr->environment()); 3185 DeoptimizeIf(equal, instr->environment());
3186 } 3186 }
3187 3187
(...skipping 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after
6395 FixedArray::kHeaderSize - kPointerSize)); 6395 FixedArray::kHeaderSize - kPointerSize));
6396 __ bind(&done); 6396 __ bind(&done);
6397 } 6397 }
6398 6398
6399 6399
6400 #undef __ 6400 #undef __
6401 6401
6402 } } // namespace v8::internal 6402 } } // namespace v8::internal
6403 6403
6404 #endif // V8_TARGET_ARCH_IA32 6404 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698