Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: src/runtime/runtime-scopes.cc

Issue 918373002: Strip Interface class of most of its logic, make it all about Module exports (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Properly freeze interface at the end of ParseModule Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/rewriter.cc ('k') | src/scopeinfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | src/scopeinfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698