OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 void VirtualFrame::Push(Expression* expr) { | 1164 void VirtualFrame::Push(Expression* expr) { |
1165 ASSERT(expr->IsTrivial()); | 1165 ASSERT(expr->IsTrivial()); |
1166 | 1166 |
1167 Literal* lit = expr->AsLiteral(); | 1167 Literal* lit = expr->AsLiteral(); |
1168 if (lit != NULL) { | 1168 if (lit != NULL) { |
1169 Push(lit->handle()); | 1169 Push(lit->handle()); |
1170 return; | 1170 return; |
1171 } | 1171 } |
1172 | 1172 |
1173 VariableProxy* proxy = expr->AsVariableProxy(); | 1173 VariableProxy* proxy = expr->AsVariableProxy(); |
1174 if (proxy != NULL && proxy->is_this()) { | 1174 if (proxy != NULL) { |
1175 PushParameterAt(-1); | 1175 Slot* slot = proxy->var()->slot(); |
1176 return; | 1176 if (slot->type() == Slot::LOCAL) { |
| 1177 PushLocalAt(slot->index()); |
| 1178 return; |
| 1179 } |
| 1180 if (slot->type() == Slot::PARAMETER) { |
| 1181 PushParameterAt(slot->index()); |
| 1182 return; |
| 1183 } |
1177 } | 1184 } |
1178 | |
1179 UNREACHABLE(); | 1185 UNREACHABLE(); |
1180 } | 1186 } |
1181 | 1187 |
1182 | 1188 |
1183 #undef __ | 1189 #undef __ |
1184 | 1190 |
1185 } } // namespace v8::internal | 1191 } } // namespace v8::internal |
OLD | NEW |