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

Side by Side Diff: src/execution.cc

Issue 1507273002: Make Error.prototype.toString spec compliant; and fix various side-effect-free error printing metho… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/execution.h ('k') | src/isolate.h » ('j') | src/messages.cc » ('J')
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/execution.h" 5 #include "src/execution.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // --- C a l l s t o n a t i v e s --- 426 // --- C a l l s t o n a t i v e s ---
427 427
428 #define RETURN_NATIVE_CALL(name, args) \ 428 #define RETURN_NATIVE_CALL(name, args) \
429 do { \ 429 do { \
430 Handle<Object> argv[] = args; \ 430 Handle<Object> argv[] = args; \
431 return Call(isolate, isolate->name##_fun(), \ 431 return Call(isolate, isolate->name##_fun(), \
432 isolate->factory()->undefined_value(), arraysize(argv), argv); \ 432 isolate->factory()->undefined_value(), arraysize(argv), argv); \
433 } while (false) 433 } while (false)
434 434
435 435
436 MaybeHandle<Object> Execution::ToDetailString(
437 Isolate* isolate, Handle<Object> obj) {
438 RETURN_NATIVE_CALL(to_detail_string, { obj });
439 }
440
441
442 MaybeHandle<Object> Execution::NewDate(Isolate* isolate, double time) { 436 MaybeHandle<Object> Execution::NewDate(Isolate* isolate, double time) {
443 Handle<Object> time_obj = isolate->factory()->NewNumber(time); 437 Handle<Object> time_obj = isolate->factory()->NewNumber(time);
444 RETURN_NATIVE_CALL(create_date, { time_obj }); 438 RETURN_NATIVE_CALL(create_date, { time_obj });
445 } 439 }
446 440
447 441
448 #undef RETURN_NATIVE_CALL 442 #undef RETURN_NATIVE_CALL
449 443
450 444
451 MaybeHandle<Object> Execution::ToObject(Isolate* isolate, Handle<Object> obj) { 445 MaybeHandle<Object> Execution::ToObject(Isolate* isolate, Handle<Object> obj) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 511
518 isolate_->counters()->stack_interrupts()->Increment(); 512 isolate_->counters()->stack_interrupts()->Increment();
519 isolate_->counters()->runtime_profiler_ticks()->Increment(); 513 isolate_->counters()->runtime_profiler_ticks()->Increment();
520 isolate_->runtime_profiler()->OptimizeNow(); 514 isolate_->runtime_profiler()->OptimizeNow();
521 515
522 return isolate_->heap()->undefined_value(); 516 return isolate_->heap()->undefined_value();
523 } 517 }
524 518
525 } // namespace internal 519 } // namespace internal
526 } // namespace v8 520 } // namespace v8
OLDNEW
« no previous file with comments | « src/execution.h ('k') | src/isolate.h » ('j') | src/messages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698