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

Side by Side Diff: src/isolate.h

Issue 6759025: Version 3.2.6 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 8 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 | « src/ic.cc ('k') | src/isolate.cc » ('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 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // assembler.h, where it is defined, here. 86 // assembler.h, where it is defined, here.
87 typedef void* ExternalReferenceRedirectorPointer(); 87 typedef void* ExternalReferenceRedirectorPointer();
88 88
89 89
90 #ifdef ENABLE_DEBUGGER_SUPPORT 90 #ifdef ENABLE_DEBUGGER_SUPPORT
91 class Debug; 91 class Debug;
92 class Debugger; 92 class Debugger;
93 class DebuggerAgent; 93 class DebuggerAgent;
94 #endif 94 #endif
95 95
96 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) 96 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
97 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
97 class Redirection; 98 class Redirection;
98 class Simulator; 99 class Simulator;
99 #endif 100 #endif
100 101
102
101 // Static indirection table for handles to constants. If a frame 103 // Static indirection table for handles to constants. If a frame
102 // element represents a constant, the data contains an index into 104 // element represents a constant, the data contains an index into
103 // this table of handles to the actual constants. 105 // this table of handles to the actual constants.
104 // Static indirection table for handles to constants. If a Result 106 // Static indirection table for handles to constants. If a Result
105 // represents a constant, the data contains an index into this table 107 // represents a constant, the data contains an index into this table
106 // of handles to the actual constants. 108 // of handles to the actual constants.
107 typedef ZoneList<Handle<Object> > ZoneObjectList; 109 typedef ZoneList<Handle<Object> > ZoneObjectList;
108 110
109 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ 111 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \
110 if (isolate->has_scheduled_exception()) \ 112 if (isolate->has_scheduled_exception()) \
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 MaybeObject* scheduled_exception_; 190 MaybeObject* scheduled_exception_;
189 bool external_caught_exception_; 191 bool external_caught_exception_;
190 SaveContext* save_context_; 192 SaveContext* save_context_;
191 v8::TryCatch* catcher_; 193 v8::TryCatch* catcher_;
192 194
193 // Stack. 195 // Stack.
194 Address c_entry_fp_; // the frame pointer of the top c entry frame 196 Address c_entry_fp_; // the frame pointer of the top c entry frame
195 Address handler_; // try-blocks are chained through the stack 197 Address handler_; // try-blocks are chained through the stack
196 198
197 #ifdef USE_SIMULATOR 199 #ifdef USE_SIMULATOR
198 #ifdef V8_TARGET_ARCH_ARM 200 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
199 Simulator* simulator_; 201 Simulator* simulator_;
200 #elif V8_TARGET_ARCH_MIPS
201 assembler::mips::Simulator* simulator_;
202 #endif 202 #endif
203 #endif // USE_SIMULATOR 203 #endif // USE_SIMULATOR
204 204
205 #ifdef ENABLE_LOGGING_AND_PROFILING 205 #ifdef ENABLE_LOGGING_AND_PROFILING
206 Address js_entry_sp_; // the stack pointer of the bottom js entry frame 206 Address js_entry_sp_; // the stack pointer of the bottom js entry frame
207 Address external_callback_; // the external callback we're currently in 207 Address external_callback_; // the external callback we're currently in
208 #endif 208 #endif
209 209
210 #ifdef ENABLE_VMSTATE_TRACKING 210 #ifdef ENABLE_VMSTATE_TRACKING
211 StateTag current_vm_state_; 211 StateTag current_vm_state_;
212 #endif 212 #endif
213 213
214 // Generated code scratch locations. 214 // Generated code scratch locations.
215 int32_t formal_count_; 215 int32_t formal_count_;
216 216
217 // Call back function to report unsafe JS accesses. 217 // Call back function to report unsafe JS accesses.
218 v8::FailedAccessCheckCallback failed_access_check_callback_; 218 v8::FailedAccessCheckCallback failed_access_check_callback_;
219 219
220 private: 220 private:
221 Address try_catch_handler_address_; 221 Address try_catch_handler_address_;
222 }; 222 };
223 223
224 #if defined(V8_TARGET_ARCH_ARM) 224 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
225 225
226 #define ISOLATE_PLATFORM_INIT_LIST(V) \ 226 #define ISOLATE_PLATFORM_INIT_LIST(V) \
227 /* VirtualFrame::SpilledScope state */ \ 227 /* VirtualFrame::SpilledScope state */ \
228 V(bool, is_virtual_frame_in_spilled_scope, false) \ 228 V(bool, is_virtual_frame_in_spilled_scope, false) \
229 /* CodeGenerator::EmitNamedStore state */ \ 229 /* CodeGenerator::EmitNamedStore state */ \
230 V(int, inlined_write_barrier_size, -1) 230 V(int, inlined_write_barrier_size, -1)
231 231
232 #if !defined(__arm__) 232 #if !defined(__arm__) && !defined(__mips__)
233 class HashMap; 233 class HashMap;
234 #endif 234 #endif
235 235
236 #else 236 #else
237 237
238 #define ISOLATE_PLATFORM_INIT_LIST(V) 238 #define ISOLATE_PLATFORM_INIT_LIST(V)
239 239
240 #endif 240 #endif
241 241
242 #ifdef ENABLE_DEBUGGER_SUPPORT 242 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 typedef List<HeapObject*, PreallocatedStorage> DebugObjectCache; 285 typedef List<HeapObject*, PreallocatedStorage> DebugObjectCache;
286 286
287 #define ISOLATE_INIT_LIST(V) \ 287 #define ISOLATE_INIT_LIST(V) \
288 /* AssertNoZoneAllocation state. */ \ 288 /* AssertNoZoneAllocation state. */ \
289 V(bool, zone_allow_allocation, true) \ 289 V(bool, zone_allow_allocation, true) \
290 /* SerializerDeserializer state. */ \ 290 /* SerializerDeserializer state. */ \
291 V(int, serialize_partial_snapshot_cache_length, 0) \ 291 V(int, serialize_partial_snapshot_cache_length, 0) \
292 /* Assembler state. */ \ 292 /* Assembler state. */ \
293 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ 293 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \
294 V(byte*, assembler_spare_buffer, NULL) \ 294 V(byte*, assembler_spare_buffer, NULL) \
295 /*This static counter ensures that NativeAllocationCheckers can be nested.*/ \
296 V(int, allocation_disallowed, 0) \
297 V(FatalErrorCallback, exception_behavior, NULL) \ 295 V(FatalErrorCallback, exception_behavior, NULL) \
298 V(v8::Debug::MessageHandler, message_handler, NULL) \ 296 V(v8::Debug::MessageHandler, message_handler, NULL) \
299 /* To distinguish the function templates, so that we can find them in the */ \ 297 /* To distinguish the function templates, so that we can find them in the */ \
300 /* function cache of the global context. */ \ 298 /* function cache of the global context. */ \
301 V(int, next_serial_number, 0) \ 299 V(int, next_serial_number, 0) \
302 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \ 300 V(ExternalReferenceRedirectorPointer*, external_reference_redirector, NULL) \
303 V(bool, always_allow_natives_syntax, false) \ 301 V(bool, always_allow_natives_syntax, false) \
304 /* Part of the state of liveedit. */ \ 302 /* Part of the state of liveedit. */ \
305 V(FunctionInfoListener*, active_function_info_listener, NULL) \ 303 V(FunctionInfoListener*, active_function_info_listener, NULL) \
306 /* State for Relocatable. */ \ 304 /* State for Relocatable. */ \
(...skipping 27 matching lines...) Expand all
334 // A thread has a PerIsolateThreadData instance for each isolate that it has 332 // A thread has a PerIsolateThreadData instance for each isolate that it has
335 // entered. That instance is allocated when the isolate is initially entered 333 // entered. That instance is allocated when the isolate is initially entered
336 // and reused on subsequent entries. 334 // and reused on subsequent entries.
337 class PerIsolateThreadData { 335 class PerIsolateThreadData {
338 public: 336 public:
339 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) 337 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id)
340 : isolate_(isolate), 338 : isolate_(isolate),
341 thread_id_(thread_id), 339 thread_id_(thread_id),
342 stack_limit_(0), 340 stack_limit_(0),
343 thread_state_(NULL), 341 thread_state_(NULL),
344 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) 342 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
343 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
345 simulator_(NULL), 344 simulator_(NULL),
346 #endif 345 #endif
347 next_(NULL), 346 next_(NULL),
348 prev_(NULL) { } 347 prev_(NULL) { }
349 Isolate* isolate() const { return isolate_; } 348 Isolate* isolate() const { return isolate_; }
350 ThreadId thread_id() const { return thread_id_; } 349 ThreadId thread_id() const { return thread_id_; }
351 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } 350 void set_stack_limit(uintptr_t value) { stack_limit_ = value; }
352 uintptr_t stack_limit() const { return stack_limit_; } 351 uintptr_t stack_limit() const { return stack_limit_; }
353 ThreadState* thread_state() const { return thread_state_; } 352 ThreadState* thread_state() const { return thread_state_; }
354 void set_thread_state(ThreadState* value) { thread_state_ = value; } 353 void set_thread_state(ThreadState* value) { thread_state_ = value; }
355 354
356 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) 355 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
356 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
357 Simulator* simulator() const { return simulator_; } 357 Simulator* simulator() const { return simulator_; }
358 void set_simulator(Simulator* simulator) { 358 void set_simulator(Simulator* simulator) {
359 simulator_ = simulator; 359 simulator_ = simulator;
360 } 360 }
361 #endif 361 #endif
362 362
363 bool Matches(Isolate* isolate, ThreadId thread_id) const { 363 bool Matches(Isolate* isolate, ThreadId thread_id) const {
364 return isolate_ == isolate && thread_id_ == thread_id; 364 return isolate_ == isolate && thread_id_ == thread_id;
365 } 365 }
366 366
367 private: 367 private:
368 Isolate* isolate_; 368 Isolate* isolate_;
369 ThreadId thread_id_; 369 ThreadId thread_id_;
370 uintptr_t stack_limit_; 370 uintptr_t stack_limit_;
371 ThreadState* thread_state_; 371 ThreadState* thread_state_;
372 372
373 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) 373 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
374 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
374 Simulator* simulator_; 375 Simulator* simulator_;
375 #endif 376 #endif
376 377
377 PerIsolateThreadData* next_; 378 PerIsolateThreadData* next_;
378 PerIsolateThreadData* prev_; 379 PerIsolateThreadData* prev_;
379 380
380 friend class Isolate; 381 friend class Isolate;
381 friend class ThreadDataTable; 382 friend class ThreadDataTable;
382 friend class EntryStackItem; 383 friend class EntryStackItem;
383 384
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 #ifdef DEBUG 848 #ifdef DEBUG
848 HistogramInfo* heap_histograms() { return heap_histograms_; } 849 HistogramInfo* heap_histograms() { return heap_histograms_; }
849 850
850 JSObject::SpillInformation* js_spill_information() { 851 JSObject::SpillInformation* js_spill_information() {
851 return &js_spill_information_; 852 return &js_spill_information_;
852 } 853 }
853 854
854 int* code_kind_statistics() { return code_kind_statistics_; } 855 int* code_kind_statistics() { return code_kind_statistics_; }
855 #endif 856 #endif
856 857
857 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) 858 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
859 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
858 bool simulator_initialized() { return simulator_initialized_; } 860 bool simulator_initialized() { return simulator_initialized_; }
859 void set_simulator_initialized(bool initialized) { 861 void set_simulator_initialized(bool initialized) {
860 simulator_initialized_ = initialized; 862 simulator_initialized_ = initialized;
861 } 863 }
862 864
863 HashMap* simulator_i_cache() { return simulator_i_cache_; } 865 HashMap* simulator_i_cache() { return simulator_i_cache_; }
864 void set_simulator_i_cache(HashMap* hash_map) { 866 void set_simulator_i_cache(HashMap* hash_map) {
865 simulator_i_cache_ = hash_map; 867 simulator_i_cache_ = hash_map;
866 } 868 }
867 869
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 StringInputBuffer objects_string_compare_buffer_a_; 1071 StringInputBuffer objects_string_compare_buffer_a_;
1070 StringInputBuffer objects_string_compare_buffer_b_; 1072 StringInputBuffer objects_string_compare_buffer_b_;
1071 StaticResource<StringInputBuffer> objects_string_input_buffer_; 1073 StaticResource<StringInputBuffer> objects_string_input_buffer_;
1072 unibrow::Mapping<unibrow::Ecma262Canonicalize> 1074 unibrow::Mapping<unibrow::Ecma262Canonicalize>
1073 regexp_macro_assembler_canonicalize_; 1075 regexp_macro_assembler_canonicalize_;
1074 RegExpStack* regexp_stack_; 1076 RegExpStack* regexp_stack_;
1075 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; 1077 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
1076 ZoneObjectList frame_element_constant_list_; 1078 ZoneObjectList frame_element_constant_list_;
1077 ZoneObjectList result_constant_list_; 1079 ZoneObjectList result_constant_list_;
1078 1080
1079 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) 1081 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
1082 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
1080 bool simulator_initialized_; 1083 bool simulator_initialized_;
1081 HashMap* simulator_i_cache_; 1084 HashMap* simulator_i_cache_;
1082 Redirection* simulator_redirection_; 1085 Redirection* simulator_redirection_;
1083 #endif 1086 #endif
1084 1087
1085 #ifdef DEBUG 1088 #ifdef DEBUG
1086 // A static array of histogram info for each type. 1089 // A static array of histogram info for each type.
1087 HistogramInfo heap_histograms_[LAST_TYPE + 1]; 1090 HistogramInfo heap_histograms_[LAST_TYPE + 1];
1088 JSObject::SpillInformation js_spill_information_; 1091 JSObject::SpillInformation js_spill_information_;
1089 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; 1092 int code_kind_statistics_[Code::NUMBER_OF_KINDS];
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 1299
1297 } } // namespace v8::internal 1300 } } // namespace v8::internal
1298 1301
1299 // TODO(isolates): Get rid of these -inl.h includes and place them only where 1302 // TODO(isolates): Get rid of these -inl.h includes and place them only where
1300 // they're needed. 1303 // they're needed.
1301 #include "allocation-inl.h" 1304 #include "allocation-inl.h"
1302 #include "zone-inl.h" 1305 #include "zone-inl.h"
1303 #include "frames-inl.h" 1306 #include "frames-inl.h"
1304 1307
1305 #endif // V8_ISOLATE_H_ 1308 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698