| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 return script_; | 131 return script_; |
| 132 } else { | 132 } else { |
| 133 ASSERT(shared_info()->script()->IsScript()); | 133 ASSERT(shared_info()->script()->IsScript()); |
| 134 return Handle<Script>(Script::cast(shared_info()->script())); | 134 return Handle<Script>(Script::cast(shared_info()->script())); |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 | 137 |
| 138 // There should always be a function literal, but it may be set after | 138 // There should always be a function literal, but it may be set after |
| 139 // construction (for lazy compilation). | 139 // construction (for lazy compilation). |
| 140 FunctionLiteral* function() { return function_; } | 140 FunctionLiteral* function() { return function_; } |
| 141 void set_function(FunctionLiteral* literal) { | 141 void set_function(FunctionLiteral* literal) { function_ = literal; } |
| 142 ASSERT(function_ == NULL); | |
| 143 function_ = literal; | |
| 144 } | |
| 145 | 142 |
| 146 // Simple accessors. | 143 // Simple accessors. |
| 147 bool is_eval() { return is_eval_; } | 144 bool is_eval() { return is_eval_; } |
| 148 int loop_nesting() { return loop_nesting_; } | 145 int loop_nesting() { return loop_nesting_; } |
| 149 bool has_receiver() { return !receiver_.is_null(); } | 146 bool has_receiver() { return !receiver_.is_null(); } |
| 150 Handle<Object> receiver() { return receiver_; } | 147 Handle<Object> receiver() { return receiver_; } |
| 151 List<Bailout*>* bailouts() { return &bailouts_; } | 148 List<Bailout*>* bailouts() { return &bailouts_; } |
| 152 | 149 |
| 153 // Accessors for mutable fields (possibly set by analysis passes) with | 150 // Accessors for mutable fields (possibly set by analysis passes) with |
| 154 // default values given by Initialize. | 151 // default values given by Initialize. |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 FrameElement::ClearConstantList(); | 290 FrameElement::ClearConstantList(); |
| 294 Result::ClearConstantList(); | 291 Result::ClearConstantList(); |
| 295 } | 292 } |
| 296 } | 293 } |
| 297 }; | 294 }; |
| 298 | 295 |
| 299 | 296 |
| 300 } } // namespace v8::internal | 297 } } // namespace v8::internal |
| 301 | 298 |
| 302 #endif // V8_COMPILER_H_ | 299 #endif // V8_COMPILER_H_ |
| OLD | NEW |