OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2457 | 2457 |
2458 // [length]: The function length - usually the number of declared parameters. | 2458 // [length]: The function length - usually the number of declared parameters. |
2459 // Use up to 2^30 parameters. | 2459 // Use up to 2^30 parameters. |
2460 inline int length(); | 2460 inline int length(); |
2461 inline void set_length(int value); | 2461 inline void set_length(int value); |
2462 | 2462 |
2463 // [formal parameter count]: The declared number of parameters. | 2463 // [formal parameter count]: The declared number of parameters. |
2464 inline int formal_parameter_count(); | 2464 inline int formal_parameter_count(); |
2465 inline void set_formal_parameter_count(int value); | 2465 inline void set_formal_parameter_count(int value); |
2466 | 2466 |
| 2467 // Set the formal parameter count so the function code will be |
| 2468 // called without using argument adaptor frames. |
| 2469 inline void DontAdaptArguments(); |
| 2470 |
2467 // [expected_nof_properties]: Expected number of properties for the function. | 2471 // [expected_nof_properties]: Expected number of properties for the function. |
2468 inline int expected_nof_properties(); | 2472 inline int expected_nof_properties(); |
2469 inline void set_expected_nof_properties(int value); | 2473 inline void set_expected_nof_properties(int value); |
2470 | 2474 |
2471 // [instance class name]: class name for instances. | 2475 // [instance class name]: class name for instances. |
2472 DECL_ACCESSORS(instance_class_name, Object) | 2476 DECL_ACCESSORS(instance_class_name, Object) |
2473 | 2477 |
2474 // [function data]: This field has been added for make benefit the API. | 2478 // [function data]: This field has been added for make benefit the API. |
2475 // In the long run we don't want all functions to have this field but | 2479 // In the long run we don't want all functions to have this field but |
2476 // we can fix that when we have a better model for storing hidden data | 2480 // we can fix that when we have a better model for storing hidden data |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2526 // Set max_length to -1 for unlimited length. | 2530 // Set max_length to -1 for unlimited length. |
2527 void SourceCodePrint(StringStream* accumulator, int max_length); | 2531 void SourceCodePrint(StringStream* accumulator, int max_length); |
2528 #ifdef DEBUG | 2532 #ifdef DEBUG |
2529 void SharedFunctionInfoPrint(); | 2533 void SharedFunctionInfoPrint(); |
2530 void SharedFunctionInfoVerify(); | 2534 void SharedFunctionInfoVerify(); |
2531 #endif | 2535 #endif |
2532 | 2536 |
2533 // Casting. | 2537 // Casting. |
2534 static inline SharedFunctionInfo* cast(Object* obj); | 2538 static inline SharedFunctionInfo* cast(Object* obj); |
2535 | 2539 |
| 2540 // Constants. |
| 2541 static const int kDontAdaptArgumentsSentinel = -1; |
| 2542 |
2536 // Layout description. | 2543 // Layout description. |
2537 static const int kNameOffset = HeapObject::kSize; | 2544 static const int kNameOffset = HeapObject::kSize; |
2538 static const int kCodeOffset = kNameOffset + kPointerSize; | 2545 static const int kCodeOffset = kNameOffset + kPointerSize; |
2539 static const int kLengthOffset = kCodeOffset + kPointerSize; | 2546 static const int kLengthOffset = kCodeOffset + kPointerSize; |
2540 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize; | 2547 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize; |
2541 static const int kExpectedNofPropertiesOffset = | 2548 static const int kExpectedNofPropertiesOffset = |
2542 kFormalParameterCountOffset + kIntSize; | 2549 kFormalParameterCountOffset + kIntSize; |
2543 static const int kInstanceClassNameOffset = | 2550 static const int kInstanceClassNameOffset = |
2544 kExpectedNofPropertiesOffset + kIntSize; | 2551 kExpectedNofPropertiesOffset + kIntSize; |
2545 static const int kExternalReferenceDataOffset = | 2552 static const int kExternalReferenceDataOffset = |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3850 } else { | 3857 } else { |
3851 value &= ~(1 << bit_position); | 3858 value &= ~(1 << bit_position); |
3852 } | 3859 } |
3853 return value; | 3860 return value; |
3854 } | 3861 } |
3855 }; | 3862 }; |
3856 | 3863 |
3857 } } // namespace v8::internal | 3864 } } // namespace v8::internal |
3858 | 3865 |
3859 #endif // V8_OBJECTS_H_ | 3866 #endif // V8_OBJECTS_H_ |
OLD | NEW |