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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 | 1078 |
1079 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var, | 1079 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var, |
1080 TypeofState typeof_state, | 1080 TypeofState typeof_state, |
1081 Label* slow) { | 1081 Label* slow) { |
1082 Register context = rsi; | 1082 Register context = rsi; |
1083 Register temp = rdx; | 1083 Register temp = rdx; |
1084 | 1084 |
1085 Scope* s = scope(); | 1085 Scope* s = scope(); |
1086 while (s != NULL) { | 1086 while (s != NULL) { |
1087 if (s->num_heap_slots() > 0) { | 1087 if (s->num_heap_slots() > 0) { |
1088 if (s->calls_eval()) { | 1088 if (s->calls_non_strict_eval()) { |
1089 // Check that extension is NULL. | 1089 // Check that extension is NULL. |
1090 __ cmpq(ContextOperand(context, Context::EXTENSION_INDEX), | 1090 __ cmpq(ContextOperand(context, Context::EXTENSION_INDEX), |
1091 Immediate(0)); | 1091 Immediate(0)); |
1092 __ j(not_equal, slow); | 1092 __ j(not_equal, slow); |
1093 } | 1093 } |
1094 // Load next context in chain. | 1094 // Load next context in chain. |
1095 __ movq(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); | 1095 __ movq(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); |
1096 // Walk the rest of the chain without clobbering rsi. | 1096 // Walk the rest of the chain without clobbering rsi. |
1097 context = temp; | 1097 context = temp; |
1098 } | 1098 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 | 1138 |
1139 | 1139 |
1140 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1140 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
1141 Label* slow) { | 1141 Label* slow) { |
1142 ASSERT(var->IsContextSlot()); | 1142 ASSERT(var->IsContextSlot()); |
1143 Register context = rsi; | 1143 Register context = rsi; |
1144 Register temp = rbx; | 1144 Register temp = rbx; |
1145 | 1145 |
1146 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { | 1146 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { |
1147 if (s->num_heap_slots() > 0) { | 1147 if (s->num_heap_slots() > 0) { |
1148 if (s->calls_eval()) { | 1148 if (s->calls_non_strict_eval()) { |
1149 // Check that extension is NULL. | 1149 // Check that extension is NULL. |
1150 __ cmpq(ContextOperand(context, Context::EXTENSION_INDEX), | 1150 __ cmpq(ContextOperand(context, Context::EXTENSION_INDEX), |
1151 Immediate(0)); | 1151 Immediate(0)); |
1152 __ j(not_equal, slow); | 1152 __ j(not_equal, slow); |
1153 } | 1153 } |
1154 __ movq(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); | 1154 __ movq(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); |
1155 // Walk the rest of the chain without clobbering rsi. | 1155 // Walk the rest of the chain without clobbering rsi. |
1156 context = temp; | 1156 context = temp; |
1157 } | 1157 } |
1158 } | 1158 } |
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4187 *context_length = 0; | 4187 *context_length = 0; |
4188 return previous_; | 4188 return previous_; |
4189 } | 4189 } |
4190 | 4190 |
4191 | 4191 |
4192 #undef __ | 4192 #undef __ |
4193 | 4193 |
4194 } } // namespace v8::internal | 4194 } } // namespace v8::internal |
4195 | 4195 |
4196 #endif // V8_TARGET_ARCH_X64 | 4196 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |