OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 Handle<JSModule> module(context->module()); | 783 Handle<JSModule> module(context->module()); |
784 | 784 |
785 for (int j = 0; j < description->length(); ++j) { | 785 for (int j = 0; j < description->length(); ++j) { |
786 Handle<String> name(description->name(j)); | 786 Handle<String> name(description->name(j)); |
787 VariableMode mode = description->mode(j); | 787 VariableMode mode = description->mode(j); |
788 int index = description->index(j); | 788 int index = description->index(j); |
789 switch (mode) { | 789 switch (mode) { |
790 case VAR: | 790 case VAR: |
791 case LET: | 791 case LET: |
792 case CONST: | 792 case CONST: |
793 case CONST_LEGACY: { | 793 case CONST_LEGACY: |
| 794 case IMPORT: { |
794 PropertyAttributes attr = | 795 PropertyAttributes attr = |
795 IsImmutableVariableMode(mode) ? FROZEN : SEALED; | 796 IsImmutableVariableMode(mode) ? FROZEN : SEALED; |
796 Handle<AccessorInfo> info = | 797 Handle<AccessorInfo> info = |
797 Accessors::MakeModuleExport(name, index, attr); | 798 Accessors::MakeModuleExport(name, index, attr); |
798 Handle<Object> result = | 799 Handle<Object> result = |
799 JSObject::SetAccessor(module, info).ToHandleChecked(); | 800 JSObject::SetAccessor(module, info).ToHandleChecked(); |
800 DCHECK(!result->IsUndefined()); | 801 DCHECK(!result->IsUndefined()); |
801 USE(result); | 802 USE(result); |
802 break; | 803 break; |
803 } | 804 } |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 return Smi::FromInt(frame->GetArgumentsLength()); | 1123 return Smi::FromInt(frame->GetArgumentsLength()); |
1123 } | 1124 } |
1124 | 1125 |
1125 | 1126 |
1126 RUNTIME_FUNCTION(RuntimeReference_Arguments) { | 1127 RUNTIME_FUNCTION(RuntimeReference_Arguments) { |
1127 SealHandleScope shs(isolate); | 1128 SealHandleScope shs(isolate); |
1128 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); | 1129 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); |
1129 } | 1130 } |
1130 } | 1131 } |
1131 } // namespace v8::internal | 1132 } // namespace v8::internal |
OLD | NEW |