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

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

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. 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/arguments.h" 7 #include "src/arguments.h"
8 #include "src/ast/prettyprinter.h" 8 #include "src/ast/prettyprinter.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 525
526 RUNTIME_FUNCTION(Runtime_IncrementUseCounter) { 526 RUNTIME_FUNCTION(Runtime_IncrementUseCounter) {
527 HandleScope scope(isolate); 527 HandleScope scope(isolate);
528 DCHECK_EQ(1, args.length()); 528 DCHECK_EQ(1, args.length());
529 CONVERT_SMI_ARG_CHECKED(counter, 0); 529 CONVERT_SMI_ARG_CHECKED(counter, 0);
530 isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter)); 530 isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter));
531 return isolate->heap()->undefined_value(); 531 return isolate->heap()->undefined_value();
532 } 532 }
533 533
534 RUNTIME_FUNCTION(Runtime_GetOrdinaryHasInstance) {
535 HandleScope scope(isolate);
536 DCHECK_EQ(0, args.length());
537
538 return isolate->native_context()->ordinary_has_instance();
539 }
540
541 RUNTIME_FUNCTION(Runtime_GetAndResetRuntimeCallStats) { 534 RUNTIME_FUNCTION(Runtime_GetAndResetRuntimeCallStats) {
542 HandleScope scope(isolate); 535 HandleScope scope(isolate);
543 if (args.length() == 0) { 536 if (args.length() == 0) {
544 // Without arguments, the result is returned as a string. 537 // Without arguments, the result is returned as a string.
545 DCHECK_EQ(0, args.length()); 538 DCHECK_EQ(0, args.length());
546 std::stringstream stats_stream; 539 std::stringstream stats_stream;
547 isolate->counters()->runtime_call_stats()->Print(stats_stream); 540 isolate->counters()->runtime_call_stats()->Print(stats_stream);
548 Handle<String> result = isolate->factory()->NewStringFromAsciiChecked( 541 Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(
549 stats_stream.str().c_str()); 542 stats_stream.str().c_str());
550 isolate->counters()->runtime_call_stats()->Reset(); 543 isolate->counters()->runtime_call_stats()->Reset();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 isolate->EnqueueMicrotask(microtask); 584 isolate->EnqueueMicrotask(microtask);
592 return isolate->heap()->undefined_value(); 585 return isolate->heap()->undefined_value();
593 } 586 }
594 587
595 RUNTIME_FUNCTION(Runtime_RunMicrotasks) { 588 RUNTIME_FUNCTION(Runtime_RunMicrotasks) {
596 HandleScope scope(isolate); 589 HandleScope scope(isolate);
597 DCHECK(args.length() == 0); 590 DCHECK(args.length() == 0);
598 isolate->RunMicrotasks(); 591 isolate->RunMicrotasks();
599 return isolate->heap()->undefined_value(); 592 return isolate->heap()->undefined_value();
600 } 593 }
594
595 RUNTIME_FUNCTION(Runtime_OrdinaryHasInstance) {
596 HandleScope scope(isolate);
597 DCHECK_EQ(2, args.length());
598 CONVERT_ARG_HANDLE_CHECKED(Object, callable, 0);
599 CONVERT_ARG_HANDLE_CHECKED(Object, object, 1);
600 Handle<Object> result;
601 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
602 isolate, result, Object::OrdinaryHasInstance(isolate, callable, object));
603 return *result;
604 }
605
601 } // namespace internal 606 } // namespace internal
602 } // namespace v8 607 } // 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