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

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

Issue 1337993005: [runtime] Replace the EQUALS builtin with proper Object::Equals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's nit. Created 5 years, 3 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-object.cc ('k') | src/x64/code-stubs-x64.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/base/macros.h" 8 #include "src/base/macros.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // SIMD helper functions. 166 // SIMD helper functions.
167 167
168 RUNTIME_FUNCTION(Runtime_IsSimdValue) { 168 RUNTIME_FUNCTION(Runtime_IsSimdValue) {
169 HandleScope scope(isolate); 169 HandleScope scope(isolate);
170 DCHECK(args.length() == 1); 170 DCHECK(args.length() == 1);
171 return isolate->heap()->ToBoolean(args[0]->IsSimd128Value()); 171 return isolate->heap()->ToBoolean(args[0]->IsSimd128Value());
172 } 172 }
173 173
174 174
175 RUNTIME_FUNCTION(Runtime_SimdToObject) {
176 HandleScope scope(isolate);
177 DCHECK(args.length() == 1);
178 CONVERT_ARG_HANDLE_CHECKED(Simd128Value, value, 0);
179 return *Object::ToObject(isolate, value).ToHandleChecked();
180 }
181
182
183 RUNTIME_FUNCTION(Runtime_SimdEquals) {
184 SealHandleScope scope(isolate);
185 DCHECK_EQ(2, args.length());
186 CONVERT_ARG_CHECKED(Simd128Value, x, 0);
187 CONVERT_ARG_CHECKED(Simd128Value, y, 1);
188 return Smi::FromInt(x->Equals(y) ? EQUAL : NOT_EQUAL);
189 }
190
191
192 RUNTIME_FUNCTION(Runtime_SimdSameValue) { 175 RUNTIME_FUNCTION(Runtime_SimdSameValue) {
193 HandleScope scope(isolate); 176 HandleScope scope(isolate);
194 DCHECK(args.length() == 2); 177 DCHECK(args.length() == 2);
195 CONVERT_ARG_HANDLE_CHECKED(Simd128Value, a, 0); 178 CONVERT_ARG_HANDLE_CHECKED(Simd128Value, a, 0);
196 bool result = false; 179 bool result = false;
197 // args[1] is of unknown type. 180 // args[1] is of unknown type.
198 if (args[1]->IsSimd128Value()) { 181 if (args[1]->IsSimd128Value()) {
199 Simd128Value* b = Simd128Value::cast(args[1]); 182 Simd128Value* b = Simd128Value::cast(args[1]);
200 if (a->map() == b->map()) { 183 if (a->map() == b->map()) {
201 if (a->IsFloat32x4()) { 184 if (a->IsFloat32x4()) {
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 SIMD_LOADN_STOREN_TYPES(SIMD_LOAD3_FUNCTION) 1062 SIMD_LOADN_STOREN_TYPES(SIMD_LOAD3_FUNCTION)
1080 SIMD_NUMERIC_TYPES(SIMD_STORE_FUNCTION) 1063 SIMD_NUMERIC_TYPES(SIMD_STORE_FUNCTION)
1081 SIMD_LOADN_STOREN_TYPES(SIMD_STORE1_FUNCTION) 1064 SIMD_LOADN_STOREN_TYPES(SIMD_STORE1_FUNCTION)
1082 SIMD_LOADN_STOREN_TYPES(SIMD_STORE2_FUNCTION) 1065 SIMD_LOADN_STOREN_TYPES(SIMD_STORE2_FUNCTION)
1083 SIMD_LOADN_STOREN_TYPES(SIMD_STORE3_FUNCTION) 1066 SIMD_LOADN_STOREN_TYPES(SIMD_STORE3_FUNCTION)
1084 1067
1085 //------------------------------------------------------------------- 1068 //-------------------------------------------------------------------
1086 1069
1087 } // namespace internal 1070 } // namespace internal
1088 } // namespace v8 1071 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698