| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 123 } |
| 124 | 124 |
| 125 void MarkAsNonDeferredCalling() { | 125 void MarkAsNonDeferredCalling() { |
| 126 flags_ |= IsNonDeferredCalling::encode(true); | 126 flags_ |= IsNonDeferredCalling::encode(true); |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool is_non_deferred_calling() const { | 129 bool is_non_deferred_calling() const { |
| 130 return IsNonDeferredCalling::decode(flags_); | 130 return IsNonDeferredCalling::decode(flags_); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void MarkAsSavesCallerDoubles() { |
| 134 flags_ |= SavesCallerDoubles::encode(true); |
| 135 } |
| 136 |
| 137 bool saves_caller_doubles() const { |
| 138 return SavesCallerDoubles::decode(flags_); |
| 139 } |
| 140 |
| 133 void SetFunction(FunctionLiteral* literal) { | 141 void SetFunction(FunctionLiteral* literal) { |
| 134 ASSERT(function_ == NULL); | 142 ASSERT(function_ == NULL); |
| 135 function_ = literal; | 143 function_ = literal; |
| 136 } | 144 } |
| 137 void SetScope(Scope* scope) { | 145 void SetScope(Scope* scope) { |
| 138 ASSERT(scope_ == NULL); | 146 ASSERT(scope_ == NULL); |
| 139 scope_ = scope; | 147 scope_ = scope; |
| 140 } | 148 } |
| 141 void SetGlobalScope(Scope* global_scope) { | 149 void SetGlobalScope(Scope* global_scope) { |
| 142 ASSERT(global_scope_ == NULL); | 150 ASSERT(global_scope_ == NULL); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 class SupportsDeoptimization: public BitField<bool, 7, 1> {}; | 276 class SupportsDeoptimization: public BitField<bool, 7, 1> {}; |
| 269 // If compiling for debugging produce just full code matching the | 277 // If compiling for debugging produce just full code matching the |
| 270 // initial mode setting. | 278 // initial mode setting. |
| 271 class IsCompilingForDebugging: public BitField<bool, 8, 1> {}; | 279 class IsCompilingForDebugging: public BitField<bool, 8, 1> {}; |
| 272 // If the compiled code contains calls that require building a frame | 280 // If the compiled code contains calls that require building a frame |
| 273 class IsCalling: public BitField<bool, 9, 1> {}; | 281 class IsCalling: public BitField<bool, 9, 1> {}; |
| 274 // If the compiled code contains calls that require building a frame | 282 // If the compiled code contains calls that require building a frame |
| 275 class IsDeferredCalling: public BitField<bool, 10, 1> {}; | 283 class IsDeferredCalling: public BitField<bool, 10, 1> {}; |
| 276 // If the compiled code contains calls that require building a frame | 284 // If the compiled code contains calls that require building a frame |
| 277 class IsNonDeferredCalling: public BitField<bool, 11, 1> {}; | 285 class IsNonDeferredCalling: public BitField<bool, 11, 1> {}; |
| 286 // If the compiled code saves double caller registers that it clobbers. |
| 287 class SavesCallerDoubles: public BitField<bool, 12, 1> {}; |
| 278 | 288 |
| 279 | 289 |
| 280 unsigned flags_; | 290 unsigned flags_; |
| 281 | 291 |
| 282 // Fields filled in by the compilation pipeline. | 292 // Fields filled in by the compilation pipeline. |
| 283 // AST filled in by the parser. | 293 // AST filled in by the parser. |
| 284 FunctionLiteral* function_; | 294 FunctionLiteral* function_; |
| 285 // The scope of the function literal as a convenience. Set to indicate | 295 // The scope of the function literal as a convenience. Set to indicate |
| 286 // that scopes have been analyzed. | 296 // that scopes have been analyzed. |
| 287 Scope* scope_; | 297 Scope* scope_; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 530 |
| 521 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 531 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
| 522 CompilationInfo* info, | 532 CompilationInfo* info, |
| 523 Handle<SharedFunctionInfo> shared); | 533 Handle<SharedFunctionInfo> shared); |
| 524 }; | 534 }; |
| 525 | 535 |
| 526 | 536 |
| 527 } } // namespace v8::internal | 537 } } // namespace v8::internal |
| 528 | 538 |
| 529 #endif // V8_COMPILER_H_ | 539 #endif // V8_COMPILER_H_ |
| OLD | NEW |