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

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

Issue 1318043002: Native context: do not put public symbols and flags on the js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix and rebase Created 5 years, 3 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/runtime/runtime.h ('k') | src/string.js » ('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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
11 #include "src/frames-inl.h" 11 #include "src/frames-inl.h"
12 #include "src/messages.h" 12 #include "src/messages.h"
13 #include "src/parser.h" 13 #include "src/parser.h"
14 #include "src/prettyprinter.h" 14 #include "src/prettyprinter.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) { 19 RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) {
20 SealHandleScope shs(isolate); 20 SealHandleScope shs(isolate);
21 DCHECK(args.length() == 0); 21 DCHECK(args.length() == 0);
22 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); 22 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
23 return isolate->heap()->undefined_value(); 23 return isolate->heap()->undefined_value();
24 } 24 }
25 25
26 26
27 RUNTIME_FUNCTION(Runtime_ExportPrivateSymbols) { 27 RUNTIME_FUNCTION(Runtime_ExportFromRuntime) {
28 HandleScope scope(isolate); 28 HandleScope scope(isolate);
29 DCHECK(args.length() == 1); 29 DCHECK(args.length() == 1);
30 CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0); 30 CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0);
31 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); 31 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
32 JSObject::NormalizeProperties(container, KEEP_INOBJECT_PROPERTIES, 10, 32 JSObject::NormalizeProperties(container, KEEP_INOBJECT_PROPERTIES, 10,
33 "ExportPrivateSymbols"); 33 "ExportFromRuntime");
34 Bootstrapper::ExportPrivateSymbols(isolate, container); 34 Bootstrapper::ExportFromRuntime(isolate, container);
35 JSObject::MigrateSlowToFast(container, 0, "ExportPrivateSymbols"); 35 JSObject::MigrateSlowToFast(container, 0, "ExportFromRuntime");
36 return *container; 36 return *container;
37 } 37 }
38 38
39
40 RUNTIME_FUNCTION(Runtime_ExportExperimentalFromRuntime) {
41 HandleScope scope(isolate);
42 DCHECK(args.length() == 1);
43 CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0);
44 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
45 JSObject::NormalizeProperties(container, KEEP_INOBJECT_PROPERTIES, 10,
46 "ExportExperimentalFromRuntime");
47 Bootstrapper::ExportExperimentalFromRuntime(isolate, container);
48 JSObject::MigrateSlowToFast(container, 0, "ExportExperimentalFromRuntime");
49 return *container;
50 }
51
39 52
40 RUNTIME_FUNCTION(Runtime_InstallToContext) { 53 RUNTIME_FUNCTION(Runtime_InstallToContext) {
41 HandleScope scope(isolate); 54 HandleScope scope(isolate);
42 DCHECK(args.length() == 1); 55 DCHECK(args.length() == 1);
43 CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0); 56 CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
44 RUNTIME_ASSERT(array->HasFastElements()); 57 RUNTIME_ASSERT(array->HasFastElements());
45 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); 58 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
46 Handle<Context> native_context = isolate->native_context(); 59 Handle<Context> native_context = isolate->native_context();
47 Handle<FixedArray> fixed_array(FixedArray::cast(array->elements())); 60 Handle<FixedArray> fixed_array(FixedArray::cast(array->elements()));
48 int length = Smi::cast(array->length())->value(); 61 int length = Smi::cast(array->length())->value();
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 422 }
410 423
411 424
412 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { 425 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) {
413 HandleScope shs(isolate); 426 HandleScope shs(isolate);
414 return isolate->heap()->code_stub_exports_object(); 427 return isolate->heap()->code_stub_exports_object();
415 } 428 }
416 429
417 } // namespace internal 430 } // namespace internal
418 } // namespace v8 431 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698