Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Side by Side Diff: src/deoptimizer.h

Issue 26863002: Use C++ style raw (de)allocation in FrameDescription. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 459
460 460
461 class FrameDescription { 461 class FrameDescription {
462 public: 462 public:
463 FrameDescription(uint32_t frame_size, 463 FrameDescription(uint32_t frame_size,
464 JSFunction* function); 464 JSFunction* function);
465 465
466 void* operator new(size_t size, uint32_t frame_size) { 466 void* operator new(size_t size, uint32_t frame_size) {
467 // Subtracts kPointerSize, as the member frame_content_ already supplies 467 // Subtracts kPointerSize, as the member frame_content_ already supplies
468 // the first element of the area to store the frame. 468 // the first element of the area to store the frame.
469 return malloc(size + frame_size - kPointerSize); 469 return ::operator new(size + frame_size - kPointerSize);
470 } 470 }
471 471
472 void operator delete(void* pointer, uint32_t frame_size) { 472 void operator delete(void* pointer, uint32_t frame_size) {
473 free(pointer); 473 ::operator delete(pointer);
474 } 474 }
475 475
476 void operator delete(void* description) { 476 void operator delete(void* description) {
477 free(description); 477 ::operator delete(description);
478 } 478 }
479 479
480 uint32_t GetFrameSize() const { 480 uint32_t GetFrameSize() const {
481 ASSERT(static_cast<uint32_t>(frame_size_) == frame_size_); 481 ASSERT(static_cast<uint32_t>(frame_size_) == frame_size_);
482 return static_cast<uint32_t>(frame_size_); 482 return static_cast<uint32_t>(frame_size_);
483 } 483 }
484 484
485 JSFunction* GetFunction() const { return function_; } 485 JSFunction* GetFunction() const { return function_; }
486 486
487 unsigned GetOffsetFromSlotIndex(int slot_index); 487 unsigned GetOffsetFromSlotIndex(int slot_index);
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 Object** expression_stack_; 922 Object** expression_stack_;
923 int source_position_; 923 int source_position_;
924 924
925 friend class Deoptimizer; 925 friend class Deoptimizer;
926 }; 926 };
927 #endif 927 #endif
928 928
929 } } // namespace v8::internal 929 } } // namespace v8::internal
930 930
931 #endif // V8_DEOPTIMIZER_H_ 931 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698