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

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

Issue 6758007: Increase coverage of global loads in optimized code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 __ CallRuntime(Runtime::kTraceExit, 1); 2156 __ CallRuntime(Runtime::kTraceExit, 1);
2157 } 2157 }
2158 int32_t sp_delta = (ParameterCount() + 1) * kPointerSize; 2158 int32_t sp_delta = (ParameterCount() + 1) * kPointerSize;
2159 __ mov(sp, fp); 2159 __ mov(sp, fp);
2160 __ ldm(ia_w, sp, fp.bit() | lr.bit()); 2160 __ ldm(ia_w, sp, fp.bit() | lr.bit());
2161 __ add(sp, sp, Operand(sp_delta)); 2161 __ add(sp, sp, Operand(sp_delta));
2162 __ Jump(lr); 2162 __ Jump(lr);
2163 } 2163 }
2164 2164
2165 2165
2166 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { 2166 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2167 Register result = ToRegister(instr->result()); 2167 Register result = ToRegister(instr->result());
2168 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2168 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell())));
2169 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); 2169 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
2170 if (instr->hydrogen()->check_hole_value()) { 2170 if (instr->hydrogen()->check_hole_value()) {
2171 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2171 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2172 __ cmp(result, ip); 2172 __ cmp(result, ip);
2173 DeoptimizeIf(eq, instr->environment()); 2173 DeoptimizeIf(eq, instr->environment());
2174 } 2174 }
2175 } 2175 }
2176 2176
2177 2177
2178 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2179 ASSERT(ToRegister(instr->global_object()).is(r0));
2180 ASSERT(ToRegister(instr->result()).is(r0));
2181
2182 __ mov(r2, Operand(instr->name()));
2183 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET :
fschneider 2011/04/01 11:38:57 For consistency maybe align like ? RelocInfo::COD
Søren Thygesen Gjesse 2011/04/01 11:47:32 Done.
2184 RelocInfo::CODE_TARGET_CONTEXT;
2185 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2186 CallCode(ic, mode, instr);
2187 }
2188
2189
2178 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 2190 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
2179 Register value = ToRegister(instr->InputAt(0)); 2191 Register value = ToRegister(instr->InputAt(0));
2180 Register scratch = scratch0(); 2192 Register scratch = scratch0();
2181 2193
2182 // Load the cell. 2194 // Load the cell.
2183 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2195 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell())));
2184 2196
2185 // If the cell we are storing to contains the hole it could have 2197 // If the cell we are storing to contains the hole it could have
2186 // been deleted from the property dictionary. In that case, we need 2198 // been deleted from the property dictionary. In that case, we need
2187 // to update the property details in the property dictionary to mark 2199 // to update the property details in the property dictionary to mark
(...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after
4101 ASSERT(!environment->HasBeenRegistered()); 4113 ASSERT(!environment->HasBeenRegistered());
4102 RegisterEnvironmentForDeoptimization(environment); 4114 RegisterEnvironmentForDeoptimization(environment);
4103 ASSERT(osr_pc_offset_ == -1); 4115 ASSERT(osr_pc_offset_ == -1);
4104 osr_pc_offset_ = masm()->pc_offset(); 4116 osr_pc_offset_ = masm()->pc_offset();
4105 } 4117 }
4106 4118
4107 4119
4108 #undef __ 4120 #undef __
4109 4121
4110 } } // namespace v8::internal 4122 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698