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

Side by Side Diff: src/isolate.h

Issue 16578008: Improved function entry hook coverage (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@post_fix
Patch Set: Fix Windows X64 compile warnings." 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
« 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 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 Address get_address_from_id(AddressId id); 540 Address get_address_from_id(AddressId id);
541 541
542 // Access to top context (where the current function object was created). 542 // Access to top context (where the current function object was created).
543 Context* context() { return thread_local_top_.context_; } 543 Context* context() { return thread_local_top_.context_; }
544 void set_context(Context* context) { 544 void set_context(Context* context) {
545 ASSERT(context == NULL || context->IsContext()); 545 ASSERT(context == NULL || context->IsContext());
546 thread_local_top_.context_ = context; 546 thread_local_top_.context_ = context;
547 } 547 }
548 Context** context_address() { return &thread_local_top_.context_; } 548 Context** context_address() { return &thread_local_top_.context_; }
549 549
550 SaveContext* save_context() {return thread_local_top_.save_context_; } 550 SaveContext* save_context() { return thread_local_top_.save_context_; }
551 void set_save_context(SaveContext* save) { 551 void set_save_context(SaveContext* save) {
552 thread_local_top_.save_context_ = save; 552 thread_local_top_.save_context_ = save;
553 } 553 }
554 554
555 // Access to current thread id. 555 // Access to current thread id.
556 ThreadId thread_id() { return thread_local_top_.thread_id_; } 556 ThreadId thread_id() { return thread_local_top_.thread_id_; }
557 void set_thread_id(ThreadId id) { thread_local_top_.thread_id_ = id; } 557 void set_thread_id(ThreadId id) { thread_local_top_.thread_id_ = id; }
558 558
559 // Interface to pending exception. 559 // Interface to pending exception.
560 MaybeObject* pending_exception() { 560 MaybeObject* pending_exception() {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 thread_local_top_.top_lookup_result_ = top; 1043 thread_local_top_.top_lookup_result_ = top;
1044 } 1044 }
1045 1045
1046 bool context_exit_happened() { 1046 bool context_exit_happened() {
1047 return context_exit_happened_; 1047 return context_exit_happened_;
1048 } 1048 }
1049 void set_context_exit_happened(bool context_exit_happened) { 1049 void set_context_exit_happened(bool context_exit_happened) {
1050 context_exit_happened_ = context_exit_happened; 1050 context_exit_happened_ = context_exit_happened;
1051 } 1051 }
1052 1052
1053 bool initialized_from_snapshot() { return initialized_from_snapshot_; }
1054
1053 double time_millis_since_init() { 1055 double time_millis_since_init() {
1054 return OS::TimeCurrentMillis() - time_millis_at_init_; 1056 return OS::TimeCurrentMillis() - time_millis_at_init_;
1055 } 1057 }
1056 1058
1057 DateCache* date_cache() { 1059 DateCache* date_cache() {
1058 return date_cache_; 1060 return date_cache_;
1059 } 1061 }
1060 1062
1061 void set_date_cache(DateCache* date_cache) { 1063 void set_date_cache(DateCache* date_cache) {
1062 if (date_cache != date_cache_) { 1064 if (date_cache != date_cache_) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 } 1104 }
1103 void set_callback_table(CallbackTable* callback_table) { 1105 void set_callback_table(CallbackTable* callback_table) {
1104 callback_table_ = callback_table; 1106 callback_table_ = callback_table;
1105 } 1107 }
1106 1108
1107 int id() const { return static_cast<int>(id_); } 1109 int id() const { return static_cast<int>(id_); }
1108 1110
1109 HStatistics* GetHStatistics(); 1111 HStatistics* GetHStatistics();
1110 HTracer* GetHTracer(); 1112 HTracer* GetHTracer();
1111 1113
1114 FunctionEntryHook function_entry_hook() { return function_entry_hook_; }
1115 void set_function_entry_hook(FunctionEntryHook function_entry_hook) {
1116 function_entry_hook_ = function_entry_hook;
1117 }
1118
1112 private: 1119 private:
1113 Isolate(); 1120 Isolate();
1114 1121
1115 friend struct GlobalState; 1122 friend struct GlobalState;
1116 friend struct InitializeGlobalState; 1123 friend struct InitializeGlobalState;
1117 1124
1118 enum State { 1125 enum State {
1119 UNINITIALIZED, // Some components may not have been allocated. 1126 UNINITIALIZED, // Some components may not have been allocated.
1120 INITIALIZED // All components are fully initialized. 1127 INITIALIZED // All components are fully initialized.
1121 }; 1128 };
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 regexp_macro_assembler_canonicalize_; 1288 regexp_macro_assembler_canonicalize_;
1282 RegExpStack* regexp_stack_; 1289 RegExpStack* regexp_stack_;
1283 DateCache* date_cache_; 1290 DateCache* date_cache_;
1284 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; 1291 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
1285 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; 1292 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_;
1286 1293
1287 // The garbage collector should be a little more aggressive when it knows 1294 // The garbage collector should be a little more aggressive when it knows
1288 // that a context was recently exited. 1295 // that a context was recently exited.
1289 bool context_exit_happened_; 1296 bool context_exit_happened_;
1290 1297
1298 // True if this isolate was initialized from a snapshot.
1299 bool initialized_from_snapshot_;
1300
1291 // Time stamp at initialization. 1301 // Time stamp at initialization.
1292 double time_millis_at_init_; 1302 double time_millis_at_init_;
1293 1303
1294 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ 1304 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
1295 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) 1305 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
1296 bool simulator_initialized_; 1306 bool simulator_initialized_;
1297 HashMap* simulator_i_cache_; 1307 HashMap* simulator_i_cache_;
1298 Redirection* simulator_redirection_; 1308 Redirection* simulator_redirection_;
1299 #endif 1309 #endif
1300 1310
1301 #ifdef DEBUG 1311 #ifdef DEBUG
1302 // A static array of histogram info for each type. 1312 // A static array of histogram info for each type.
1303 HistogramInfo heap_histograms_[LAST_TYPE + 1]; 1313 HistogramInfo heap_histograms_[LAST_TYPE + 1];
1304 JSObject::SpillInformation js_spill_information_; 1314 JSObject::SpillInformation js_spill_information_;
1305 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; 1315 int code_kind_statistics_[Code::NUMBER_OF_KINDS];
1306 #endif 1316 #endif
1307 1317
1308 #ifdef ENABLE_DEBUGGER_SUPPORT 1318 #ifdef ENABLE_DEBUGGER_SUPPORT
1309 Debugger* debugger_; 1319 Debugger* debugger_;
1310 Debug* debug_; 1320 Debug* debug_;
1311 #endif 1321 #endif
1312 CpuProfiler* cpu_profiler_; 1322 CpuProfiler* cpu_profiler_;
1313 HeapProfiler* heap_profiler_; 1323 HeapProfiler* heap_profiler_;
1324 FunctionEntryHook function_entry_hook_;
1314 1325
1315 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \ 1326 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \
1316 type name##_; 1327 type name##_;
1317 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE) 1328 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE)
1318 #undef GLOBAL_BACKING_STORE 1329 #undef GLOBAL_BACKING_STORE
1319 1330
1320 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \ 1331 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \
1321 type name##_[length]; 1332 type name##_[length];
1322 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE) 1333 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE)
1323 #undef GLOBAL_ARRAY_BACKING_STORE 1334 #undef GLOBAL_ARRAY_BACKING_STORE
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 1498
1488 // Mark the native context with out of memory. 1499 // Mark the native context with out of memory.
1489 inline void Context::mark_out_of_memory() { 1500 inline void Context::mark_out_of_memory() {
1490 native_context()->set_out_of_memory(HEAP->true_value()); 1501 native_context()->set_out_of_memory(HEAP->true_value());
1491 } 1502 }
1492 1503
1493 1504
1494 } } // namespace v8::internal 1505 } } // namespace v8::internal
1495 1506
1496 #endif // V8_ISOLATE_H_ 1507 #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