| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 ParseRestriction parse_restriction() const { | 170 ParseRestriction parse_restriction() const { |
| 171 return ParseRestricitonField::decode(flags_); | 171 return ParseRestricitonField::decode(flags_); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void SetFunction(FunctionLiteral* literal) { | 174 void SetFunction(FunctionLiteral* literal) { |
| 175 ASSERT(function_ == NULL); | 175 ASSERT(function_ == NULL); |
| 176 function_ = literal; | 176 function_ = literal; |
| 177 } | 177 } |
| 178 void SetScope(Scope* scope) { | 178 // When the scope is applied, we may have deferred work to do on the function. |
| 179 ASSERT(scope_ == NULL); | 179 void PrepareForCompilation(Scope* scope); |
| 180 scope_ = scope; | |
| 181 } | |
| 182 void SetGlobalScope(Scope* global_scope) { | 180 void SetGlobalScope(Scope* global_scope) { |
| 183 ASSERT(global_scope_ == NULL); | 181 ASSERT(global_scope_ == NULL); |
| 184 global_scope_ = global_scope; | 182 global_scope_ = global_scope; |
| 185 } | 183 } |
| 186 void SetCode(Handle<Code> code) { code_ = code; } | 184 void SetCode(Handle<Code> code) { code_ = code; } |
| 187 void SetExtension(v8::Extension* extension) { | 185 void SetExtension(v8::Extension* extension) { |
| 188 ASSERT(!is_lazy()); | 186 ASSERT(!is_lazy()); |
| 189 extension_ = extension; | 187 extension_ = extension; |
| 190 } | 188 } |
| 191 void SetPreParseData(ScriptDataImpl* pre_parse_data) { | 189 void SetPreParseData(ScriptDataImpl* pre_parse_data) { |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 unsigned info_zone_start_allocation_size_; | 674 unsigned info_zone_start_allocation_size_; |
| 677 ElapsedTimer timer_; | 675 ElapsedTimer timer_; |
| 678 | 676 |
| 679 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 677 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
| 680 }; | 678 }; |
| 681 | 679 |
| 682 | 680 |
| 683 } } // namespace v8::internal | 681 } } // namespace v8::internal |
| 684 | 682 |
| 685 #endif // V8_COMPILER_H_ | 683 #endif // V8_COMPILER_H_ |
| OLD | NEW |