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/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
10 | 10 |
(...skipping 184 matching lines...) Loading... |
195 DCHECK_EQ(kCreatedInitialized, init_flag); | 195 DCHECK_EQ(kCreatedInitialized, init_flag); |
196 *attributes = READ_ONLY; | 196 *attributes = READ_ONLY; |
197 *binding_flags = BINDING_IS_INITIALIZED; | 197 *binding_flags = BINDING_IS_INITIALIZED; |
198 break; | 198 break; |
199 case CONST: | 199 case CONST: |
200 *attributes = READ_ONLY; | 200 *attributes = READ_ONLY; |
201 *binding_flags = (init_flag == kNeedsInitialization) | 201 *binding_flags = (init_flag == kNeedsInitialization) |
202 ? BINDING_CHECK_INITIALIZED | 202 ? BINDING_CHECK_INITIALIZED |
203 : BINDING_IS_INITIALIZED; | 203 : BINDING_IS_INITIALIZED; |
204 break; | 204 break; |
205 case IMPORT: // TODO(neis): Make sure this is what we want for IMPORT. | |
206 case DYNAMIC: | 205 case DYNAMIC: |
207 case DYNAMIC_GLOBAL: | 206 case DYNAMIC_GLOBAL: |
208 case DYNAMIC_LOCAL: | 207 case DYNAMIC_LOCAL: |
209 case TEMPORARY: | 208 case TEMPORARY: |
210 // Note: Fixed context slots are statically allocated by the compiler. | 209 // Note: Fixed context slots are statically allocated by the compiler. |
211 // Statically allocated variables always have a statically known mode, | 210 // Statically allocated variables always have a statically known mode, |
212 // which is the mode with which they were declared when added to the | 211 // which is the mode with which they were declared when added to the |
213 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically | 212 // scope. Thus, the DYNAMIC mode (which corresponds to dynamically |
214 // declared variables that were introduced through declaration nodes) | 213 // declared variables that were introduced through declaration nodes) |
215 // must not appear here. | 214 // must not appear here. |
(...skipping 393 matching lines...) Loading... |
609 | 608 |
610 int previous_value = errors_thrown()->value(); | 609 int previous_value = errors_thrown()->value(); |
611 set_errors_thrown(Smi::FromInt(previous_value + 1)); | 610 set_errors_thrown(Smi::FromInt(previous_value + 1)); |
612 } | 611 } |
613 | 612 |
614 | 613 |
615 int Context::GetErrorsThrown() { return errors_thrown()->value(); } | 614 int Context::GetErrorsThrown() { return errors_thrown()->value(); } |
616 | 615 |
617 } // namespace internal | 616 } // namespace internal |
618 } // namespace v8 | 617 } // namespace v8 |
OLD | NEW |