| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 template<class Allocator> | 306 template<class Allocator> |
| 307 Handle<SerializedScopeInfo> ScopeInfo<Allocator>::Serialize() { | 307 Handle<SerializedScopeInfo> ScopeInfo<Allocator>::Serialize() { |
| 308 // function name, calls eval, is_strict_mode, length for 3 tables: | 308 // function name, calls eval, is_strict_mode, length for 3 tables: |
| 309 const int extra_slots = 1 + 1 + 1 + 3; | 309 const int extra_slots = 1 + 1 + 1 + 3; |
| 310 int length = extra_slots + | 310 int length = extra_slots + |
| 311 context_slots_.length() * 2 + | 311 context_slots_.length() * 2 + |
| 312 parameters_.length() + | 312 parameters_.length() + |
| 313 stack_slots_.length(); | 313 stack_slots_.length(); |
| 314 | 314 |
| 315 Handle<SerializedScopeInfo> data( | 315 Handle<SerializedScopeInfo> data( |
| 316 SerializedScopeInfo::cast(*FACTORY->NewFixedArray(length, TENURED))); | 316 SerializedScopeInfo::cast(*FACTORY->NewSerializedScopeInfo(length))); |
| 317 AssertNoAllocation nogc; | 317 AssertNoAllocation nogc; |
| 318 | 318 |
| 319 Object** p0 = data->data_start(); | 319 Object** p0 = data->data_start(); |
| 320 Object** p = p0; | 320 Object** p = p0; |
| 321 p = WriteSymbol(p, function_name_); | 321 p = WriteSymbol(p, function_name_); |
| 322 p = WriteBool(p, calls_eval_); | 322 p = WriteBool(p, calls_eval_); |
| 323 p = WriteBool(p, is_strict_mode_); | 323 p = WriteBool(p, is_strict_mode_); |
| 324 p = WriteList(p, &context_slots_, &context_modes_); | 324 p = WriteList(p, &context_slots_, &context_modes_); |
| 325 p = WriteList(p, ¶meters_); | 325 p = WriteList(p, ¶meters_); |
| 326 p = WriteList(p, &stack_slots_); | 326 p = WriteList(p, &stack_slots_); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 } | 639 } |
| 640 #endif // DEBUG | 640 #endif // DEBUG |
| 641 | 641 |
| 642 | 642 |
| 643 // Make sure the classes get instantiated by the template system. | 643 // Make sure the classes get instantiated by the template system. |
| 644 template class ScopeInfo<FreeStoreAllocationPolicy>; | 644 template class ScopeInfo<FreeStoreAllocationPolicy>; |
| 645 template class ScopeInfo<PreallocatedStorage>; | 645 template class ScopeInfo<PreallocatedStorage>; |
| 646 template class ScopeInfo<ZoneListAllocationPolicy>; | 646 template class ScopeInfo<ZoneListAllocationPolicy>; |
| 647 | 647 |
| 648 } } // namespace v8::internal | 648 } } // namespace v8::internal |
| OLD | NEW |