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 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3299 // Clear information on assignments of the form this.x = ...; | 3299 // Clear information on assignments of the form this.x = ...; |
3300 void ClearThisPropertyAssignmentsInfo(); | 3300 void ClearThisPropertyAssignmentsInfo(); |
3301 | 3301 |
3302 // Indicate that this function only consists of assignments of the form | 3302 // Indicate that this function only consists of assignments of the form |
3303 // this.x = y; where y is either a constant or refers to an argument. | 3303 // this.x = y; where y is either a constant or refers to an argument. |
3304 inline bool has_only_simple_this_property_assignments(); | 3304 inline bool has_only_simple_this_property_assignments(); |
3305 | 3305 |
3306 inline bool try_full_codegen(); | 3306 inline bool try_full_codegen(); |
3307 inline void set_try_full_codegen(bool flag); | 3307 inline void set_try_full_codegen(bool flag); |
3308 | 3308 |
| 3309 // Indicates if this function can be lazy compiled. |
| 3310 // This is used to determine if we can safely flush code from a function |
| 3311 // when doing GC if we expect that the function will no longer be used. |
| 3312 inline bool allows_lazy_compilation(); |
| 3313 inline void set_allows_lazy_compilation(bool flag); |
| 3314 |
3309 // Check whether a inlined constructor can be generated with the given | 3315 // Check whether a inlined constructor can be generated with the given |
3310 // prototype. | 3316 // prototype. |
3311 bool CanGenerateInlineConstructor(Object* prototype); | 3317 bool CanGenerateInlineConstructor(Object* prototype); |
3312 | 3318 |
3313 // For functions which only contains this property assignments this provides | 3319 // For functions which only contains this property assignments this provides |
3314 // access to the names for the properties assigned. | 3320 // access to the names for the properties assigned. |
3315 DECL_ACCESSORS(this_property_assignments, Object) | 3321 DECL_ACCESSORS(this_property_assignments, Object) |
3316 inline int this_property_assignments_count(); | 3322 inline int this_property_assignments_count(); |
3317 inline void set_this_property_assignments_count(int value); | 3323 inline void set_this_property_assignments_count(int value); |
3318 String* GetThisPropertyAssignmentName(int index); | 3324 String* GetThisPropertyAssignmentName(int index); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3424 // The source code start position is in the 30 most significant bits of | 3430 // The source code start position is in the 30 most significant bits of |
3425 // the start_position_and_type field. | 3431 // the start_position_and_type field. |
3426 static const int kIsExpressionBit = 0; | 3432 static const int kIsExpressionBit = 0; |
3427 static const int kIsTopLevelBit = 1; | 3433 static const int kIsTopLevelBit = 1; |
3428 static const int kStartPositionShift = 2; | 3434 static const int kStartPositionShift = 2; |
3429 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 3435 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
3430 | 3436 |
3431 // Bit positions in compiler_hints. | 3437 // Bit positions in compiler_hints. |
3432 static const int kHasOnlySimpleThisPropertyAssignments = 0; | 3438 static const int kHasOnlySimpleThisPropertyAssignments = 0; |
3433 static const int kTryFullCodegen = 1; | 3439 static const int kTryFullCodegen = 1; |
| 3440 static const int kAllowLazyCompilation = 2; |
3434 | 3441 |
3435 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 3442 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); |
3436 }; | 3443 }; |
3437 | 3444 |
3438 | 3445 |
3439 // JSFunction describes JavaScript functions. | 3446 // JSFunction describes JavaScript functions. |
3440 class JSFunction: public JSObject { | 3447 class JSFunction: public JSObject { |
3441 public: | 3448 public: |
3442 // [prototype_or_initial_map]: | 3449 // [prototype_or_initial_map]: |
3443 DECL_ACCESSORS(prototype_or_initial_map, Object) | 3450 DECL_ACCESSORS(prototype_or_initial_map, Object) |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5252 } else { | 5259 } else { |
5253 value &= ~(1 << bit_position); | 5260 value &= ~(1 << bit_position); |
5254 } | 5261 } |
5255 return value; | 5262 return value; |
5256 } | 5263 } |
5257 }; | 5264 }; |
5258 | 5265 |
5259 } } // namespace v8::internal | 5266 } } // namespace v8::internal |
5260 | 5267 |
5261 #endif // V8_OBJECTS_H_ | 5268 #endif // V8_OBJECTS_H_ |
OLD | NEW |