| 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 |
| 436 MaybeHandle<Object> Execution::NewDate(Isolate* isolate, double time) { | 442 MaybeHandle<Object> Execution::NewDate(Isolate* isolate, double time) { |
| 437 Handle<Object> time_obj = isolate->factory()->NewNumber(time); | 443 Handle<Object> time_obj = isolate->factory()->NewNumber(time); |
| 438 RETURN_NATIVE_CALL(create_date, { time_obj }); | 444 RETURN_NATIVE_CALL(create_date, { time_obj }); |
| 439 } | 445 } |
| 440 | 446 |
| 441 | 447 |
| 442 #undef RETURN_NATIVE_CALL | 448 #undef RETURN_NATIVE_CALL |
| 443 | 449 |
| 444 | 450 |
| 445 MaybeHandle<Object> Execution::ToObject(Isolate* isolate, Handle<Object> obj) { | 451 MaybeHandle<Object> Execution::ToObject(Isolate* isolate, Handle<Object> obj) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 | 517 |
| 512 isolate_->counters()->stack_interrupts()->Increment(); | 518 isolate_->counters()->stack_interrupts()->Increment(); |
| 513 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 519 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
| 514 isolate_->runtime_profiler()->OptimizeNow(); | 520 isolate_->runtime_profiler()->OptimizeNow(); |
| 515 | 521 |
| 516 return isolate_->heap()->undefined_value(); | 522 return isolate_->heap()->undefined_value(); |
| 517 } | 523 } |
| 518 | 524 |
| 519 } // namespace internal | 525 } // namespace internal |
| 520 } // namespace v8 | 526 } // namespace v8 |
| OLD | NEW |