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

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

Issue 1821123002: [intrinsics] Remove unused intrinsic %_IncrementStatsCounter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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') | test/cctest/compiler/test-run-intrinsics.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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 #undef CALLSITE_GET 351 #undef CALLSITE_GET
352 352
353 353
354 RUNTIME_FUNCTION(Runtime_IS_VAR) { 354 RUNTIME_FUNCTION(Runtime_IS_VAR) {
355 UNREACHABLE(); // implemented as macro in the parser 355 UNREACHABLE(); // implemented as macro in the parser
356 return NULL; 356 return NULL;
357 } 357 }
358 358
359 359
360 RUNTIME_FUNCTION(Runtime_IncrementStatsCounter) {
361 SealHandleScope shs(isolate);
362 DCHECK(args.length() == 1);
363 CONVERT_ARG_CHECKED(String, name, 0);
364
365 if (FLAG_native_code_counters) {
366 StatsCounter(isolate, name->ToCString().get()).Increment();
367 }
368 return isolate->heap()->undefined_value();
369 }
370
371
372 namespace { 360 namespace {
373 361
374 bool ComputeLocation(Isolate* isolate, MessageLocation* target) { 362 bool ComputeLocation(Isolate* isolate, MessageLocation* target) {
375 JavaScriptFrameIterator it(isolate); 363 JavaScriptFrameIterator it(isolate);
376 if (!it.done()) { 364 if (!it.done()) {
377 JavaScriptFrame* frame = it.frame(); 365 JavaScriptFrame* frame = it.frame();
378 JSFunction* fun = frame->function(); 366 JSFunction* fun = frame->function();
379 Object* script = fun->shared()->script(); 367 Object* script = fun->shared()->script();
380 if (script->IsScript() && 368 if (script->IsScript() &&
381 !(Script::cast(script)->source()->IsUndefined())) { 369 !(Script::cast(script)->source()->IsUndefined())) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 std::stringstream stats_stream; 469 std::stringstream stats_stream;
482 isolate->counters()->runtime_call_stats()->Print(stats_stream); 470 isolate->counters()->runtime_call_stats()->Print(stats_stream);
483 Handle<String> result = 471 Handle<String> result =
484 isolate->factory()->NewStringFromAsciiChecked(stats_stream.str().c_str()); 472 isolate->factory()->NewStringFromAsciiChecked(stats_stream.str().c_str());
485 isolate->counters()->runtime_call_stats()->Reset(); 473 isolate->counters()->runtime_call_stats()->Reset();
486 return *result; 474 return *result;
487 } 475 }
488 476
489 } // namespace internal 477 } // namespace internal
490 } // namespace v8 478 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698