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

Side by Side Diff: src/objects-inl.h

Issue 2091243002: Use the instance type to determine if an object is a promise. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@SimplifyIsError
Patch Set: Rebase Created 4 years, 5 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/objects.cc ('k') | src/runtime/runtime-debug.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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 TYPE_CHECKER(Oddball, ODDBALL_TYPE) 784 TYPE_CHECKER(Oddball, ODDBALL_TYPE)
785 TYPE_CHECKER(Cell, CELL_TYPE) 785 TYPE_CHECKER(Cell, CELL_TYPE)
786 TYPE_CHECKER(PropertyCell, PROPERTY_CELL_TYPE) 786 TYPE_CHECKER(PropertyCell, PROPERTY_CELL_TYPE)
787 TYPE_CHECKER(WeakCell, WEAK_CELL_TYPE) 787 TYPE_CHECKER(WeakCell, WEAK_CELL_TYPE)
788 TYPE_CHECKER(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE) 788 TYPE_CHECKER(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE)
789 TYPE_CHECKER(JSDate, JS_DATE_TYPE) 789 TYPE_CHECKER(JSDate, JS_DATE_TYPE)
790 TYPE_CHECKER(JSError, JS_ERROR_TYPE) 790 TYPE_CHECKER(JSError, JS_ERROR_TYPE)
791 TYPE_CHECKER(JSGeneratorObject, JS_GENERATOR_OBJECT_TYPE) 791 TYPE_CHECKER(JSGeneratorObject, JS_GENERATOR_OBJECT_TYPE)
792 TYPE_CHECKER(JSMessageObject, JS_MESSAGE_OBJECT_TYPE) 792 TYPE_CHECKER(JSMessageObject, JS_MESSAGE_OBJECT_TYPE)
793 TYPE_CHECKER(JSModule, JS_MODULE_TYPE) 793 TYPE_CHECKER(JSModule, JS_MODULE_TYPE)
794 TYPE_CHECKER(JSPromise, JS_PROMISE_TYPE)
794 TYPE_CHECKER(JSValue, JS_VALUE_TYPE) 795 TYPE_CHECKER(JSValue, JS_VALUE_TYPE)
795 796
796 bool HeapObject::IsAbstractCode() const { 797 bool HeapObject::IsAbstractCode() const {
797 return IsBytecodeArray() || IsCode(); 798 return IsBytecodeArray() || IsCode();
798 } 799 }
799 800
800 bool HeapObject::IsStringWrapper() const { 801 bool HeapObject::IsStringWrapper() const {
801 return IsJSValue() && JSValue::cast(this)->value()->IsString(); 802 return IsJSValue() && JSValue::cast(this)->value()->IsString();
802 } 803 }
803 804
(...skipping 7153 matching lines...) Expand 10 before | Expand all | Expand 10 after
7957 #undef WRITE_INT64_FIELD 7958 #undef WRITE_INT64_FIELD
7958 #undef READ_BYTE_FIELD 7959 #undef READ_BYTE_FIELD
7959 #undef WRITE_BYTE_FIELD 7960 #undef WRITE_BYTE_FIELD
7960 #undef NOBARRIER_READ_BYTE_FIELD 7961 #undef NOBARRIER_READ_BYTE_FIELD
7961 #undef NOBARRIER_WRITE_BYTE_FIELD 7962 #undef NOBARRIER_WRITE_BYTE_FIELD
7962 7963
7963 } // namespace internal 7964 } // namespace internal
7964 } // namespace v8 7965 } // namespace v8
7965 7966
7966 #endif // V8_OBJECTS_INL_H_ 7967 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698