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

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

Issue 1479233002: Deprecate the %IsConstructCall intrinsic completely. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_js-use-new-target-3
Patch Set: Rebased. Created 5 years 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') | test/mjsunit/es6/classes-subclass-builtins.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/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/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 HandleScope scope(isolate); 595 HandleScope scope(isolate);
596 DCHECK(args.length() == 1); 596 DCHECK(args.length() == 1);
597 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); 597 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
598 if (receiver->IsNull() || receiver->IsUndefined()) { 598 if (receiver->IsNull() || receiver->IsUndefined()) {
599 return isolate->global_proxy(); 599 return isolate->global_proxy();
600 } 600 }
601 return *Object::ToObject(isolate, receiver).ToHandleChecked(); 601 return *Object::ToObject(isolate, receiver).ToHandleChecked();
602 } 602 }
603 603
604 604
605 RUNTIME_FUNCTION(Runtime_IsConstructCall) {
606 HandleScope scope(isolate);
607 DCHECK(args.length() == 0);
608 JavaScriptFrameIterator it(isolate);
609 List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
610 it.frame()->Summarize(&frames);
611 FrameSummary& summary = frames.last();
612 return isolate->heap()->ToBoolean(summary.is_constructor());
613 }
614
615
616 RUNTIME_FUNCTION(Runtime_IsFunction) { 605 RUNTIME_FUNCTION(Runtime_IsFunction) {
617 SealHandleScope shs(isolate); 606 SealHandleScope shs(isolate);
618 DCHECK(args.length() == 1); 607 DCHECK(args.length() == 1);
619 CONVERT_ARG_CHECKED(Object, obj, 0); 608 CONVERT_ARG_CHECKED(Object, obj, 0);
620 return isolate->heap()->ToBoolean(obj->IsJSFunction()); 609 return isolate->heap()->ToBoolean(obj->IsJSFunction());
621 } 610 }
622 611
623 612
624 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) { 613 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) {
625 HandleScope scope(isolate); 614 HandleScope scope(isolate);
626 DCHECK(args.length() == 0); 615 DCHECK(args.length() == 0);
627 THROW_NEW_ERROR_RETURN_FAILURE(isolate, 616 THROW_NEW_ERROR_RETURN_FAILURE(isolate,
628 NewTypeError(MessageTemplate::kStrongArity)); 617 NewTypeError(MessageTemplate::kStrongArity));
629 } 618 }
630 619
631 } // namespace internal 620 } // namespace internal
632 } // namespace v8 621 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/es6/classes-subclass-builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698