| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 9618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9629 SealHandleScope shs(isolate); | 9629 SealHandleScope shs(isolate); |
| 9630 ASSERT(args.length() == 0); | 9630 ASSERT(args.length() == 0); |
| 9631 isolate->PrintStack(stdout); | 9631 isolate->PrintStack(stdout); |
| 9632 return isolate->heap()->undefined_value(); | 9632 return isolate->heap()->undefined_value(); |
| 9633 } | 9633 } |
| 9634 | 9634 |
| 9635 | 9635 |
| 9636 RUNTIME_FUNCTION(Runtime_DateCurrentTime) { | 9636 RUNTIME_FUNCTION(Runtime_DateCurrentTime) { |
| 9637 HandleScope scope(isolate); | 9637 HandleScope scope(isolate); |
| 9638 ASSERT(args.length() == 0); | 9638 ASSERT(args.length() == 0); |
| 9639 if (FLAG_log_timer_events) LOG(isolate, CurrentTimeEvent()); |
| 9639 | 9640 |
| 9640 // According to ECMA-262, section 15.9.1, page 117, the precision of | 9641 // According to ECMA-262, section 15.9.1, page 117, the precision of |
| 9641 // the number in a Date object representing a particular instant in | 9642 // the number in a Date object representing a particular instant in |
| 9642 // time is milliseconds. Therefore, we floor the result of getting | 9643 // time is milliseconds. Therefore, we floor the result of getting |
| 9643 // the OS time. | 9644 // the OS time. |
| 9644 double millis = std::floor(OS::TimeCurrentMillis()); | 9645 double millis = std::floor(OS::TimeCurrentMillis()); |
| 9645 return *isolate->factory()->NewNumber(millis); | 9646 return *isolate->factory()->NewNumber(millis); |
| 9646 } | 9647 } |
| 9647 | 9648 |
| 9648 | 9649 |
| (...skipping 5553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15202 } | 15203 } |
| 15203 return NULL; | 15204 return NULL; |
| 15204 } | 15205 } |
| 15205 | 15206 |
| 15206 | 15207 |
| 15207 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15208 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15208 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15209 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15209 } | 15210 } |
| 15210 | 15211 |
| 15211 } } // namespace v8::internal | 15212 } } // namespace v8::internal |
| OLD | NEW |