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

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

Issue 1748183002: Make RUNTIME_ASSERT have more useful output in debug mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Format and improve another error message 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/parsing/parser.cc ('k') | src/runtime/runtime-liveedit.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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 CONVERT_ARG_HANDLE_CHECKED(String, arg1, 2); 310 CONVERT_ARG_HANDLE_CHECKED(String, arg1, 2);
311 CONVERT_ARG_HANDLE_CHECKED(String, arg2, 3); 311 CONVERT_ARG_HANDLE_CHECKED(String, arg2, 3);
312 Handle<String> result; 312 Handle<String> result;
313 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 313 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
314 isolate, result, 314 isolate, result,
315 MessageTemplate::FormatMessage(template_index, arg0, arg1, arg2)); 315 MessageTemplate::FormatMessage(template_index, arg0, arg1, arg2));
316 isolate->native_context()->IncrementErrorsThrown(); 316 isolate->native_context()->IncrementErrorsThrown();
317 return *result; 317 return *result;
318 } 318 }
319 319
320
321 #define CALLSITE_GET(NAME, RETURN) \ 320 #define CALLSITE_GET(NAME, RETURN) \
322 RUNTIME_FUNCTION(Runtime_CallSite##NAME##RT) { \ 321 RUNTIME_FUNCTION(Runtime_CallSite##NAME##RT) { \
323 HandleScope scope(isolate); \ 322 HandleScope scope(isolate); \
324 DCHECK(args.length() == 1); \ 323 DCHECK(args.length() == 1); \
325 CONVERT_ARG_HANDLE_CHECKED(JSObject, call_site_obj, 0); \ 324 CONVERT_ARG_HANDLE_CHECKED(JSObject, call_site_obj, 0); \
326 Handle<String> result; \ 325 Handle<String> result; \
327 CallSite call_site(isolate, call_site_obj); \ 326 CallSite call_site(isolate, call_site_obj); \
328 RUNTIME_ASSERT(call_site.IsValid()) \ 327 RUNTIME_ASSERT(call_site.IsValid()); \
329 return RETURN(call_site.NAME(), isolate); \ 328 return RETURN(call_site.NAME(), isolate); \
330 } 329 }
331 330
332 static inline Object* ReturnDereferencedHandle(Handle<Object> obj, 331 static inline Object* ReturnDereferencedHandle(Handle<Object> obj,
333 Isolate* isolate) { 332 Isolate* isolate) {
334 return *obj; 333 return *obj;
335 } 334 }
336 335
337 336
338 static inline Object* ReturnPositiveNumberOrNull(int value, Isolate* isolate) { 337 static inline Object* ReturnPositiveNumberOrNull(int value, Isolate* isolate) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 std::stringstream stats_stream; 483 std::stringstream stats_stream;
485 isolate->counters()->runtime_call_stats()->Print(stats_stream); 484 isolate->counters()->runtime_call_stats()->Print(stats_stream);
486 Handle<String> result = 485 Handle<String> result =
487 isolate->factory()->NewStringFromAsciiChecked(stats_stream.str().c_str()); 486 isolate->factory()->NewStringFromAsciiChecked(stats_stream.str().c_str());
488 isolate->counters()->runtime_call_stats()->Reset(); 487 isolate->counters()->runtime_call_stats()->Reset();
489 return *result; 488 return *result;
490 } 489 }
491 490
492 } // namespace internal 491 } // namespace internal
493 } // namespace v8 492 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | src/runtime/runtime-liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698