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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 scope_name_ = isolate_->factory()->empty_symbol(); | 193 scope_name_ = isolate_->factory()->empty_symbol(); |
194 dynamics_ = NULL; | 194 dynamics_ = NULL; |
195 receiver_ = NULL; | 195 receiver_ = NULL; |
196 function_ = NULL; | 196 function_ = NULL; |
197 arguments_ = NULL; | 197 arguments_ = NULL; |
198 illegal_redecl_ = NULL; | 198 illegal_redecl_ = NULL; |
199 scope_inside_with_ = false; | 199 scope_inside_with_ = false; |
200 scope_contains_with_ = false; | 200 scope_contains_with_ = false; |
201 scope_calls_eval_ = false; | 201 scope_calls_eval_ = false; |
202 // Inherit the strict mode from the parent scope. | 202 // Inherit the strict mode from the parent scope. |
203 strict_mode_ = (outer_scope != NULL) && outer_scope->strict_mode_; | 203 strict_mode_flag_ = (outer_scope != NULL) |
| 204 ? outer_scope->strict_mode_flag_ : kNonStrictMode; |
204 outer_scope_calls_non_strict_eval_ = false; | 205 outer_scope_calls_non_strict_eval_ = false; |
205 inner_scope_calls_eval_ = false; | 206 inner_scope_calls_eval_ = false; |
206 force_eager_compilation_ = false; | 207 force_eager_compilation_ = false; |
207 num_var_or_const_ = 0; | 208 num_var_or_const_ = 0; |
208 num_stack_slots_ = 0; | 209 num_stack_slots_ = 0; |
209 num_heap_slots_ = 0; | 210 num_heap_slots_ = 0; |
210 scope_info_ = scope_info; | 211 scope_info_ = scope_info; |
211 } | 212 } |
212 | 213 |
213 | 214 |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && | 1137 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && |
1137 !must_have_local_context) { | 1138 !must_have_local_context) { |
1138 num_heap_slots_ = 0; | 1139 num_heap_slots_ = 0; |
1139 } | 1140 } |
1140 | 1141 |
1141 // Allocation done. | 1142 // Allocation done. |
1142 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); | 1143 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); |
1143 } | 1144 } |
1144 | 1145 |
1145 } } // namespace v8::internal | 1146 } } // namespace v8::internal |
OLD | NEW |