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

Side by Side Diff: src/code-stubs.cc

Issue 1756413003: [runtime] Rename IsUndetectableObject to IsUndetectable. (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 | « no previous file | src/crankshaft/hydrogen-types.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/compiler/code-stub-assembler.h" 10 #include "src/compiler/code-stub-assembler.h"
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 Add(BOOLEAN); 1274 Add(BOOLEAN);
1275 return object->IsTrue(); 1275 return object->IsTrue();
1276 } else if (object->IsNull()) { 1276 } else if (object->IsNull()) {
1277 Add(NULL_TYPE); 1277 Add(NULL_TYPE);
1278 return false; 1278 return false;
1279 } else if (object->IsSmi()) { 1279 } else if (object->IsSmi()) {
1280 Add(SMI); 1280 Add(SMI);
1281 return Smi::cast(*object)->value() != 0; 1281 return Smi::cast(*object)->value() != 0;
1282 } else if (object->IsJSReceiver()) { 1282 } else if (object->IsJSReceiver()) {
1283 Add(SPEC_OBJECT); 1283 Add(SPEC_OBJECT);
1284 return !object->IsUndetectableObject(); 1284 return !object->IsUndetectable();
1285 } else if (object->IsString()) { 1285 } else if (object->IsString()) {
1286 DCHECK(!object->IsUndetectableObject()); 1286 DCHECK(!object->IsUndetectable());
1287 Add(STRING); 1287 Add(STRING);
1288 return String::cast(*object)->length() != 0; 1288 return String::cast(*object)->length() != 0;
1289 } else if (object->IsSymbol()) { 1289 } else if (object->IsSymbol()) {
1290 Add(SYMBOL); 1290 Add(SYMBOL);
1291 return true; 1291 return true;
1292 } else if (object->IsHeapNumber()) { 1292 } else if (object->IsHeapNumber()) {
1293 DCHECK(!object->IsUndetectableObject()); 1293 DCHECK(!object->IsUndetectable());
1294 Add(HEAP_NUMBER); 1294 Add(HEAP_NUMBER);
1295 double value = HeapNumber::cast(*object)->value(); 1295 double value = HeapNumber::cast(*object)->value();
1296 return value != 0 && !std::isnan(value); 1296 return value != 0 && !std::isnan(value);
1297 } else if (object->IsSimd128Value()) { 1297 } else if (object->IsSimd128Value()) {
1298 Add(SIMD_VALUE); 1298 Add(SIMD_VALUE);
1299 return true; 1299 return true;
1300 } else { 1300 } else {
1301 // We should never see an internal object at runtime here! 1301 // We should never see an internal object at runtime here!
1302 UNREACHABLE(); 1302 UNREACHABLE();
1303 return true; 1303 return true;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 if (type->Is(Type::UntaggedPointer())) { 1371 if (type->Is(Type::UntaggedPointer())) {
1372 return Representation::External(); 1372 return Representation::External();
1373 } 1373 }
1374 1374
1375 DCHECK(!type->Is(Type::Untagged())); 1375 DCHECK(!type->Is(Type::Untagged()));
1376 return Representation::Tagged(); 1376 return Representation::Tagged();
1377 } 1377 }
1378 1378
1379 } // namespace internal 1379 } // namespace internal
1380 } // namespace v8 1380 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/hydrogen-types.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698