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

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

Issue 1756793002: [compiler] Introduce proper StrictNotEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months 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') | no next file » | 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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 } 1146 }
1147 1147
1148 RUNTIME_FUNCTION(Runtime_StringEqual) { 1148 RUNTIME_FUNCTION(Runtime_StringEqual) {
1149 HandleScope handle_scope(isolate); 1149 HandleScope handle_scope(isolate);
1150 DCHECK_EQ(2, args.length()); 1150 DCHECK_EQ(2, args.length());
1151 CONVERT_ARG_HANDLE_CHECKED(String, x, 0); 1151 CONVERT_ARG_HANDLE_CHECKED(String, x, 0);
1152 CONVERT_ARG_HANDLE_CHECKED(String, y, 1); 1152 CONVERT_ARG_HANDLE_CHECKED(String, y, 1);
1153 return isolate->heap()->ToBoolean(String::Equals(x, y)); 1153 return isolate->heap()->ToBoolean(String::Equals(x, y));
1154 } 1154 }
1155 1155
1156 RUNTIME_FUNCTION(Runtime_StringNotEqual) {
1157 HandleScope handle_scope(isolate);
1158 DCHECK_EQ(2, args.length());
1159 CONVERT_ARG_HANDLE_CHECKED(String, x, 0);
1160 CONVERT_ARG_HANDLE_CHECKED(String, y, 1);
1161 return isolate->heap()->ToBoolean(!String::Equals(x, y));
1162 }
1156 1163
1157 RUNTIME_FUNCTION(Runtime_FlattenString) { 1164 RUNTIME_FUNCTION(Runtime_FlattenString) {
1158 HandleScope scope(isolate); 1165 HandleScope scope(isolate);
1159 DCHECK(args.length() == 1); 1166 DCHECK(args.length() == 1);
1160 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); 1167 CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
1161 return *String::Flatten(str); 1168 return *String::Flatten(str);
1162 } 1169 }
1163 1170
1164 1171
1165 RUNTIME_FUNCTION(Runtime_StringCharFromCode) { 1172 RUNTIME_FUNCTION(Runtime_StringCharFromCode) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 SealHandleScope shs(isolate); 1237 SealHandleScope shs(isolate);
1231 DCHECK(args.length() == 2); 1238 DCHECK(args.length() == 2);
1232 if (!args[0]->IsString()) return isolate->heap()->undefined_value(); 1239 if (!args[0]->IsString()) return isolate->heap()->undefined_value();
1233 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value(); 1240 if (!args[1]->IsNumber()) return isolate->heap()->undefined_value();
1234 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value(); 1241 if (std::isinf(args.number_at(1))) return isolate->heap()->nan_value();
1235 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate); 1242 return __RT_impl_Runtime_StringCharCodeAtRT(args, isolate);
1236 } 1243 }
1237 1244
1238 } // namespace internal 1245 } // namespace internal
1239 } // namespace v8 1246 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698