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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 public: | 329 public: |
330 FrameDescription(uint32_t frame_size, | 330 FrameDescription(uint32_t frame_size, |
331 JSFunction* function); | 331 JSFunction* function); |
332 | 332 |
333 void* operator new(size_t size, uint32_t frame_size) { | 333 void* operator new(size_t size, uint32_t frame_size) { |
334 // Subtracts kPointerSize, as the member frame_content_ already supplies | 334 // Subtracts kPointerSize, as the member frame_content_ already supplies |
335 // the first element of the area to store the frame. | 335 // the first element of the area to store the frame. |
336 return malloc(size + frame_size - kPointerSize); | 336 return malloc(size + frame_size - kPointerSize); |
337 } | 337 } |
338 | 338 |
| 339 void operator delete(void* pointer, uint32_t frame_size) { |
| 340 free(pointer); |
| 341 } |
| 342 |
339 void operator delete(void* description) { | 343 void operator delete(void* description) { |
340 free(description); | 344 free(description); |
341 } | 345 } |
342 | 346 |
343 uint32_t GetFrameSize() const { | 347 uint32_t GetFrameSize() const { |
344 ASSERT(static_cast<uint32_t>(frame_size_) == frame_size_); | 348 ASSERT(static_cast<uint32_t>(frame_size_) == frame_size_); |
345 return static_cast<uint32_t>(frame_size_); | 349 return static_cast<uint32_t>(frame_size_); |
346 } | 350 } |
347 | 351 |
348 JSFunction* GetFunction() const { return function_; } | 352 JSFunction* GetFunction() const { return function_; } |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 Object** parameters_; | 717 Object** parameters_; |
714 Object** expression_stack_; | 718 Object** expression_stack_; |
715 | 719 |
716 friend class Deoptimizer; | 720 friend class Deoptimizer; |
717 }; | 721 }; |
718 #endif | 722 #endif |
719 | 723 |
720 } } // namespace v8::internal | 724 } } // namespace v8::internal |
721 | 725 |
722 #endif // V8_DEOPTIMIZER_H_ | 726 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |