| 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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 PropertyAttributes attr = | 794 PropertyAttributes attr = |
| 795 IsImmutableVariableMode(mode) ? FROZEN : SEALED; | 795 IsImmutableVariableMode(mode) ? FROZEN : SEALED; |
| 796 Handle<AccessorInfo> info = | 796 Handle<AccessorInfo> info = |
| 797 Accessors::MakeModuleExport(name, index, attr); | 797 Accessors::MakeModuleExport(name, index, attr); |
| 798 Handle<Object> result = | 798 Handle<Object> result = |
| 799 JSObject::SetAccessor(module, info).ToHandleChecked(); | 799 JSObject::SetAccessor(module, info).ToHandleChecked(); |
| 800 DCHECK(!result->IsUndefined()); | 800 DCHECK(!result->IsUndefined()); |
| 801 USE(result); | 801 USE(result); |
| 802 break; | 802 break; |
| 803 } | 803 } |
| 804 case MODULE: { | |
| 805 Object* referenced_context = Context::cast(host_context)->get(index); | |
| 806 Handle<JSModule> value(Context::cast(referenced_context)->module()); | |
| 807 JSObject::SetOwnPropertyIgnoreAttributes(module, name, value, FROZEN) | |
| 808 .Assert(); | |
| 809 break; | |
| 810 } | |
| 811 case INTERNAL: | 804 case INTERNAL: |
| 812 case TEMPORARY: | 805 case TEMPORARY: |
| 813 case DYNAMIC: | 806 case DYNAMIC: |
| 814 case DYNAMIC_GLOBAL: | 807 case DYNAMIC_GLOBAL: |
| 815 case DYNAMIC_LOCAL: | 808 case DYNAMIC_LOCAL: |
| 816 UNREACHABLE(); | 809 UNREACHABLE(); |
| 817 } | 810 } |
| 818 } | 811 } |
| 819 | 812 |
| 820 JSObject::PreventExtensions(module).Assert(); | 813 JSObject::PreventExtensions(module).Assert(); |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 return Smi::FromInt(frame->GetArgumentsLength()); | 1125 return Smi::FromInt(frame->GetArgumentsLength()); |
| 1133 } | 1126 } |
| 1134 | 1127 |
| 1135 | 1128 |
| 1136 RUNTIME_FUNCTION(RuntimeReference_Arguments) { | 1129 RUNTIME_FUNCTION(RuntimeReference_Arguments) { |
| 1137 SealHandleScope shs(isolate); | 1130 SealHandleScope shs(isolate); |
| 1138 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); | 1131 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); |
| 1139 } | 1132 } |
| 1140 } | 1133 } |
| 1141 } // namespace v8::internal | 1134 } // namespace v8::internal |
| OLD | NEW |