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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 DCHECK_EQ(index, scope_info->OuterScopeInfoIndex()); | 389 DCHECK_EQ(index, scope_info->OuterScopeInfoIndex()); |
390 DCHECK_EQ(index, scope_info->length()); | 390 DCHECK_EQ(index, scope_info->length()); |
391 DCHECK_EQ(scope_info->ParameterCount(), 0); | 391 DCHECK_EQ(scope_info->ParameterCount(), 0); |
392 DCHECK_EQ(scope_info->ContextLength(), Context::MIN_CONTEXT_SLOTS + 1); | 392 DCHECK_EQ(scope_info->ContextLength(), Context::MIN_CONTEXT_SLOTS + 1); |
393 | 393 |
394 return scope_info; | 394 return scope_info; |
395 } | 395 } |
396 | 396 |
397 | 397 |
398 ScopeInfo* ScopeInfo::Empty(Isolate* isolate) { | 398 ScopeInfo* ScopeInfo::Empty(Isolate* isolate) { |
399 return reinterpret_cast<ScopeInfo*>(isolate->heap()->empty_fixed_array()); | 399 return isolate->heap()->empty_scope_info(); |
400 } | 400 } |
401 | 401 |
402 | 402 |
403 ScopeType ScopeInfo::scope_type() { | 403 ScopeType ScopeInfo::scope_type() { |
404 DCHECK_LT(0, length()); | 404 DCHECK_LT(0, length()); |
405 return ScopeTypeField::decode(Flags()); | 405 return ScopeTypeField::decode(Flags()); |
406 } | 406 } |
407 | 407 |
408 | 408 |
409 bool ScopeInfo::CallsEval() { | 409 bool ScopeInfo::CallsEval() { |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 | 882 |
883 Handle<ModuleInfo> result = isolate->factory()->NewModuleInfo(); | 883 Handle<ModuleInfo> result = isolate->factory()->NewModuleInfo(); |
884 result->set(kModuleRequestsIndex, *module_requests); | 884 result->set(kModuleRequestsIndex, *module_requests); |
885 result->set(kSpecialExportsIndex, *special_exports); | 885 result->set(kSpecialExportsIndex, *special_exports); |
886 result->set(kRegularExportsIndex, *regular_exports); | 886 result->set(kRegularExportsIndex, *regular_exports); |
887 return result; | 887 return result; |
888 } | 888 } |
889 | 889 |
890 } // namespace internal | 890 } // namespace internal |
891 } // namespace v8 | 891 } // namespace v8 |
OLD | NEW |