OLD | NEW |
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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 7378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7389 DECLARE_VERIFIER(JSFunction) | 7389 DECLARE_VERIFIER(JSFunction) |
7390 | 7390 |
7391 // Returns the number of allocated literals. | 7391 // Returns the number of allocated literals. |
7392 inline int NumberOfLiterals(); | 7392 inline int NumberOfLiterals(); |
7393 | 7393 |
7394 // Used for flags such as --hydrogen-filter. | 7394 // Used for flags such as --hydrogen-filter. |
7395 bool PassesFilter(const char* raw_filter); | 7395 bool PassesFilter(const char* raw_filter); |
7396 | 7396 |
7397 // The function's name if it is configured, otherwise shared function info | 7397 // The function's name if it is configured, otherwise shared function info |
7398 // debug name. | 7398 // debug name. |
| 7399 static Handle<String> GetName(Handle<JSFunction> function); |
| 7400 |
| 7401 // The function's displayName if it is set, otherwise name if it is |
| 7402 // configured, otherwise shared function info |
| 7403 // debug name. |
7399 static Handle<String> GetDebugName(Handle<JSFunction> function); | 7404 static Handle<String> GetDebugName(Handle<JSFunction> function); |
7400 | 7405 |
7401 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to | 7406 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to |
7402 // kSize) is weak and has special handling during garbage collection. | 7407 // kSize) is weak and has special handling during garbage collection. |
7403 static const int kPrototypeOrInitialMapOffset = JSObject::kHeaderSize; | 7408 static const int kPrototypeOrInitialMapOffset = JSObject::kHeaderSize; |
7404 static const int kSharedFunctionInfoOffset = | 7409 static const int kSharedFunctionInfoOffset = |
7405 kPrototypeOrInitialMapOffset + kPointerSize; | 7410 kPrototypeOrInitialMapOffset + kPointerSize; |
7406 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize; | 7411 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize; |
7407 static const int kLiteralsOffset = kContextOffset + kPointerSize; | 7412 static const int kLiteralsOffset = kContextOffset + kPointerSize; |
7408 static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize; | 7413 static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize; |
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10697 } | 10702 } |
10698 return value; | 10703 return value; |
10699 } | 10704 } |
10700 }; | 10705 }; |
10701 | 10706 |
10702 | 10707 |
10703 } // NOLINT, false-positive due to second-order macros. | 10708 } // NOLINT, false-positive due to second-order macros. |
10704 } // NOLINT, false-positive due to second-order macros. | 10709 } // NOLINT, false-positive due to second-order macros. |
10705 | 10710 |
10706 #endif // V8_OBJECTS_H_ | 10711 #endif // V8_OBJECTS_H_ |
OLD | NEW |