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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 136 } |
137 | 137 |
138 void MarkAsSavesCallerDoubles() { | 138 void MarkAsSavesCallerDoubles() { |
139 flags_ |= SavesCallerDoubles::encode(true); | 139 flags_ |= SavesCallerDoubles::encode(true); |
140 } | 140 } |
141 | 141 |
142 bool saves_caller_doubles() const { | 142 bool saves_caller_doubles() const { |
143 return SavesCallerDoubles::decode(flags_); | 143 return SavesCallerDoubles::decode(flags_); |
144 } | 144 } |
145 | 145 |
| 146 void MarkAsStubThatUsesArguments() { |
| 147 flags_ |= StubThatUsesArguments::encode(true); |
| 148 } |
| 149 |
| 150 bool stub_that_uses_arguments() const { |
| 151 return StubThatUsesArguments::decode(flags_); |
| 152 } |
| 153 |
146 void SetParseRestriction(ParseRestriction restriction) { | 154 void SetParseRestriction(ParseRestriction restriction) { |
147 flags_ = ParseRestricitonField::update(flags_, restriction); | 155 flags_ = ParseRestricitonField::update(flags_, restriction); |
148 } | 156 } |
149 | 157 |
150 ParseRestriction parse_restriction() const { | 158 ParseRestriction parse_restriction() const { |
151 return ParseRestricitonField::decode(flags_); | 159 return ParseRestricitonField::decode(flags_); |
152 } | 160 } |
153 | 161 |
154 void SetFunction(FunctionLiteral* literal) { | 162 void SetFunction(FunctionLiteral* literal) { |
155 ASSERT(function_ == NULL); | 163 ASSERT(function_ == NULL); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 // If the compiled code contains calls that require building a frame | 301 // If the compiled code contains calls that require building a frame |
294 class IsCalling: public BitField<bool, 9, 1> {}; | 302 class IsCalling: public BitField<bool, 9, 1> {}; |
295 // If the compiled code contains calls that require building a frame | 303 // If the compiled code contains calls that require building a frame |
296 class IsDeferredCalling: public BitField<bool, 10, 1> {}; | 304 class IsDeferredCalling: public BitField<bool, 10, 1> {}; |
297 // If the compiled code contains calls that require building a frame | 305 // If the compiled code contains calls that require building a frame |
298 class IsNonDeferredCalling: public BitField<bool, 11, 1> {}; | 306 class IsNonDeferredCalling: public BitField<bool, 11, 1> {}; |
299 // If the compiled code saves double caller registers that it clobbers. | 307 // If the compiled code saves double caller registers that it clobbers. |
300 class SavesCallerDoubles: public BitField<bool, 12, 1> {}; | 308 class SavesCallerDoubles: public BitField<bool, 12, 1> {}; |
301 // If the set of valid statements is restricted. | 309 // If the set of valid statements is restricted. |
302 class ParseRestricitonField: public BitField<ParseRestriction, 13, 1> {}; | 310 class ParseRestricitonField: public BitField<ParseRestriction, 13, 1> {}; |
| 311 // Is this a hydrogen stub that insists on using arguments? |
| 312 class StubThatUsesArguments: public BitField<bool, 14, 1> {}; |
303 | 313 |
304 unsigned flags_; | 314 unsigned flags_; |
305 | 315 |
306 // Fields filled in by the compilation pipeline. | 316 // Fields filled in by the compilation pipeline. |
307 // AST filled in by the parser. | 317 // AST filled in by the parser. |
308 FunctionLiteral* function_; | 318 FunctionLiteral* function_; |
309 // The scope of the function literal as a convenience. Set to indicate | 319 // The scope of the function literal as a convenience. Set to indicate |
310 // that scopes have been analyzed. | 320 // that scopes have been analyzed. |
311 Scope* scope_; | 321 Scope* scope_; |
312 // The global scope provided as a convenience. | 322 // The global scope provided as a convenience. |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 | 554 |
545 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 555 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
546 CompilationInfo* info, | 556 CompilationInfo* info, |
547 Handle<SharedFunctionInfo> shared); | 557 Handle<SharedFunctionInfo> shared); |
548 }; | 558 }; |
549 | 559 |
550 | 560 |
551 } } // namespace v8::internal | 561 } } // namespace v8::internal |
552 | 562 |
553 #endif // V8_COMPILER_H_ | 563 #endif // V8_COMPILER_H_ |
OLD | NEW |