OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |