OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/contexts.h" | 5 #include "src/contexts.h" |
6 | 6 |
7 #include "src/ast/scopeinfo.h" | 7 #include "src/ast/scopeinfo.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 DCHECK_EQ(kCreatedInitialized, init_flag); | 196 DCHECK_EQ(kCreatedInitialized, init_flag); |
197 *attributes = READ_ONLY; | 197 *attributes = READ_ONLY; |
198 *binding_flags = BINDING_IS_INITIALIZED; | 198 *binding_flags = BINDING_IS_INITIALIZED; |
199 break; | 199 break; |
200 case CONST: | 200 case CONST: |
201 *attributes = READ_ONLY; | 201 *attributes = READ_ONLY; |
202 *binding_flags = (init_flag == kNeedsInitialization) | 202 *binding_flags = (init_flag == kNeedsInitialization) |
203 ? BINDING_CHECK_INITIALIZED | 203 ? BINDING_CHECK_INITIALIZED |
204 : BINDING_IS_INITIALIZED; | 204 : BINDING_IS_INITIALIZED; |
205 break; | 205 break; |
| 206 case IMPORT: // TODO(neis): Make sure this is what we want for IMPORT. |
206 case DYNAMIC: | 207 case DYNAMIC: |
207 case DYNAMIC_GLOBAL: | 208 case DYNAMIC_GLOBAL: |
208 case DYNAMIC_LOCAL: | 209 case DYNAMIC_LOCAL: |
209 case TEMPORARY: | 210 case TEMPORARY: |
210 // Note: Fixed context slots are statically allocated by the compiler. | 211 // Note: Fixed context slots are statically allocated by the compiler. |
211 // Statically allocated variables always have a statically known mode, | 212 // Statically allocated variables always have a statically known mode, |
212 // which is the mode with which they were declared when added to the | 213 // which is the mode with which they were declared when added to the |
213 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically | 214 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically |
214 // declared variables that were introduced through declaration nodes) | 215 // declared variables that were introduced through declaration nodes) |
215 // must not appear here. | 216 // must not appear here. |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 610 |
610 int previous_value = errors_thrown()->value(); | 611 int previous_value = errors_thrown()->value(); |
611 set_errors_thrown(Smi::FromInt(previous_value + 1)); | 612 set_errors_thrown(Smi::FromInt(previous_value + 1)); |
612 } | 613 } |
613 | 614 |
614 | 615 |
615 int Context::GetErrorsThrown() { return errors_thrown()->value(); } | 616 int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
616 | 617 |
617 } // namespace internal | 618 } // namespace internal |
618 } // namespace v8 | 619 } // namespace v8 |
OLD | NEW |