diff options
Diffstat (limited to 'deps/v8/src/runtime/runtime-utils.h')
-rw-r--r-- | deps/v8/src/runtime/runtime-utils.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/deps/v8/src/runtime/runtime-utils.h b/deps/v8/src/runtime/runtime-utils.h index 7d35010435..2d6fbc585f 100644 --- a/deps/v8/src/runtime/runtime-utils.h +++ b/deps/v8/src/runtime/runtime-utils.h @@ -6,8 +6,8 @@ #define V8_RUNTIME_RUNTIME_UTILS_H_ #include "src/base/logging.h" -#include "src/globals.h" -#include "src/objects.h" +#include "src/common/globals.h" +#include "src/objects/objects.h" #include "src/runtime/runtime.h" namespace v8 { @@ -17,40 +17,40 @@ namespace internal { // it in a variable with the given name. If the object is not of the // expected type we crash safely. #define CONVERT_ARG_CHECKED(Type, name, index) \ - CHECK(args[index]->Is##Type()); \ + CHECK(args[index].Is##Type()); \ Type name = Type::cast(args[index]); #define CONVERT_ARG_HANDLE_CHECKED(Type, name, index) \ - CHECK(args[index]->Is##Type()); \ + CHECK(args[index].Is##Type()); \ Handle<Type> name = args.at<Type>(index); #define CONVERT_NUMBER_ARG_HANDLE_CHECKED(name, index) \ - CHECK(args[index]->IsNumber()); \ + CHECK(args[index].IsNumber()); \ Handle<Object> name = args.at(index); // Cast the given object to a boolean and store it in a variable with // the given name. If the object is not a boolean we crash safely. #define CONVERT_BOOLEAN_ARG_CHECKED(name, index) \ - CHECK(args[index]->IsBoolean()); \ - bool name = args[index]->IsTrue(isolate); + CHECK(args[index].IsBoolean()); \ + bool name = args[index].IsTrue(isolate); // Cast the given argument to a Smi and store its value in an int variable // with the given name. If the argument is not a Smi we crash safely. #define CONVERT_SMI_ARG_CHECKED(name, index) \ - CHECK(args[index]->IsSmi()); \ + CHECK(args[index].IsSmi()); \ int name = args.smi_at(index); // Cast the given argument to a double and store it in a variable with // the given name. If the argument is not a number (as opposed to // the number not-a-number) we crash safely. #define CONVERT_DOUBLE_ARG_CHECKED(name, index) \ - CHECK(args[index]->IsNumber()); \ + CHECK(args[index].IsNumber()); \ double name = args.number_at(index); // Cast the given argument to a size_t and store its value in a variable with // the given name. If the argument is not a size_t we crash safely. #define CONVERT_SIZE_ARG_CHECKED(name, index) \ - CHECK(args[index]->IsNumber()); \ + CHECK(args[index].IsNumber()); \ Handle<Object> name##_object = args.at(index); \ size_t name = 0; \ CHECK(TryNumberToSize(*name##_object, &name)); @@ -59,7 +59,7 @@ namespace internal { // a variable of the specified type with the given name. If the // object is not a Number we crash safely. #define CONVERT_NUMBER_CHECKED(type, name, Type, obj) \ - CHECK(obj->IsNumber()); \ + CHECK(obj.IsNumber()); \ type name = NumberTo##Type(obj); // Cast the given argument to PropertyDetails and store its value in a @@ -80,23 +80,23 @@ namespace internal { // Assert that the given argument is a number within the Int32 range // and convert it to int32_t. If the argument is not an Int32 we crash safely. #define CONVERT_INT32_ARG_CHECKED(name, index) \ - CHECK(args[index]->IsNumber()); \ + CHECK(args[index].IsNumber()); \ int32_t name = 0; \ - CHECK(args[index]->ToInt32(&name)); + CHECK(args[index].ToInt32(&name)); // Assert that the given argument is a number within the Uint32 range // and convert it to uint32_t. If the argument is not an Uint32 call // IllegalOperation and return. #define CONVERT_UINT32_ARG_CHECKED(name, index) \ - CHECK(args[index]->IsNumber()); \ + CHECK(args[index].IsNumber()); \ uint32_t name = 0; \ - CHECK(args[index]->ToUint32(&name)); + CHECK(args[index].ToUint32(&name)); // Cast the given argument to PropertyAttributes and store its value in a // variable with the given name. If the argument is not a Smi or the // enum value is out of range, we crash safely. #define CONVERT_PROPERTY_ATTRIBUTES_CHECKED(name, index) \ - CHECK(args[index]->IsSmi()); \ + CHECK(args[index].IsSmi()); \ CHECK_EQ(args.smi_at(index) & ~(READ_ONLY | DONT_ENUM | DONT_DELETE), 0); \ PropertyAttributes name = static_cast<PropertyAttributes>(args.smi_at(index)); @@ -115,16 +115,16 @@ struct ObjectPair { }; static inline ObjectPair MakePair(Object x, Object y) { - ObjectPair result = {x->ptr(), y->ptr()}; + ObjectPair result = {x.ptr(), y.ptr()}; // Pointers x and y returned in rax and rdx, in AMD-x64-abi. // In Win64 they are assigned to a hidden first argument. return result; } #else -typedef uint64_t ObjectPair; +using ObjectPair = uint64_t; static inline ObjectPair MakePair(Object x, Object y) { #if defined(V8_TARGET_LITTLE_ENDIAN) - return x->ptr() | (static_cast<ObjectPair>(y->ptr()) << 32); + return x.ptr() | (static_cast<ObjectPair>(y.ptr()) << 32); #elif defined(V8_TARGET_BIG_ENDIAN) return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32); #else |