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

Side by Side Diff: src/arm/lithium-arm.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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { 1102 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
1103 return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction); 1103 return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction);
1104 } 1104 }
1105 1105
1106 1106
1107 LInstruction* LChunkBuilder::DoContext(HContext* instr) { 1107 LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1108 return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext); 1108 return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext);
1109 } 1109 }
1110 1110
1111 1111
1112 LInstruction* LChunkBuilder::DoInlinedContext(HInlinedContext* instr) {
1113 // All implicit uses of the context from the context register or from
1114 // the stack frame must be replaced with uses of HContext values
1115 // before HInlinedContext will work.
1116 UNREACHABLE();
1117 return instr->HasNoUses() ? NULL : DefineAsRegister(new LInlinedContext);
Kevin Millikin (Chromium) 2011/09/15 11:17:24 Just UNREACHABLE, please, no untested dead code.
1118 }
1119
1120
1112 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { 1121 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
1113 LOperand* context = UseRegisterAtStart(instr->value()); 1122 LOperand* context = UseRegisterAtStart(instr->value());
1114 return DefineAsRegister(new LOuterContext(context)); 1123 return DefineAsRegister(new LOuterContext(context));
1115 } 1124 }
1116 1125
1117 1126
1118 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { 1127 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
1119 LOperand* context = UseRegisterAtStart(instr->value()); 1128 LOperand* context = UseRegisterAtStart(instr->value());
1120 return DefineAsRegister(new LGlobalObject(context)); 1129 return DefineAsRegister(new LGlobalObject(context));
1121 } 1130 }
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 } 2168 }
2160 } 2169 }
2161 2170
2162 2171
2163 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2172 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2164 HEnvironment* outer = current_block_->last_environment(); 2173 HEnvironment* outer = current_block_->last_environment();
2165 HConstant* undefined = graph()->GetConstantUndefined(); 2174 HConstant* undefined = graph()->GetConstantUndefined();
2166 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2175 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2167 instr->function(), 2176 instr->function(),
2168 undefined, 2177 undefined,
2169 instr->call_kind()); 2178 instr->call_kind(),
2179 instr->context_changed());
2170 current_block_->UpdateEnvironment(inner); 2180 current_block_->UpdateEnvironment(inner);
2171 chunk_->AddInlinedClosure(instr->closure()); 2181 chunk_->AddInlinedClosure(instr->closure());
2172 return NULL; 2182 return NULL;
2173 } 2183 }
2174 2184
2175 2185
2176 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2186 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2177 HEnvironment* outer = current_block_->last_environment()->outer(); 2187 HEnvironment* outer = current_block_->last_environment()->outer();
2178 current_block_->UpdateEnvironment(outer); 2188 current_block_->UpdateEnvironment(outer);
2179 return NULL; 2189 return NULL;
2180 } 2190 }
2181 2191
2182 2192
2183 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2193 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2184 LOperand* key = UseRegisterAtStart(instr->key()); 2194 LOperand* key = UseRegisterAtStart(instr->key());
2185 LOperand* object = UseRegisterAtStart(instr->object()); 2195 LOperand* object = UseRegisterAtStart(instr->object());
2186 LIn* result = new LIn(key, object); 2196 LIn* result = new LIn(key, object);
2187 return MarkAsCall(DefineFixed(result, r0), instr); 2197 return MarkAsCall(DefineFixed(result, r0), instr);
2188 } 2198 }
2189 2199
2190 2200
2191 } } // namespace v8::internal 2201 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698