| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/date.h" | 8 #include "src/date.h" |
| 9 #include "src/dateparser-inl.h" | 9 #include "src/dateparser-inl.h" |
| 10 #include "src/runtime/runtime.h" | |
| 11 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
| 12 | 11 |
| 13 namespace v8 { | 12 namespace v8 { |
| 14 namespace internal { | 13 namespace internal { |
| 15 | 14 |
| 16 RUNTIME_FUNCTION(Runtime_DateMakeDay) { | 15 RUNTIME_FUNCTION(Runtime_DateMakeDay) { |
| 17 SealHandleScope shs(isolate); | 16 SealHandleScope shs(isolate); |
| 18 DCHECK(args.length() == 2); | 17 DCHECK(args.length() == 2); |
| 19 | 18 |
| 20 CONVERT_SMI_ARG_CHECKED(year, 0); | 19 CONVERT_SMI_ARG_CHECKED(year, 0); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 THROW_NEW_ERROR_RETURN_FAILURE( | 180 THROW_NEW_ERROR_RETURN_FAILURE( |
| 182 isolate, | 181 isolate, |
| 183 NewTypeError("not_date_object", HandleVector<Object>(NULL, 0))); | 182 NewTypeError("not_date_object", HandleVector<Object>(NULL, 0))); |
| 184 } | 183 } |
| 185 JSDate* date = JSDate::cast(obj); | 184 JSDate* date = JSDate::cast(obj); |
| 186 if (index == 0) return date->value(); | 185 if (index == 0) return date->value(); |
| 187 return JSDate::GetField(date, Smi::FromInt(index)); | 186 return JSDate::GetField(date, Smi::FromInt(index)); |
| 188 } | 187 } |
| 189 } | 188 } |
| 190 } // namespace v8::internal | 189 } // namespace v8::internal |
| OLD | NEW |