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

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

Issue 1929293002: Revert of Remove more dead code after Object.observe removal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/runtime.h ('k') | src/runtime/runtime-object.cc » ('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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 Execution::Call(isolate, target, receiver, argc, argv.start())); 273 Execution::Call(isolate, target, receiver, argc, argv.start()));
274 return *result; 274 return *result;
275 } 275 }
276 276
277 277
278 // ES6 section 9.2.1.2, OrdinaryCallBindThis for sloppy callee. 278 // ES6 section 9.2.1.2, OrdinaryCallBindThis for sloppy callee.
279 RUNTIME_FUNCTION(Runtime_ConvertReceiver) { 279 RUNTIME_FUNCTION(Runtime_ConvertReceiver) {
280 HandleScope scope(isolate); 280 HandleScope scope(isolate);
281 DCHECK(args.length() == 1); 281 DCHECK(args.length() == 1);
282 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); 282 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
283 return *Object::ConvertReceiver(isolate, receiver).ToHandleChecked(); 283 if (receiver->IsNull() || receiver->IsUndefined()) {
284 return isolate->global_proxy();
285 }
286 return *Object::ToObject(isolate, receiver).ToHandleChecked();
284 } 287 }
285 288
286 289
287 RUNTIME_FUNCTION(Runtime_IsFunction) { 290 RUNTIME_FUNCTION(Runtime_IsFunction) {
288 SealHandleScope shs(isolate); 291 SealHandleScope shs(isolate);
289 DCHECK_EQ(1, args.length()); 292 DCHECK_EQ(1, args.length());
290 CONVERT_ARG_CHECKED(Object, object, 0); 293 CONVERT_ARG_CHECKED(Object, object, 0);
291 return isolate->heap()->ToBoolean(object->IsFunction()); 294 return isolate->heap()->ToBoolean(object->IsFunction());
292 } 295 }
293 296
294 297
295 RUNTIME_FUNCTION(Runtime_FunctionToString) { 298 RUNTIME_FUNCTION(Runtime_FunctionToString) {
296 HandleScope scope(isolate); 299 HandleScope scope(isolate);
297 DCHECK_EQ(1, args.length()); 300 DCHECK_EQ(1, args.length());
298 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 301 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
299 return function->IsJSBoundFunction() 302 return function->IsJSBoundFunction()
300 ? *JSBoundFunction::ToString( 303 ? *JSBoundFunction::ToString(
301 Handle<JSBoundFunction>::cast(function)) 304 Handle<JSBoundFunction>::cast(function))
302 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 305 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
303 } 306 }
304 307
305 } // namespace internal 308 } // namespace internal
306 } // namespace v8 309 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698