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 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3364 inline bool is_toplevel(); | 3364 inline bool is_toplevel(); |
3365 inline void set_is_toplevel(bool value); | 3365 inline void set_is_toplevel(bool value); |
3366 | 3366 |
3367 // Bit field containing various information collected by the compiler to | 3367 // Bit field containing various information collected by the compiler to |
3368 // drive optimization. | 3368 // drive optimization. |
3369 inline int compiler_hints(); | 3369 inline int compiler_hints(); |
3370 inline void set_compiler_hints(int value); | 3370 inline void set_compiler_hints(int value); |
3371 | 3371 |
3372 // Add information on assignments of the form this.x = ...; | 3372 // Add information on assignments of the form this.x = ...; |
3373 void SetThisPropertyAssignmentsInfo( | 3373 void SetThisPropertyAssignmentsInfo( |
3374 bool has_only_this_property_assignments, | |
3375 bool has_only_simple_this_property_assignments, | 3374 bool has_only_simple_this_property_assignments, |
3376 FixedArray* this_property_assignments); | 3375 FixedArray* this_property_assignments); |
3377 | 3376 |
3378 // Clear information on assignments of the form this.x = ...; | 3377 // Clear information on assignments of the form this.x = ...; |
3379 void ClearThisPropertyAssignmentsInfo(); | 3378 void ClearThisPropertyAssignmentsInfo(); |
3380 | 3379 |
3381 // Indicate that this function only consists of assignments of the form | 3380 // Indicate that this function only consists of assignments of the form |
3382 // this.x = ...;. | |
3383 inline bool has_only_this_property_assignments(); | |
3384 | |
3385 // Indicate that this function only consists of assignments of the form | |
3386 // this.x = y; where y is either a constant or refers to an argument. | 3381 // this.x = y; where y is either a constant or refers to an argument. |
3387 inline bool has_only_simple_this_property_assignments(); | 3382 inline bool has_only_simple_this_property_assignments(); |
3388 | 3383 |
3389 // For functions which only contains this property assignments this provides | 3384 // For functions which only contains this property assignments this provides |
3390 // access to the names for the properties assigned. | 3385 // access to the names for the properties assigned. |
3391 DECL_ACCESSORS(this_property_assignments, Object) | 3386 DECL_ACCESSORS(this_property_assignments, Object) |
3392 inline int this_property_assignments_count(); | 3387 inline int this_property_assignments_count(); |
3393 inline void set_this_property_assignments_count(int value); | 3388 inline void set_this_property_assignments_count(int value); |
3394 String* GetThisPropertyAssignmentName(int index); | 3389 String* GetThisPropertyAssignmentName(int index); |
3395 bool IsThisPropertyAssignmentArgument(int index); | 3390 bool IsThisPropertyAssignmentArgument(int index); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3457 | 3452 |
3458 // Bit positions in start_position_and_type. | 3453 // Bit positions in start_position_and_type. |
3459 // The source code start position is in the 30 most significant bits of | 3454 // The source code start position is in the 30 most significant bits of |
3460 // the start_position_and_type field. | 3455 // the start_position_and_type field. |
3461 static const int kIsExpressionBit = 0; | 3456 static const int kIsExpressionBit = 0; |
3462 static const int kIsTopLevelBit = 1; | 3457 static const int kIsTopLevelBit = 1; |
3463 static const int kStartPositionShift = 2; | 3458 static const int kStartPositionShift = 2; |
3464 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 3459 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
3465 | 3460 |
3466 // Bit positions in compiler_hints. | 3461 // Bit positions in compiler_hints. |
3467 static const int kHasOnlyThisPropertyAssignments = 0; | 3462 static const int kHasOnlySimpleThisPropertyAssignments = 0; |
3468 static const int kHasOnlySimpleThisPropertyAssignments = 1; | |
3469 | 3463 |
3470 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 3464 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); |
3471 }; | 3465 }; |
3472 | 3466 |
3473 | 3467 |
3474 // JSFunction describes JavaScript functions. | 3468 // JSFunction describes JavaScript functions. |
3475 class JSFunction: public JSObject { | 3469 class JSFunction: public JSObject { |
3476 public: | 3470 public: |
3477 // [prototype_or_initial_map]: | 3471 // [prototype_or_initial_map]: |
3478 DECL_ACCESSORS(prototype_or_initial_map, Object) | 3472 DECL_ACCESSORS(prototype_or_initial_map, Object) |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5144 } else { | 5138 } else { |
5145 value &= ~(1 << bit_position); | 5139 value &= ~(1 << bit_position); |
5146 } | 5140 } |
5147 return value; | 5141 return value; |
5148 } | 5142 } |
5149 }; | 5143 }; |
5150 | 5144 |
5151 } } // namespace v8::internal | 5145 } } // namespace v8::internal |
5152 | 5146 |
5153 #endif // V8_OBJECTS_H_ | 5147 #endif // V8_OBJECTS_H_ |
OLD | NEW |