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 3368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3379 void ClearThisPropertyAssignmentsInfo(); | 3379 void ClearThisPropertyAssignmentsInfo(); |
3380 | 3380 |
3381 // Indicate that this function only consists of assignments of the form | 3381 // Indicate that this function only consists of assignments of the form |
3382 // this.x = ...;. | 3382 // this.x = ...;. |
3383 inline bool has_only_this_property_assignments(); | 3383 inline bool has_only_this_property_assignments(); |
3384 | 3384 |
3385 // Indicate that this function only consists of assignments of the form | 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. | 3386 // this.x = y; where y is either a constant or refers to an argument. |
3387 inline bool has_only_simple_this_property_assignments(); | 3387 inline bool has_only_simple_this_property_assignments(); |
3388 | 3388 |
| 3389 inline bool try_fast_codegen(); |
| 3390 inline void set_try_fast_codegen(bool flag); |
| 3391 |
3389 // For functions which only contains this property assignments this provides | 3392 // For functions which only contains this property assignments this provides |
3390 // access to the names for the properties assigned. | 3393 // access to the names for the properties assigned. |
3391 DECL_ACCESSORS(this_property_assignments, Object) | 3394 DECL_ACCESSORS(this_property_assignments, Object) |
3392 inline int this_property_assignments_count(); | 3395 inline int this_property_assignments_count(); |
3393 inline void set_this_property_assignments_count(int value); | 3396 inline void set_this_property_assignments_count(int value); |
3394 String* GetThisPropertyAssignmentName(int index); | 3397 String* GetThisPropertyAssignmentName(int index); |
3395 bool IsThisPropertyAssignmentArgument(int index); | 3398 bool IsThisPropertyAssignmentArgument(int index); |
3396 int GetThisPropertyAssignmentArgument(int index); | 3399 int GetThisPropertyAssignmentArgument(int index); |
3397 Object* GetThisPropertyAssignmentConstant(int index); | 3400 Object* GetThisPropertyAssignmentConstant(int index); |
3398 | 3401 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3459 // The source code start position is in the 30 most significant bits of | 3462 // The source code start position is in the 30 most significant bits of |
3460 // the start_position_and_type field. | 3463 // the start_position_and_type field. |
3461 static const int kIsExpressionBit = 0; | 3464 static const int kIsExpressionBit = 0; |
3462 static const int kIsTopLevelBit = 1; | 3465 static const int kIsTopLevelBit = 1; |
3463 static const int kStartPositionShift = 2; | 3466 static const int kStartPositionShift = 2; |
3464 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 3467 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
3465 | 3468 |
3466 // Bit positions in compiler_hints. | 3469 // Bit positions in compiler_hints. |
3467 static const int kHasOnlyThisPropertyAssignments = 0; | 3470 static const int kHasOnlyThisPropertyAssignments = 0; |
3468 static const int kHasOnlySimpleThisPropertyAssignments = 1; | 3471 static const int kHasOnlySimpleThisPropertyAssignments = 1; |
| 3472 static const int kTryFastCodegen = 2; |
3469 | 3473 |
3470 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 3474 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); |
3471 }; | 3475 }; |
3472 | 3476 |
3473 | 3477 |
3474 // JSFunction describes JavaScript functions. | 3478 // JSFunction describes JavaScript functions. |
3475 class JSFunction: public JSObject { | 3479 class JSFunction: public JSObject { |
3476 public: | 3480 public: |
3477 // [prototype_or_initial_map]: | 3481 // [prototype_or_initial_map]: |
3478 DECL_ACCESSORS(prototype_or_initial_map, Object) | 3482 DECL_ACCESSORS(prototype_or_initial_map, Object) |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5144 } else { | 5148 } else { |
5145 value &= ~(1 << bit_position); | 5149 value &= ~(1 << bit_position); |
5146 } | 5150 } |
5147 return value; | 5151 return value; |
5148 } | 5152 } |
5149 }; | 5153 }; |
5150 | 5154 |
5151 } } // namespace v8::internal | 5155 } } // namespace v8::internal |
5152 | 5156 |
5153 #endif // V8_OBJECTS_H_ | 5157 #endif // V8_OBJECTS_H_ |
OLD | NEW |