Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: src/runtime/runtime-strings.cc

Issue 1516753006: [turbofan] Some more cleanup on the intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/unittests/compiler/js-intrinsic-lowering-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 1238
1239 RUNTIME_FUNCTION(Runtime_StringCharCodeAt) { 1239 RUNTIME_FUNCTION(Runtime_StringCharCodeAt) {
1240 SealHandleScope shs(isolate); 1240 SealHandleScope shs(isolate);
1241 DCHECK(args.length() == 2); 1241 DCHECK(args.length() == 2);
1242 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); 1242 if (!args[0]->IsString()) return isolate->heap()->undefined_value();
1243 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); 1243 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value();
1244 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); 1244 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value();
1245 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); 1245 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate);
1246 } 1246 }
1247 1247
1248
1249 RUNTIME_FUNCTION(Runtime_StringGetLength) {
1250 HandleScope scope(isolate);
1251 DCHECK(args.length() == 1);
1252 CONVERT_ARG_HANDLE_CHECKED(String, s, 0);
1253 return Smi::FromInt(s->length());
1254 }
1255 } // namespace internal 1248 } // namespace internal
1256 } // namespace v8 1249 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/unittests/compiler/js-intrinsic-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698