| OLD | NEW |
| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 V(CommentStatistic, paged_space_comments_statistics, \ | 300 V(CommentStatistic, paged_space_comments_statistics, \ |
| 301 CommentStatistic::kMaxComments + 1) | 301 CommentStatistic::kMaxComments + 1) |
| 302 #else | 302 #else |
| 303 | 303 |
| 304 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V) | 304 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V) |
| 305 | 305 |
| 306 #endif | 306 #endif |
| 307 | 307 |
| 308 #define ISOLATE_INIT_ARRAY_LIST(V) \ | 308 #define ISOLATE_INIT_ARRAY_LIST(V) \ |
| 309 /* SerializerDeserializer state. */ \ | 309 /* SerializerDeserializer state. */ \ |
| 310 V(Object*, serialize_partial_snapshot_cache, kPartialSnapshotCacheCapacity) \ | |
| 311 V(int, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \ | 310 V(int, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \ |
| 312 V(int, bad_char_shift_table, kUC16AlphabetSize) \ | 311 V(int, bad_char_shift_table, kUC16AlphabetSize) \ |
| 313 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \ | 312 V(int, good_suffix_shift_table, (kBMMaxShift + 1)) \ |
| 314 V(int, suffix_table, (kBMMaxShift + 1)) \ | 313 V(int, suffix_table, (kBMMaxShift + 1)) \ |
| 315 V(uint32_t, private_random_seed, 2) \ | 314 V(uint32_t, private_random_seed, 2) \ |
| 316 ISOLATE_INIT_DEBUG_ARRAY_LIST(V) | 315 ISOLATE_INIT_DEBUG_ARRAY_LIST(V) |
| 317 | 316 |
| 318 typedef List<HeapObject*, PreallocatedStorageAllocationPolicy> DebugObjectCache; | 317 typedef List<HeapObject*, PreallocatedStorageAllocationPolicy> DebugObjectCache; |
| 319 | 318 |
| 320 #define ISOLATE_INIT_LIST(V) \ | 319 #define ISOLATE_INIT_LIST(V) \ |
| 321 /* SerializerDeserializer state. */ \ | 320 /* SerializerDeserializer state. */ \ |
| 322 V(int, serialize_partial_snapshot_cache_length, 0) \ | 321 V(int, serialize_partial_snapshot_cache_length, 0) \ |
| 322 V(int, serialize_partial_snapshot_cache_capacity, 0) \ |
| 323 V(Object**, serialize_partial_snapshot_cache, NULL) \ |
| 323 /* Assembler state. */ \ | 324 /* Assembler state. */ \ |
| 324 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ | 325 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ |
| 325 V(byte*, assembler_spare_buffer, NULL) \ | 326 V(byte*, assembler_spare_buffer, NULL) \ |
| 326 V(FatalErrorCallback, exception_behavior, NULL) \ | 327 V(FatalErrorCallback, exception_behavior, NULL) \ |
| 327 V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, NULL) \ | 328 V(AllowCodeGenerationFromStringsCallback, allow_code_gen_callback, NULL) \ |
| 328 V(v8::Debug::MessageHandler, message_handler, NULL) \ | 329 V(v8::Debug::MessageHandler, message_handler, NULL) \ |
| 329 /* To distinguish the function templates, so that we can find them in the */ \ | 330 /* To distinguish the function templates, so that we can find them in the */ \ |
| 330 /* function cache of the global context. */ \ | 331 /* function cache of the global context. */ \ |
| 331 V(int, next_serial_number, 0) \ | 332 V(int, next_serial_number, 0) \ |
| 332 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \ | 333 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \ |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 thread_local_top_.scheduled_exception_ = heap_.the_hole_value(); | 604 thread_local_top_.scheduled_exception_ = heap_.the_hole_value(); |
| 604 } | 605 } |
| 605 | 606 |
| 606 bool IsExternallyCaught(); | 607 bool IsExternallyCaught(); |
| 607 | 608 |
| 608 bool is_catchable_by_javascript(MaybeObject* exception) { | 609 bool is_catchable_by_javascript(MaybeObject* exception) { |
| 609 return (exception != Failure::OutOfMemoryException()) && | 610 return (exception != Failure::OutOfMemoryException()) && |
| 610 (exception != heap()->termination_exception()); | 611 (exception != heap()->termination_exception()); |
| 611 } | 612 } |
| 612 | 613 |
| 614 // Serializer. |
| 615 void PushToPartialSnapshotCache(Object* obj); |
| 616 |
| 613 // JS execution stack (see frames.h). | 617 // JS execution stack (see frames.h). |
| 614 static Address c_entry_fp(ThreadLocalTop* thread) { | 618 static Address c_entry_fp(ThreadLocalTop* thread) { |
| 615 return thread->c_entry_fp_; | 619 return thread->c_entry_fp_; |
| 616 } | 620 } |
| 617 static Address handler(ThreadLocalTop* thread) { return thread->handler_; } | 621 static Address handler(ThreadLocalTop* thread) { return thread->handler_; } |
| 618 | 622 |
| 619 inline Address* c_entry_fp_address() { | 623 inline Address* c_entry_fp_address() { |
| 620 return &thread_local_top_.c_entry_fp_; | 624 return &thread_local_top_.c_entry_fp_; |
| 621 } | 625 } |
| 622 inline Address* handler_address() { return &thread_local_top_.handler_; } | 626 inline Address* handler_address() { return &thread_local_top_.handler_; } |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 | 1423 |
| 1420 // Mark the global context with out of memory. | 1424 // Mark the global context with out of memory. |
| 1421 inline void Context::mark_out_of_memory() { | 1425 inline void Context::mark_out_of_memory() { |
| 1422 global_context()->set_out_of_memory(HEAP->true_value()); | 1426 global_context()->set_out_of_memory(HEAP->true_value()); |
| 1423 } | 1427 } |
| 1424 | 1428 |
| 1425 | 1429 |
| 1426 } } // namespace v8::internal | 1430 } } // namespace v8::internal |
| 1427 | 1431 |
| 1428 #endif // V8_ISOLATE_H_ | 1432 #endif // V8_ISOLATE_H_ |
| OLD | NEW |