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 7269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7280 void JSFunctionIterateBody(int object_size, ObjectVisitor* v); | 7280 void JSFunctionIterateBody(int object_size, ObjectVisitor* v); |
7281 | 7281 |
7282 // Dispatched behavior. | 7282 // Dispatched behavior. |
7283 DECLARE_PRINTER(JSFunction) | 7283 DECLARE_PRINTER(JSFunction) |
7284 DECLARE_VERIFIER(JSFunction) | 7284 DECLARE_VERIFIER(JSFunction) |
7285 | 7285 |
7286 // Returns the number of allocated literals. | 7286 // Returns the number of allocated literals. |
7287 inline int NumberOfLiterals(); | 7287 inline int NumberOfLiterals(); |
7288 | 7288 |
7289 // Used for flags such as --hydrogen-filter. | 7289 // Used for flags such as --hydrogen-filter. |
| 7290 // TODO(rmcilroy/mstarzinger): Move this back to JSFunction when compiler.cc |
| 7291 // is refactored to allow use of JSFunction::PassesFilter for top-level code. |
7290 bool PassesFilter(const char* raw_filter); | 7292 bool PassesFilter(const char* raw_filter); |
7291 | 7293 |
7292 // The function's name if it is configured, otherwise shared function info | 7294 // The function's name if it is configured, otherwise shared function info |
7293 // debug name. | 7295 // debug name. |
7294 static Handle<String> GetDebugName(Handle<JSFunction> function); | 7296 static Handle<String> GetDebugName(Handle<JSFunction> function); |
7295 | 7297 |
7296 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to | 7298 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to |
7297 // kSize) is weak and has special handling during garbage collection. | 7299 // kSize) is weak and has special handling during garbage collection. |
7298 static const int kCodeEntryOffset = JSObject::kHeaderSize; | 7300 static const int kCodeEntryOffset = JSObject::kHeaderSize; |
7299 static const int kPrototypeOrInitialMapOffset = | 7301 static const int kPrototypeOrInitialMapOffset = |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8676 // Conversion. | 8678 // Conversion. |
8677 inline bool AsArrayIndex(uint32_t* index); | 8679 inline bool AsArrayIndex(uint32_t* index); |
8678 | 8680 |
8679 DECLARE_CAST(String) | 8681 DECLARE_CAST(String) |
8680 | 8682 |
8681 void PrintOn(FILE* out); | 8683 void PrintOn(FILE* out); |
8682 | 8684 |
8683 // For use during stack traces. Performs rudimentary sanity check. | 8685 // For use during stack traces. Performs rudimentary sanity check. |
8684 bool LooksValid(); | 8686 bool LooksValid(); |
8685 | 8687 |
| 8688 // Used for flags such as --hydrogen-filter. |
| 8689 bool PassesFilter(const char* raw_filter); |
| 8690 |
8686 // Dispatched behavior. | 8691 // Dispatched behavior. |
8687 void StringShortPrint(StringStream* accumulator); | 8692 void StringShortPrint(StringStream* accumulator); |
8688 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT | 8693 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT |
8689 #if defined(DEBUG) || defined(OBJECT_PRINT) | 8694 #if defined(DEBUG) || defined(OBJECT_PRINT) |
8690 char* ToAsciiArray(); | 8695 char* ToAsciiArray(); |
8691 #endif | 8696 #endif |
8692 DECLARE_PRINTER(String) | 8697 DECLARE_PRINTER(String) |
8693 DECLARE_VERIFIER(String) | 8698 DECLARE_VERIFIER(String) |
8694 | 8699 |
8695 inline bool IsFlat(); | 8700 inline bool IsFlat(); |
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10664 Handle<FixedArray> keys_; | 10669 Handle<FixedArray> keys_; |
10665 Handle<OrderedHashSet> set_; | 10670 Handle<OrderedHashSet> set_; |
10666 int length_; | 10671 int length_; |
10667 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); | 10672 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); |
10668 }; | 10673 }; |
10669 | 10674 |
10670 } // NOLINT, false-positive due to second-order macros. | 10675 } // NOLINT, false-positive due to second-order macros. |
10671 } // NOLINT, false-positive due to second-order macros. | 10676 } // NOLINT, false-positive due to second-order macros. |
10672 | 10677 |
10673 #endif // V8_OBJECTS_H_ | 10678 #endif // V8_OBJECTS_H_ |
OLD | NEW |