OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3179 // called without using argument adaptor frames. | 3179 // called without using argument adaptor frames. |
3180 inline void DontAdaptArguments(); | 3180 inline void DontAdaptArguments(); |
3181 | 3181 |
3182 // [expected_nof_properties]: Expected number of properties for the function. | 3182 // [expected_nof_properties]: Expected number of properties for the function. |
3183 inline int expected_nof_properties(); | 3183 inline int expected_nof_properties(); |
3184 inline void set_expected_nof_properties(int value); | 3184 inline void set_expected_nof_properties(int value); |
3185 | 3185 |
3186 // [instance class name]: class name for instances. | 3186 // [instance class name]: class name for instances. |
3187 DECL_ACCESSORS(instance_class_name, Object) | 3187 DECL_ACCESSORS(instance_class_name, Object) |
3188 | 3188 |
3189 // [function data]: This field has been added for make benefit the API. | 3189 // [function data]: This field holds some additional data for function. |
| 3190 // Currently it either has FunctionTemplateInfo to make benefit the API |
| 3191 // or Proxy wrapping CustomCallGenerator. |
3190 // In the long run we don't want all functions to have this field but | 3192 // In the long run we don't want all functions to have this field but |
3191 // we can fix that when we have a better model for storing hidden data | 3193 // we can fix that when we have a better model for storing hidden data |
3192 // on objects. | 3194 // on objects. |
3193 DECL_ACCESSORS(function_data, Object) | 3195 DECL_ACCESSORS(function_data, Object) |
3194 | 3196 |
| 3197 inline bool IsApiFunction(); |
| 3198 inline FunctionTemplateInfo* get_api_func_data(); |
| 3199 inline bool HasCustomCallGenerator(); |
| 3200 |
3195 // [script info]: Script from which the function originates. | 3201 // [script info]: Script from which the function originates. |
3196 DECL_ACCESSORS(script, Object) | 3202 DECL_ACCESSORS(script, Object) |
3197 | 3203 |
3198 // [start_position_and_type]: Field used to store both the source code | 3204 // [start_position_and_type]: Field used to store both the source code |
3199 // position, whether or not the function is a function expression, | 3205 // position, whether or not the function is a function expression, |
3200 // and whether or not the function is a toplevel function. The two | 3206 // and whether or not the function is a toplevel function. The two |
3201 // least significants bit indicates whether the function is an | 3207 // least significants bit indicates whether the function is an |
3202 // expression and the rest contains the source code position. | 3208 // expression and the rest contains the source code position. |
3203 inline int start_position_and_type(); | 3209 inline int start_position_and_type(); |
3204 inline void set_start_position_and_type(int value); | 3210 inline void set_start_position_and_type(int value); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3292 // Constants. | 3298 // Constants. |
3293 static const int kDontAdaptArgumentsSentinel = -1; | 3299 static const int kDontAdaptArgumentsSentinel = -1; |
3294 | 3300 |
3295 // Layout description. | 3301 // Layout description. |
3296 // Pointer fields. | 3302 // Pointer fields. |
3297 static const int kNameOffset = HeapObject::kHeaderSize; | 3303 static const int kNameOffset = HeapObject::kHeaderSize; |
3298 static const int kCodeOffset = kNameOffset + kPointerSize; | 3304 static const int kCodeOffset = kNameOffset + kPointerSize; |
3299 static const int kConstructStubOffset = kCodeOffset + kPointerSize; | 3305 static const int kConstructStubOffset = kCodeOffset + kPointerSize; |
3300 static const int kInstanceClassNameOffset = | 3306 static const int kInstanceClassNameOffset = |
3301 kConstructStubOffset + kPointerSize; | 3307 kConstructStubOffset + kPointerSize; |
3302 static const int kExternalReferenceDataOffset = | 3308 static const int kFunctionDataOffset = |
3303 kInstanceClassNameOffset + kPointerSize; | 3309 kInstanceClassNameOffset + kPointerSize; |
3304 static const int kScriptOffset = kExternalReferenceDataOffset + kPointerSize; | 3310 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; |
3305 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; | 3311 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; |
3306 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; | 3312 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; |
3307 static const int kThisPropertyAssignmentsOffset = | 3313 static const int kThisPropertyAssignmentsOffset = |
3308 kInferredNameOffset + kPointerSize; | 3314 kInferredNameOffset + kPointerSize; |
3309 // Integer fields. | 3315 // Integer fields. |
3310 static const int kLengthOffset = | 3316 static const int kLengthOffset = |
3311 kThisPropertyAssignmentsOffset + kPointerSize; | 3317 kThisPropertyAssignmentsOffset + kPointerSize; |
3312 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize; | 3318 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize; |
3313 static const int kExpectedNofPropertiesOffset = | 3319 static const int kExpectedNofPropertiesOffset = |
3314 kFormalParameterCountOffset + kIntSize; | 3320 kFormalParameterCountOffset + kIntSize; |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5083 } else { | 5089 } else { |
5084 value &= ~(1 << bit_position); | 5090 value &= ~(1 << bit_position); |
5085 } | 5091 } |
5086 return value; | 5092 return value; |
5087 } | 5093 } |
5088 }; | 5094 }; |
5089 | 5095 |
5090 } } // namespace v8::internal | 5096 } } // namespace v8::internal |
5091 | 5097 |
5092 #endif // V8_OBJECTS_H_ | 5098 #endif // V8_OBJECTS_H_ |
OLD | NEW |