| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 #ifdef DEBUG | 277 #ifdef DEBUG |
| 278 if (info->isolate()->bootstrapper()->IsActive() | 278 if (info->isolate()->bootstrapper()->IsActive() |
| 279 ? FLAG_print_builtin_scopes | 279 ? FLAG_print_builtin_scopes |
| 280 : FLAG_print_scopes) { | 280 : FLAG_print_scopes) { |
| 281 scope->Print(); | 281 scope->Print(); |
| 282 } | 282 } |
| 283 #endif | 283 #endif |
| 284 | 284 |
| 285 info->SetScope(scope); | 285 info->SetScope(scope); |
| 286 info->function()->ComputeAstNodeCountAndInlineableFlags(); |
| 286 return true; // Can not fail. | 287 return true; // Can not fail. |
| 287 } | 288 } |
| 288 | 289 |
| 289 | 290 |
| 290 void Scope::Initialize() { | 291 void Scope::Initialize() { |
| 291 ASSERT(!already_resolved()); | 292 ASSERT(!already_resolved()); |
| 292 | 293 |
| 293 // Add this scope as a new inner scope of the outer scope. | 294 // Add this scope as a new inner scope of the outer scope. |
| 294 if (outer_scope_ != NULL) { | 295 if (outer_scope_ != NULL) { |
| 295 outer_scope_->inner_scopes_.Add(this); | 296 outer_scope_->inner_scopes_.Add(this); |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 } | 1179 } |
| 1179 | 1180 |
| 1180 | 1181 |
| 1181 int Scope::ContextLocalCount() const { | 1182 int Scope::ContextLocalCount() const { |
| 1182 if (num_heap_slots() == 0) return 0; | 1183 if (num_heap_slots() == 0) return 0; |
| 1183 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - | 1184 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - |
| 1184 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0); | 1185 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0); |
| 1185 } | 1186 } |
| 1186 | 1187 |
| 1187 } } // namespace v8::internal | 1188 } } // namespace v8::internal |
| OLD | NEW |