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

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

Issue 7739018: Inline functions with different contexts in the optimizing code generator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase to current tip-of-tree. Created 9 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
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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { 1114 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
1115 return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction); 1115 return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction);
1116 } 1116 }
1117 1117
1118 1118
1119 LInstruction* LChunkBuilder::DoContext(HContext* instr) { 1119 LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1120 return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext); 1120 return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext);
1121 } 1121 }
1122 1122
1123 1123
1124 LInstruction* LChunkBuilder::DoInlinedContext(HInlinedContext* instr) {
1125 return instr->HasNoUses() ? NULL : DefineAsRegister(new LInlinedContext);
1126 }
1127
1128
1124 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { 1129 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
1125 LOperand* context = UseRegisterAtStart(instr->value()); 1130 LOperand* context = UseRegisterAtStart(instr->value());
1126 return DefineAsRegister(new LOuterContext(context)); 1131 return DefineAsRegister(new LOuterContext(context));
1127 } 1132 }
1128 1133
1129 1134
1130 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { 1135 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
1131 LOperand* context = UseRegisterAtStart(instr->value()); 1136 LOperand* context = UseRegisterAtStart(instr->value());
1132 return DefineAsRegister(new LGlobalObject(context)); 1137 return DefineAsRegister(new LGlobalObject(context));
1133 } 1138 }
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 } 2237 }
2233 } 2238 }
2234 2239
2235 2240
2236 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2241 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2237 HEnvironment* outer = current_block_->last_environment(); 2242 HEnvironment* outer = current_block_->last_environment();
2238 HConstant* undefined = graph()->GetConstantUndefined(); 2243 HConstant* undefined = graph()->GetConstantUndefined();
2239 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2244 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2240 instr->function(), 2245 instr->function(),
2241 undefined, 2246 undefined,
2242 instr->call_kind()); 2247 instr->call_kind(),
2248 instr->context_changed());
2243 current_block_->UpdateEnvironment(inner); 2249 current_block_->UpdateEnvironment(inner);
2244 chunk_->AddInlinedClosure(instr->closure()); 2250 chunk_->AddInlinedClosure(instr->closure());
2245 return NULL; 2251 return NULL;
2246 } 2252 }
2247 2253
2248 2254
2249 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2255 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2250 HEnvironment* outer = current_block_->last_environment()->outer(); 2256 HEnvironment* outer = current_block_->last_environment()->outer();
2251 current_block_->UpdateEnvironment(outer); 2257 current_block_->UpdateEnvironment(outer);
2252 return NULL; 2258 return NULL;
2253 } 2259 }
2254 2260
2255 2261
2256 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2262 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2257 LOperand* context = UseFixed(instr->context(), esi); 2263 LOperand* context = UseFixed(instr->context(), esi);
2258 LOperand* key = UseOrConstantAtStart(instr->key()); 2264 LOperand* key = UseOrConstantAtStart(instr->key());
2259 LOperand* object = UseOrConstantAtStart(instr->object()); 2265 LOperand* object = UseOrConstantAtStart(instr->object());
2260 LIn* result = new LIn(context, key, object); 2266 LIn* result = new LIn(context, key, object);
2261 return MarkAsCall(DefineFixed(result, eax), instr); 2267 return MarkAsCall(DefineFixed(result, eax), instr);
2262 } 2268 }
2263 2269
2264 2270
2265 } } // namespace v8::internal 2271 } } // namespace v8::internal
2266 2272
2267 #endif // V8_TARGET_ARCH_IA32 2273 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/ia32/lithium-codegen-ia32.cc ('K') | « src/ia32/lithium-ia32.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698