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

Side by Side Diff: src/v8globals.h

Issue 8501006: Disentangle header dependecies a bit by moving PropertyDetails-related types into a separate header (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 | « src/property-details.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 kStoreBufferStartScanningPagesEvent, 317 kStoreBufferStartScanningPagesEvent,
318 kStoreBufferScanningPageEvent 318 kStoreBufferScanningPageEvent
319 } StoreBufferEvent; 319 } StoreBufferEvent;
320 320
321 321
322 typedef void (*StoreBufferCallback)(Heap* heap, 322 typedef void (*StoreBufferCallback)(Heap* heap,
323 MemoryChunk* page, 323 MemoryChunk* page,
324 StoreBufferEvent event); 324 StoreBufferEvent event);
325 325
326 326
327 // Type of properties.
328 // Order of properties is significant.
329 // Must fit in the BitField PropertyDetails::TypeField.
330 // A copy of this is in mirror-debugger.js.
331 enum PropertyType {
332 NORMAL = 0, // only in slow mode
333 FIELD = 1, // only in fast mode
334 CONSTANT_FUNCTION = 2, // only in fast mode
335 CALLBACKS = 3,
336 HANDLER = 4, // only in lookup results, not in descriptors
337 INTERCEPTOR = 5, // only in lookup results, not in descriptors
338 MAP_TRANSITION = 6, // only in fast mode
339 ELEMENTS_TRANSITION = 7,
340 CONSTANT_TRANSITION = 8, // only in fast mode
341 NULL_DESCRIPTOR = 9, // only in fast mode
342 // All properties before MAP_TRANSITION are real.
343 FIRST_PHANTOM_PROPERTY_TYPE = MAP_TRANSITION,
344 // There are no IC stubs for NULL_DESCRIPTORS. Therefore,
345 // NULL_DESCRIPTOR can be used as the type flag for IC stubs for
346 // nonexistent properties.
347 NONEXISTENT = NULL_DESCRIPTOR
348 };
349
350
351 inline bool IsTransitionType(PropertyType type) {
352 switch (type) {
353 case MAP_TRANSITION:
354 case CONSTANT_TRANSITION:
355 case ELEMENTS_TRANSITION:
356 return true;
357 case NORMAL:
358 case FIELD:
359 case CONSTANT_FUNCTION:
360 case CALLBACKS:
361 case HANDLER:
362 case INTERCEPTOR:
363 case NULL_DESCRIPTOR:
364 return false;
365 }
366 UNREACHABLE(); // keep the compiler happy
367 return false;
368 }
369
370 // Whether to remove map transitions and constant transitions from a 327 // Whether to remove map transitions and constant transitions from a
371 // DescriptorArray. 328 // DescriptorArray.
372 enum TransitionFlag { 329 enum TransitionFlag {
373 REMOVE_TRANSITIONS, 330 REMOVE_TRANSITIONS,
374 KEEP_TRANSITIONS 331 KEEP_TRANSITIONS
375 }; 332 };
376 333
377 334
378 // Union used for fast testing of specific double values. 335 // Union used for fast testing of specific double values.
379 union DoubleRepresentation { 336 union DoubleRepresentation {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 565
609 enum ClearExceptionFlag { 566 enum ClearExceptionFlag {
610 KEEP_EXCEPTION, 567 KEEP_EXCEPTION,
611 CLEAR_EXCEPTION 568 CLEAR_EXCEPTION
612 }; 569 };
613 570
614 571
615 } } // namespace v8::internal 572 } } // namespace v8::internal
616 573
617 #endif // V8_V8GLOBALS_H_ 574 #endif // V8_V8GLOBALS_H_
OLDNEW
« no previous file with comments | « src/property-details.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698