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

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

Issue 1132513003: Call builtin code wrapped in functions from the bootstrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix extra natives Created 5 years, 7 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.js ('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/v8.h" 5 #include "src/v8.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/debug.h" 9 #include "src/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 1271 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
1272 function->CompleteInobjectSlackTracking(); 1272 function->CompleteInobjectSlackTracking();
1273 1273
1274 return isolate->heap()->undefined_value(); 1274 return isolate->heap()->undefined_value();
1275 } 1275 }
1276 1276
1277 1277
1278 RUNTIME_FUNCTION(Runtime_GlobalProxy) { 1278 RUNTIME_FUNCTION(Runtime_GlobalProxy) {
1279 SealHandleScope shs(isolate); 1279 SealHandleScope shs(isolate);
1280 DCHECK(args.length() == 1); 1280 DCHECK(args.length() == 1);
1281 CONVERT_ARG_CHECKED(Object, global, 0); 1281 CONVERT_ARG_CHECKED(JSFunction, function, 0);
1282 if (!global->IsJSGlobalObject()) return isolate->heap()->null_value(); 1282 return function->context()->global_proxy();
1283 return JSGlobalObject::cast(global)->global_proxy();
1284 } 1283 }
1285 1284
1286 1285
1287 RUNTIME_FUNCTION(Runtime_LookupAccessor) { 1286 RUNTIME_FUNCTION(Runtime_LookupAccessor) {
1288 HandleScope scope(isolate); 1287 HandleScope scope(isolate);
1289 DCHECK(args.length() == 3); 1288 DCHECK(args.length() == 3);
1290 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0); 1289 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0);
1291 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); 1290 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
1292 CONVERT_SMI_ARG_CHECKED(flag, 2); 1291 CONVERT_SMI_ARG_CHECKED(flag, 2);
1293 AccessorComponent component = flag == 0 ? ACCESSOR_GETTER : ACCESSOR_SETTER; 1292 AccessorComponent component = flag == 0 ? ACCESSOR_GETTER : ACCESSOR_SETTER;
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); 1552 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3);
1554 1553
1555 RETURN_FAILURE_ON_EXCEPTION( 1554 RETURN_FAILURE_ON_EXCEPTION(
1556 isolate, 1555 isolate,
1557 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), 1556 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(),
1558 setter, attrs)); 1557 setter, attrs));
1559 return isolate->heap()->undefined_value(); 1558 return isolate->heap()->undefined_value();
1560 } 1559 }
1561 } 1560 }
1562 } // namespace v8::internal 1561 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.js ('k') | src/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698