| 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/conversions-inl.h" | 8 #include "src/conversions-inl.h" |
| 9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 #include "src/regexp/jsregexp-inl.h" | 10 #include "src/regexp/jsregexp-inl.h" |
| (...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 RUNTIME_FUNCTION(Runtime_StringCharCodeAt) { | 1315 RUNTIME_FUNCTION(Runtime_StringCharCodeAt) { |
| 1316 SealHandleScope shs(isolate); | 1316 SealHandleScope shs(isolate); |
| 1317 DCHECK(args.length() == 2); | 1317 DCHECK(args.length() == 2); |
| 1318 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); | 1318 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); |
| 1319 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); | 1319 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); |
| 1320 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); | 1320 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); |
| 1321 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); | 1321 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 | 1324 |
| 1325 RUNTIME_FUNCTION(Runtime_IsStringWrapperSafeForDefaultValueOf) { | |
| 1326 UNIMPLEMENTED(); | |
| 1327 return NULL; | |
| 1328 } | |
| 1329 | |
| 1330 | |
| 1331 RUNTIME_FUNCTION(Runtime_StringGetLength) { | 1325 RUNTIME_FUNCTION(Runtime_StringGetLength) { |
| 1332 HandleScope scope(isolate); | 1326 HandleScope scope(isolate); |
| 1333 DCHECK(args.length() == 1); | 1327 DCHECK(args.length() == 1); |
| 1334 CONVERT_ARG_HANDLE_CHECKED(String, s, 0); | 1328 CONVERT_ARG_HANDLE_CHECKED(String, s, 0); |
| 1335 return Smi::FromInt(s->length()); | 1329 return Smi::FromInt(s->length()); |
| 1336 } | 1330 } |
| 1337 } // namespace internal | 1331 } // namespace internal |
| 1338 } // namespace v8 | 1332 } // namespace v8 |
| OLD | NEW |