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

Side by Side Diff: src/runtime/runtime-utils.h

Issue 2225013002: Remove unused isolate parameter from NumberToSize and TryNumberToSize (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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-typedarray.cc ('k') | test/cctest/test-conversions.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_RUNTIME_RUNTIME_UTILS_H_ 5 #ifndef V8_RUNTIME_RUNTIME_UTILS_H_
6 #define V8_RUNTIME_RUNTIME_UTILS_H_ 6 #define V8_RUNTIME_RUNTIME_UTILS_H_
7 7
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/runtime/runtime.h" 9 #include "src/runtime/runtime.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #define CONVERT_DOUBLE_ARG_CHECKED(name, index) \ 44 #define CONVERT_DOUBLE_ARG_CHECKED(name, index) \
45 CHECK(args[index]->IsNumber()); \ 45 CHECK(args[index]->IsNumber()); \
46 double name = args.number_at(index); 46 double name = args.number_at(index);
47 47
48 // Cast the given argument to a size_t and store its value in a variable with 48 // Cast the given argument to a size_t and store its value in a variable with
49 // the given name. If the argument is not a size_t we crash safely. 49 // the given name. If the argument is not a size_t we crash safely.
50 #define CONVERT_SIZE_ARG_CHECKED(name, index) \ 50 #define CONVERT_SIZE_ARG_CHECKED(name, index) \
51 CHECK(args[index]->IsNumber()); \ 51 CHECK(args[index]->IsNumber()); \
52 Handle<Object> name##_object = args.at<Object>(index); \ 52 Handle<Object> name##_object = args.at<Object>(index); \
53 size_t name = 0; \ 53 size_t name = 0; \
54 CHECK(TryNumberToSize(isolate, *name##_object, &name)); 54 CHECK(TryNumberToSize(*name##_object, &name));
55 55
56 // Call the specified converter on the object *comand store the result in 56 // Call the specified converter on the object *comand store the result in
57 // a variable of the specified type with the given name. If the 57 // a variable of the specified type with the given name. If the
58 // object is not a Number we crash safely. 58 // object is not a Number we crash safely.
59 #define CONVERT_NUMBER_CHECKED(type, name, Type, obj) \ 59 #define CONVERT_NUMBER_CHECKED(type, name, Type, obj) \
60 CHECK(obj->IsNumber()); \ 60 CHECK(obj->IsNumber()); \
61 type name = NumberTo##Type(obj); 61 type name = NumberTo##Type(obj);
62 62
63 // Cast the given argument to PropertyDetails and store its value in a 63 // Cast the given argument to PropertyDetails and store its value in a
64 // variable with the given name. If the argument is not a Smi we crash safely. 64 // variable with the given name. If the argument is not a Smi we crash safely.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 static inline ObjectTriple MakeTriple(Object* x, Object* y, Object* z) { 162 static inline ObjectTriple MakeTriple(Object* x, Object* y, Object* z) {
163 ObjectTriple result = {x, y, z}; 163 ObjectTriple result = {x, y, z};
164 // ObjectTriple is assigned to a hidden first argument. 164 // ObjectTriple is assigned to a hidden first argument.
165 return result; 165 return result;
166 } 166 }
167 167
168 } // namespace internal 168 } // namespace internal
169 } // namespace v8 169 } // namespace v8
170 170
171 #endif // V8_RUNTIME_RUNTIME_UTILS_H_ 171 #endif // V8_RUNTIME_RUNTIME_UTILS_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-typedarray.cc ('k') | test/cctest/test-conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698