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

Side by Side Diff: src/x64/lithium-x64.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
« src/ia32/lithium-codegen-ia32.cc ('K') | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { 1098 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
1099 return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction); 1099 return instr->HasNoUses() ? NULL : DefineAsRegister(new LThisFunction);
1100 } 1100 }
1101 1101
1102 1102
1103 LInstruction* LChunkBuilder::DoContext(HContext* instr) { 1103 LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1104 return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext); 1104 return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext);
1105 } 1105 }
1106 1106
1107 1107
1108 LInstruction* LChunkBuilder::DoInlinedContext(HInlinedContext* instr) {
1109 // All implicit uses of the context from rsi or the stack frame must be
1110 // replaced with uses of HContext values before HInlinedContext will work.
1111 UNREACHABLE();
1112 return instr->HasNoUses() ? NULL : DefineAsRegister(new LInlinedContext);
1113 }
1114
1115
1108 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { 1116 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
1109 LOperand* context = UseRegisterAtStart(instr->value()); 1117 LOperand* context = UseRegisterAtStart(instr->value());
1110 return DefineAsRegister(new LOuterContext(context)); 1118 return DefineAsRegister(new LOuterContext(context));
1111 } 1119 }
1112 1120
1113 1121
1114 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { 1122 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
1115 return DefineAsRegister(new LGlobalObject); 1123 return DefineAsRegister(new LGlobalObject);
1116 } 1124 }
1117 1125
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 } 2152 }
2145 } 2153 }
2146 2154
2147 2155
2148 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2156 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2149 HEnvironment* outer = current_block_->last_environment(); 2157 HEnvironment* outer = current_block_->last_environment();
2150 HConstant* undefined = graph()->GetConstantUndefined(); 2158 HConstant* undefined = graph()->GetConstantUndefined();
2151 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2159 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2152 instr->function(), 2160 instr->function(),
2153 undefined, 2161 undefined,
2154 instr->call_kind()); 2162 instr->call_kind(),
2163 instr->context_changed());
2155 current_block_->UpdateEnvironment(inner); 2164 current_block_->UpdateEnvironment(inner);
2156 chunk_->AddInlinedClosure(instr->closure()); 2165 chunk_->AddInlinedClosure(instr->closure());
2157 return NULL; 2166 return NULL;
2158 } 2167 }
2159 2168
2160 2169
2161 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2170 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2162 HEnvironment* outer = current_block_->last_environment()->outer(); 2171 HEnvironment* outer = current_block_->last_environment()->outer();
2163 current_block_->UpdateEnvironment(outer); 2172 current_block_->UpdateEnvironment(outer);
2164 return NULL; 2173 return NULL;
2165 } 2174 }
2166 2175
2167 2176
2168 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2177 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2169 LOperand* key = UseOrConstantAtStart(instr->key()); 2178 LOperand* key = UseOrConstantAtStart(instr->key());
2170 LOperand* object = UseOrConstantAtStart(instr->object()); 2179 LOperand* object = UseOrConstantAtStart(instr->object());
2171 LIn* result = new LIn(key, object); 2180 LIn* result = new LIn(key, object);
2172 return MarkAsCall(DefineFixed(result, rax), instr); 2181 return MarkAsCall(DefineFixed(result, rax), instr);
2173 } 2182 }
2174 2183
2175 2184
2176 } } // namespace v8::internal 2185 } } // namespace v8::internal
2177 2186
2178 #endif // V8_TARGET_ARCH_X64 2187 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ia32/lithium-codegen-ia32.cc ('K') | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698