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

Side by Side Diff: src/isolate.h

Issue 18037002: Clean up the usage of V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch} (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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/ia32/stub-cache-ia32.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 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // assembler.h, where it is defined, here. 94 // assembler.h, where it is defined, here.
95 typedef void* ExternalReferenceRedirectorPointer(); 95 typedef void* ExternalReferenceRedirectorPointer();
96 96
97 97
98 #ifdef ENABLE_DEBUGGER_SUPPORT 98 #ifdef ENABLE_DEBUGGER_SUPPORT
99 class Debug; 99 class Debug;
100 class Debugger; 100 class Debugger;
101 class DebuggerAgent; 101 class DebuggerAgent;
102 #endif 102 #endif
103 103
104 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ 104 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
105 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) 105 !defined(__mips__) && V8_TARGET_ARCH_MIPS
106 class Redirection; 106 class Redirection;
107 class Simulator; 107 class Simulator;
108 #endif 108 #endif
109 109
110 110
111 // Static indirection table for handles to constants. If a frame 111 // Static indirection table for handles to constants. If a frame
112 // element represents a constant, the data contains an index into 112 // element represents a constant, the data contains an index into
113 // this table of handles to the actual constants. 113 // this table of handles to the actual constants.
114 // Static indirection table for handles to constants. If a Result 114 // Static indirection table for handles to constants. If a Result
115 // represents a constant, the data contains an index into this table 115 // represents a constant, the data contains an index into this table
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 MaybeObject* scheduled_exception_; 256 MaybeObject* scheduled_exception_;
257 bool external_caught_exception_; 257 bool external_caught_exception_;
258 SaveContext* save_context_; 258 SaveContext* save_context_;
259 v8::TryCatch* catcher_; 259 v8::TryCatch* catcher_;
260 260
261 // Stack. 261 // Stack.
262 Address c_entry_fp_; // the frame pointer of the top c entry frame 262 Address c_entry_fp_; // the frame pointer of the top c entry frame
263 Address handler_; // try-blocks are chained through the stack 263 Address handler_; // try-blocks are chained through the stack
264 264
265 #ifdef USE_SIMULATOR 265 #ifdef USE_SIMULATOR
266 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) 266 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
267 Simulator* simulator_; 267 Simulator* simulator_;
268 #endif 268 #endif
269 #endif // USE_SIMULATOR 269 #endif // USE_SIMULATOR
270 270
271 Address js_entry_sp_; // the stack pointer of the bottom JS entry frame 271 Address js_entry_sp_; // the stack pointer of the bottom JS entry frame
272 Address external_callback_; // the external callback we're currently in 272 Address external_callback_; // the external callback we're currently in
273 StateTag current_vm_state_; 273 StateTag current_vm_state_;
274 274
275 // Generated code scratch locations. 275 // Generated code scratch locations.
276 int32_t formal_count_; 276 int32_t formal_count_;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // A thread has a PerIsolateThreadData instance for each isolate that it has 384 // A thread has a PerIsolateThreadData instance for each isolate that it has
385 // entered. That instance is allocated when the isolate is initially entered 385 // entered. That instance is allocated when the isolate is initially entered
386 // and reused on subsequent entries. 386 // and reused on subsequent entries.
387 class PerIsolateThreadData { 387 class PerIsolateThreadData {
388 public: 388 public:
389 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id) 389 PerIsolateThreadData(Isolate* isolate, ThreadId thread_id)
390 : isolate_(isolate), 390 : isolate_(isolate),
391 thread_id_(thread_id), 391 thread_id_(thread_id),
392 stack_limit_(0), 392 stack_limit_(0),
393 thread_state_(NULL), 393 thread_state_(NULL),
394 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ 394 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
395 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) 395 !defined(__mips__) && V8_TARGET_ARCH_MIPS
396 simulator_(NULL), 396 simulator_(NULL),
397 #endif 397 #endif
398 next_(NULL), 398 next_(NULL),
399 prev_(NULL) { } 399 prev_(NULL) { }
400 Isolate* isolate() const { return isolate_; } 400 Isolate* isolate() const { return isolate_; }
401 ThreadId thread_id() const { return thread_id_; } 401 ThreadId thread_id() const { return thread_id_; }
402 void set_stack_limit(uintptr_t value) { stack_limit_ = value; } 402 void set_stack_limit(uintptr_t value) { stack_limit_ = value; }
403 uintptr_t stack_limit() const { return stack_limit_; } 403 uintptr_t stack_limit() const { return stack_limit_; }
404 ThreadState* thread_state() const { return thread_state_; } 404 ThreadState* thread_state() const { return thread_state_; }
405 void set_thread_state(ThreadState* value) { thread_state_ = value; } 405 void set_thread_state(ThreadState* value) { thread_state_ = value; }
406 406
407 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ 407 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
408 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) 408 !defined(__mips__) && V8_TARGET_ARCH_MIPS
409 Simulator* simulator() const { return simulator_; } 409 Simulator* simulator() const { return simulator_; }
410 void set_simulator(Simulator* simulator) { 410 void set_simulator(Simulator* simulator) {
411 simulator_ = simulator; 411 simulator_ = simulator;
412 } 412 }
413 #endif 413 #endif
414 414
415 bool Matches(Isolate* isolate, ThreadId thread_id) const { 415 bool Matches(Isolate* isolate, ThreadId thread_id) const {
416 return isolate_ == isolate && thread_id_.Equals(thread_id); 416 return isolate_ == isolate && thread_id_.Equals(thread_id);
417 } 417 }
418 418
419 private: 419 private:
420 Isolate* isolate_; 420 Isolate* isolate_;
421 ThreadId thread_id_; 421 ThreadId thread_id_;
422 uintptr_t stack_limit_; 422 uintptr_t stack_limit_;
423 ThreadState* thread_state_; 423 ThreadState* thread_state_;
424 424
425 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \ 425 #if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
426 !defined(__mips__) && defined(V8_TARGET_ARCH_MIPS) 426 !defined(__mips__) && V8_TARGET_ARCH_MIPS
427 Simulator* simulator_; 427 Simulator* simulator_;
428 #endif 428 #endif
429 429
430 PerIsolateThreadData* next_; 430 PerIsolateThreadData* next_;
431 PerIsolateThreadData* prev_; 431 PerIsolateThreadData* prev_;
432 432
433 friend class Isolate; 433 friend class Isolate;
434 friend class ThreadDataTable; 434 friend class ThreadDataTable;
435 friend class EntryStackItem; 435 friend class EntryStackItem;
436 436
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 #ifdef DEBUG 987 #ifdef DEBUG
988 HistogramInfo* heap_histograms() { return heap_histograms_; } 988 HistogramInfo* heap_histograms() { return heap_histograms_; }
989 989
990 JSObject::SpillInformation* js_spill_information() { 990 JSObject::SpillInformation* js_spill_information() {
991 return &js_spill_information_; 991 return &js_spill_information_;
992 } 992 }
993 993
994 int* code_kind_statistics() { return code_kind_statistics_; } 994 int* code_kind_statistics() { return code_kind_statistics_; }
995 #endif 995 #endif
996 996
997 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ 997 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
998 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) 998 V8_TARGET_ARCH_MIPS && !defined(__mips__)
999 bool simulator_initialized() { return simulator_initialized_; } 999 bool simulator_initialized() { return simulator_initialized_; }
1000 void set_simulator_initialized(bool initialized) { 1000 void set_simulator_initialized(bool initialized) {
1001 simulator_initialized_ = initialized; 1001 simulator_initialized_ = initialized;
1002 } 1002 }
1003 1003
1004 HashMap* simulator_i_cache() { return simulator_i_cache_; } 1004 HashMap* simulator_i_cache() { return simulator_i_cache_; }
1005 void set_simulator_i_cache(HashMap* hash_map) { 1005 void set_simulator_i_cache(HashMap* hash_map) {
1006 simulator_i_cache_ = hash_map; 1006 simulator_i_cache_ = hash_map;
1007 } 1007 }
1008 1008
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; 1284 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
1285 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; 1285 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_;
1286 1286
1287 // The garbage collector should be a little more aggressive when it knows 1287 // The garbage collector should be a little more aggressive when it knows
1288 // that a context was recently exited. 1288 // that a context was recently exited.
1289 bool context_exit_happened_; 1289 bool context_exit_happened_;
1290 1290
1291 // Time stamp at initialization. 1291 // Time stamp at initialization.
1292 double time_millis_at_init_; 1292 double time_millis_at_init_;
1293 1293
1294 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ 1294 #if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
1295 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) 1295 V8_TARGET_ARCH_MIPS && !defined(__mips__)
1296 bool simulator_initialized_; 1296 bool simulator_initialized_;
1297 HashMap* simulator_i_cache_; 1297 HashMap* simulator_i_cache_;
1298 Redirection* simulator_redirection_; 1298 Redirection* simulator_redirection_;
1299 #endif 1299 #endif
1300 1300
1301 #ifdef DEBUG 1301 #ifdef DEBUG
1302 // A static array of histogram info for each type. 1302 // A static array of histogram info for each type.
1303 HistogramInfo heap_histograms_[LAST_TYPE + 1]; 1303 HistogramInfo heap_histograms_[LAST_TYPE + 1];
1304 JSObject::SpillInformation js_spill_information_; 1304 JSObject::SpillInformation js_spill_information_;
1305 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; 1305 int code_kind_statistics_[Code::NUMBER_OF_KINDS];
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 1487
1488 // Mark the native context with out of memory. 1488 // Mark the native context with out of memory.
1489 inline void Context::mark_out_of_memory() { 1489 inline void Context::mark_out_of_memory() {
1490 native_context()->set_out_of_memory(HEAP->true_value()); 1490 native_context()->set_out_of_memory(HEAP->true_value());
1491 } 1491 }
1492 1492
1493 1493
1494 } } // namespace v8::internal 1494 } } // namespace v8::internal
1495 1495
1496 #endif // V8_ISOLATE_H_ 1496 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698