| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 | 318 |
| 319 // The Store Buffer (GC). | 319 // The Store Buffer (GC). |
| 320 typedef enum { | 320 typedef enum { |
| 321 kStoreBufferFullEvent, | 321 kStoreBufferFullEvent, |
| 322 kStoreBufferStartScanningPagesEvent, | 322 kStoreBufferStartScanningPagesEvent, |
| 323 kStoreBufferScanningPageEvent | 323 kStoreBufferScanningPageEvent |
| 324 } StoreBufferEvent; | 324 } StoreBufferEvent; |
| 325 | 325 |
| 326 | 326 |
| 327 typedef void (*StoreBufferCallback)(MemoryChunk* page, StoreBufferEvent event); | 327 typedef void (*StoreBufferCallback)(Heap* heap, |
| 328 MemoryChunk* page, |
| 329 StoreBufferEvent event); |
| 328 | 330 |
| 329 | 331 |
| 330 // Type of properties. | 332 // Type of properties. |
| 331 // Order of properties is significant. | 333 // Order of properties is significant. |
| 332 // Must fit in the BitField PropertyDetails::TypeField. | 334 // Must fit in the BitField PropertyDetails::TypeField. |
| 333 // A copy of this is in mirror-debugger.js. | 335 // A copy of this is in mirror-debugger.js. |
| 334 enum PropertyType { | 336 enum PropertyType { |
| 335 NORMAL = 0, // only in slow mode | 337 NORMAL = 0, // only in slow mode |
| 336 FIELD = 1, // only in fast mode | 338 FIELD = 1, // only in fast mode |
| 337 CONSTANT_FUNCTION = 2, // only in fast mode | 339 CONSTANT_FUNCTION = 2, // only in fast mode |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 452 |
| 451 // Support for tracking C++ memory allocation. Insert TRACK_MEMORY("Fisk") | 453 // Support for tracking C++ memory allocation. Insert TRACK_MEMORY("Fisk") |
| 452 // inside a C++ class and new and delete will be overloaded so logging is | 454 // inside a C++ class and new and delete will be overloaded so logging is |
| 453 // performed. | 455 // performed. |
| 454 // This file (globals.h) is included before log.h, so we use direct calls to | 456 // This file (globals.h) is included before log.h, so we use direct calls to |
| 455 // the Logger rather than the LOG macro. | 457 // the Logger rather than the LOG macro. |
| 456 #ifdef DEBUG | 458 #ifdef DEBUG |
| 457 #define TRACK_MEMORY(name) \ | 459 #define TRACK_MEMORY(name) \ |
| 458 void* operator new(size_t size) { \ | 460 void* operator new(size_t size) { \ |
| 459 void* result = ::operator new(size); \ | 461 void* result = ::operator new(size); \ |
| 460 Logger::NewEvent(name, result, size); \ | 462 Logger::NewEventStatic(name, result, size); \ |
| 461 return result; \ | 463 return result; \ |
| 462 } \ | 464 } \ |
| 463 void operator delete(void* object) { \ | 465 void operator delete(void* object) { \ |
| 464 Logger::DeleteEvent(name, object); \ | 466 Logger::DeleteEventStatic(name, object); \ |
| 465 ::operator delete(object); \ | 467 ::operator delete(object); \ |
| 466 } | 468 } |
| 467 #else | 469 #else |
| 468 #define TRACK_MEMORY(name) | 470 #define TRACK_MEMORY(name) |
| 469 #endif | 471 #endif |
| 470 | 472 |
| 471 | 473 |
| 472 // Feature flags bit positions. They are mostly based on the CPUID spec. | 474 // Feature flags bit positions. They are mostly based on the CPUID spec. |
| 473 // (We assign CPUID itself to one of the currently reserved bits -- | 475 // (We assign CPUID itself to one of the currently reserved bits -- |
| 474 // feel free to change this if needed.) | 476 // feel free to change this if needed.) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 489 kStrictMode, | 491 kStrictMode, |
| 490 // This value is never used, but is needed to prevent GCC 4.5 from failing | 492 // This value is never used, but is needed to prevent GCC 4.5 from failing |
| 491 // to compile when we assert that a flag is either kNonStrictMode or | 493 // to compile when we assert that a flag is either kNonStrictMode or |
| 492 // kStrictMode. | 494 // kStrictMode. |
| 493 kInvalidStrictFlag | 495 kInvalidStrictFlag |
| 494 }; | 496 }; |
| 495 | 497 |
| 496 } } // namespace v8::internal | 498 } } // namespace v8::internal |
| 497 | 499 |
| 498 #endif // V8_V8GLOBALS_H_ | 500 #endif // V8_V8GLOBALS_H_ |
| OLD | NEW |