| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "src/ast/context-slot-cache.h" | 7 #include "src/ast/context-slot-cache.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/ast/variables.h" | 9 #include "src/ast/variables.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 IsDebugEvaluateScopeField::encode(false); | 308 IsDebugEvaluateScopeField::encode(false); |
| 309 scope_info->SetFlags(flags); | 309 scope_info->SetFlags(flags); |
| 310 | 310 |
| 311 scope_info->SetParameterCount(0); | 311 scope_info->SetParameterCount(0); |
| 312 scope_info->SetStackLocalCount(0); | 312 scope_info->SetStackLocalCount(0); |
| 313 scope_info->SetContextLocalCount(0); | 313 scope_info->SetContextLocalCount(0); |
| 314 | 314 |
| 315 int index = kVariablePartIndex; | 315 int index = kVariablePartIndex; |
| 316 DCHECK_EQ(index, scope_info->ParameterNamesIndex()); | 316 DCHECK_EQ(index, scope_info->ParameterNamesIndex()); |
| 317 DCHECK_EQ(index, scope_info->StackLocalFirstSlotIndex()); | 317 DCHECK_EQ(index, scope_info->StackLocalFirstSlotIndex()); |
| 318 scope_info->set(index++, Smi::FromInt(0)); | 318 scope_info->set(index++, Smi::kZero); |
| 319 DCHECK_EQ(index, scope_info->StackLocalNamesIndex()); | 319 DCHECK_EQ(index, scope_info->StackLocalNamesIndex()); |
| 320 DCHECK_EQ(index, scope_info->ReceiverInfoIndex()); | 320 DCHECK_EQ(index, scope_info->ReceiverInfoIndex()); |
| 321 DCHECK_EQ(index, scope_info->FunctionNameInfoIndex()); | 321 DCHECK_EQ(index, scope_info->FunctionNameInfoIndex()); |
| 322 DCHECK(index == scope_info->OuterScopeInfoIndex()); | 322 DCHECK(index == scope_info->OuterScopeInfoIndex()); |
| 323 if (has_outer_scope_info) { | 323 if (has_outer_scope_info) { |
| 324 scope_info->set(index++, *outer_scope.ToHandleChecked()); | 324 scope_info->set(index++, *outer_scope.ToHandleChecked()); |
| 325 } | 325 } |
| 326 DCHECK_EQ(index, scope_info->length()); | 326 DCHECK_EQ(index, scope_info->length()); |
| 327 DCHECK_EQ(0, scope_info->ParameterCount()); | 327 DCHECK_EQ(0, scope_info->ParameterCount()); |
| 328 DCHECK_EQ(Context::MIN_CONTEXT_SLOTS, scope_info->ContextLength()); | 328 DCHECK_EQ(Context::MIN_CONTEXT_SLOTS, scope_info->ContextLength()); |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 result->set(kModuleRequestsIndex, *module_requests); | 899 result->set(kModuleRequestsIndex, *module_requests); |
| 900 result->set(kSpecialExportsIndex, *special_exports); | 900 result->set(kSpecialExportsIndex, *special_exports); |
| 901 result->set(kRegularExportsIndex, *regular_exports); | 901 result->set(kRegularExportsIndex, *regular_exports); |
| 902 result->set(kNamespaceImportsIndex, *namespace_imports); | 902 result->set(kNamespaceImportsIndex, *namespace_imports); |
| 903 result->set(kRegularImportsIndex, *regular_imports); | 903 result->set(kRegularImportsIndex, *regular_imports); |
| 904 return result; | 904 return result; |
| 905 } | 905 } |
| 906 | 906 |
| 907 } // namespace internal | 907 } // namespace internal |
| 908 } // namespace v8 | 908 } // namespace v8 |
| OLD | NEW |