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

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

Issue 1476403004: Remove Object::IsSpecObject, use Object::IsJSReceiver instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. 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/builtins.cc ('k') | src/contexts.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 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/factory.h" 10 #include "src/factory.h"
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 return false; 962 return false;
963 } else if (object->IsBoolean()) { 963 } else if (object->IsBoolean()) {
964 Add(BOOLEAN); 964 Add(BOOLEAN);
965 return object->IsTrue(); 965 return object->IsTrue();
966 } else if (object->IsNull()) { 966 } else if (object->IsNull()) {
967 Add(NULL_TYPE); 967 Add(NULL_TYPE);
968 return false; 968 return false;
969 } else if (object->IsSmi()) { 969 } else if (object->IsSmi()) {
970 Add(SMI); 970 Add(SMI);
971 return Smi::cast(*object)->value() != 0; 971 return Smi::cast(*object)->value() != 0;
972 } else if (object->IsSpecObject()) { 972 } else if (object->IsJSReceiver()) {
973 Add(SPEC_OBJECT); 973 Add(SPEC_OBJECT);
974 return !object->IsUndetectableObject(); 974 return !object->IsUndetectableObject();
975 } else if (object->IsString()) { 975 } else if (object->IsString()) {
976 Add(STRING); 976 Add(STRING);
977 return !object->IsUndetectableObject() && 977 return !object->IsUndetectableObject() &&
978 String::cast(*object)->length() != 0; 978 String::cast(*object)->length() != 0;
979 } else if (object->IsSymbol()) { 979 } else if (object->IsSymbol()) {
980 Add(SYMBOL); 980 Add(SYMBOL);
981 return true; 981 return true;
982 } else if (object->IsHeapNumber()) { 982 } else if (object->IsHeapNumber()) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 if (type->Is(Type::UntaggedPointer())) { 1061 if (type->Is(Type::UntaggedPointer())) {
1062 return Representation::External(); 1062 return Representation::External();
1063 } 1063 }
1064 1064
1065 DCHECK(!type->Is(Type::Untagged())); 1065 DCHECK(!type->Is(Type::Untagged()));
1066 return Representation::Tagged(); 1066 return Representation::Tagged();
1067 } 1067 }
1068 1068
1069 } // namespace internal 1069 } // namespace internal
1070 } // namespace v8 1070 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698