OLD | NEW |
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 Loading... |
1102 | 1102 |
1103 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var, | 1103 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var, |
1104 TypeofState typeof_state, | 1104 TypeofState typeof_state, |
1105 Label* slow) { | 1105 Label* slow) { |
1106 Register context = esi; | 1106 Register context = esi; |
1107 Register temp = edx; | 1107 Register temp = edx; |
1108 | 1108 |
1109 Scope* s = scope(); | 1109 Scope* s = scope(); |
1110 while (s != NULL) { | 1110 while (s != NULL) { |
1111 if (s->num_heap_slots() > 0) { | 1111 if (s->num_heap_slots() > 0) { |
1112 if (s->calls_eval()) { | 1112 if (s->calls_non_strict_eval()) { |
1113 // Check that extension is NULL. | 1113 // Check that extension is NULL. |
1114 __ cmp(ContextOperand(context, Context::EXTENSION_INDEX), | 1114 __ cmp(ContextOperand(context, Context::EXTENSION_INDEX), |
1115 Immediate(0)); | 1115 Immediate(0)); |
1116 __ j(not_equal, slow); | 1116 __ j(not_equal, slow); |
1117 } | 1117 } |
1118 // Load next context in chain. | 1118 // Load next context in chain. |
1119 __ mov(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); | 1119 __ mov(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); |
1120 // Walk the rest of the chain without clobbering esi. | 1120 // Walk the rest of the chain without clobbering esi. |
1121 context = temp; | 1121 context = temp; |
1122 } | 1122 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 | 1161 |
1162 | 1162 |
1163 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1163 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
1164 Label* slow) { | 1164 Label* slow) { |
1165 ASSERT(var->IsContextSlot()); | 1165 ASSERT(var->IsContextSlot()); |
1166 Register context = esi; | 1166 Register context = esi; |
1167 Register temp = ebx; | 1167 Register temp = ebx; |
1168 | 1168 |
1169 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { | 1169 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { |
1170 if (s->num_heap_slots() > 0) { | 1170 if (s->num_heap_slots() > 0) { |
1171 if (s->calls_eval()) { | 1171 if (s->calls_non_strict_eval()) { |
1172 // Check that extension is NULL. | 1172 // Check that extension is NULL. |
1173 __ cmp(ContextOperand(context, Context::EXTENSION_INDEX), | 1173 __ cmp(ContextOperand(context, Context::EXTENSION_INDEX), |
1174 Immediate(0)); | 1174 Immediate(0)); |
1175 __ j(not_equal, slow); | 1175 __ j(not_equal, slow); |
1176 } | 1176 } |
1177 __ mov(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); | 1177 __ mov(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); |
1178 // Walk the rest of the chain without clobbering esi. | 1178 // Walk the rest of the chain without clobbering esi. |
1179 context = temp; | 1179 context = temp; |
1180 } | 1180 } |
1181 } | 1181 } |
(...skipping 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4335 *context_length = 0; | 4335 *context_length = 0; |
4336 return previous_; | 4336 return previous_; |
4337 } | 4337 } |
4338 | 4338 |
4339 | 4339 |
4340 #undef __ | 4340 #undef __ |
4341 | 4341 |
4342 } } // namespace v8::internal | 4342 } } // namespace v8::internal |
4343 | 4343 |
4344 #endif // V8_TARGET_ARCH_IA32 | 4344 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |