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

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: Merged to trunk 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
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 PropertyAttributes attr = 745 PropertyAttributes attr =
746 IsImmutableVariableMode(mode) ? FROZEN : SEALED; 746 IsImmutableVariableMode(mode) ? FROZEN : SEALED;
747 Handle<AccessorInfo> info = 747 Handle<AccessorInfo> info =
748 Accessors::MakeModuleExport(name, index, attr); 748 Accessors::MakeModuleExport(name, index, attr);
749 Handle<Object> result = 749 Handle<Object> result =
750 JSObject::SetAccessor(module, info).ToHandleChecked(); 750 JSObject::SetAccessor(module, info).ToHandleChecked();
751 DCHECK(!result->IsUndefined()); 751 DCHECK(!result->IsUndefined());
752 USE(result); 752 USE(result);
753 break; 753 break;
754 } 754 }
755 case MODULE: {
756 Object* referenced_context = Context::cast(host_context)->get(index);
757 Handle<JSModule> value(Context::cast(referenced_context)->module());
758 JSObject::SetOwnPropertyIgnoreAttributes(module, name, value, FROZEN)
759 .Assert();
760 break;
761 }
762 case INTERNAL: 755 case INTERNAL:
763 case TEMPORARY: 756 case TEMPORARY:
764 case DYNAMIC: 757 case DYNAMIC:
765 case DYNAMIC_GLOBAL: 758 case DYNAMIC_GLOBAL:
766 case DYNAMIC_LOCAL: 759 case DYNAMIC_LOCAL:
767 UNREACHABLE(); 760 UNREACHABLE();
768 } 761 }
769 } 762 }
770 763
771 JSObject::PreventExtensions(module).Assert(); 764 JSObject::PreventExtensions(module).Assert();
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 return Smi::FromInt(frame->GetArgumentsLength()); 1076 return Smi::FromInt(frame->GetArgumentsLength());
1084 } 1077 }
1085 1078
1086 1079
1087 RUNTIME_FUNCTION(RuntimeReference_Arguments) { 1080 RUNTIME_FUNCTION(RuntimeReference_Arguments) {
1088 SealHandleScope shs(isolate); 1081 SealHandleScope shs(isolate);
1089 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); 1082 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate);
1090 } 1083 }
1091 } 1084 }
1092 } // namespace v8::internal 1085 } // namespace v8::internal
OLDNEW
« src/interface.cc ('K') | « src/rewriter.cc ('k') | src/scopeinfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698