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

Side by Side Diff: src/isolate.h

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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/ic.h ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ISOLATE_H_ 5 #ifndef V8_ISOLATE_H_
6 #define V8_ISOLATE_H_ 6 #define V8_ISOLATE_H_
7 7
8 #include "include/v8-debug.h" 8 #include "include/v8-debug.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 Map* get_initial_js_array_map(ElementsKind kind); 1030 Map* get_initial_js_array_map(ElementsKind kind);
1031 1031
1032 bool IsFastArrayConstructorPrototypeChainIntact(); 1032 bool IsFastArrayConstructorPrototypeChainIntact();
1033 1033
1034 CallInterfaceDescriptorData* call_descriptor_data(int index); 1034 CallInterfaceDescriptorData* call_descriptor_data(int index);
1035 1035
1036 void IterateDeferredHandles(ObjectVisitor* visitor); 1036 void IterateDeferredHandles(ObjectVisitor* visitor);
1037 void LinkDeferredHandles(DeferredHandles* deferred_handles); 1037 void LinkDeferredHandles(DeferredHandles* deferred_handles);
1038 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); 1038 void UnlinkDeferredHandles(DeferredHandles* deferred_handles);
1039 1039
1040 #ifdef DEBUG 1040 #if DCHECK_IS_ON
1041 bool IsDeferredHandle(Object** location); 1041 bool IsDeferredHandle(Object** location);
1042 #endif // DEBUG 1042 #endif // DCHECK_IS_ON
1043 1043
1044 bool concurrent_recompilation_enabled() { 1044 bool concurrent_recompilation_enabled() {
1045 // Thread is only available with flag enabled. 1045 // Thread is only available with flag enabled.
1046 DCHECK(optimizing_compiler_thread_ == NULL || 1046 DCHECK(optimizing_compiler_thread_ == NULL ||
1047 FLAG_concurrent_recompilation); 1047 FLAG_concurrent_recompilation);
1048 return optimizing_compiler_thread_ != NULL; 1048 return optimizing_compiler_thread_ != NULL;
1049 } 1049 }
1050 1050
1051 bool concurrent_osr_enabled() const { 1051 bool concurrent_osr_enabled() const {
1052 // Thread is only available with flag enabled. 1052 // Thread is only available with flag enabled.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 static base::LazyMutex thread_data_table_mutex_; 1172 static base::LazyMutex thread_data_table_mutex_;
1173 1173
1174 static base::Thread::LocalStorageKey per_isolate_thread_data_key_; 1174 static base::Thread::LocalStorageKey per_isolate_thread_data_key_;
1175 static base::Thread::LocalStorageKey isolate_key_; 1175 static base::Thread::LocalStorageKey isolate_key_;
1176 static base::Thread::LocalStorageKey thread_id_key_; 1176 static base::Thread::LocalStorageKey thread_id_key_;
1177 static ThreadDataTable* thread_data_table_; 1177 static ThreadDataTable* thread_data_table_;
1178 1178
1179 // A global counter for all generated Isolates, might overflow. 1179 // A global counter for all generated Isolates, might overflow.
1180 static base::Atomic32 isolate_counter_; 1180 static base::Atomic32 isolate_counter_;
1181 1181
1182 #if DEBUG 1182 #if DCHECK_IS_ON
1183 static base::Atomic32 isolate_key_created_; 1183 static base::Atomic32 isolate_key_created_;
1184 #endif 1184 #endif
1185 1185
1186 void Deinit(); 1186 void Deinit();
1187 1187
1188 static void SetIsolateThreadLocals(Isolate* isolate, 1188 static void SetIsolateThreadLocals(Isolate* isolate,
1189 PerIsolateThreadData* data); 1189 PerIsolateThreadData* data);
1190 1190
1191 // Find the PerThread for this particular (isolate, thread) combination. 1191 // Find the PerThread for this particular (isolate, thread) combination.
1192 // If one does not yet exist, allocate a new one. 1192 // If one does not yet exist, allocate a new one.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \ 1296 #define GLOBAL_BACKING_STORE(type, name, initialvalue) \
1297 type name##_; 1297 type name##_;
1298 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE) 1298 ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE)
1299 #undef GLOBAL_BACKING_STORE 1299 #undef GLOBAL_BACKING_STORE
1300 1300
1301 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \ 1301 #define GLOBAL_ARRAY_BACKING_STORE(type, name, length) \
1302 type name##_[length]; 1302 type name##_[length];
1303 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE) 1303 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_BACKING_STORE)
1304 #undef GLOBAL_ARRAY_BACKING_STORE 1304 #undef GLOBAL_ARRAY_BACKING_STORE
1305 1305
1306 #ifdef DEBUG 1306 #if DCHECK_IS_ON
1307 // This class is huge and has a number of fields controlled by 1307 // This class is huge and has a number of fields controlled by
1308 // preprocessor defines. Make sure the offsets of these fields agree 1308 // preprocessor defines. Make sure the offsets of these fields agree
1309 // between compilation units. 1309 // between compilation units.
1310 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1310 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1311 static const intptr_t name##_debug_offset_; 1311 static const intptr_t name##_debug_offset_;
1312 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1312 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1313 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1313 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1314 #undef ISOLATE_FIELD_OFFSET 1314 #undef ISOLATE_FIELD_OFFSET
1315 #endif 1315 #endif
1316 1316
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 1393
1394 private: 1394 private:
1395 Isolate* isolate_; 1395 Isolate* isolate_;
1396 Handle<Context> context_; 1396 Handle<Context> context_;
1397 SaveContext* prev_; 1397 SaveContext* prev_;
1398 Address c_entry_fp_; 1398 Address c_entry_fp_;
1399 }; 1399 };
1400 1400
1401 1401
1402 class AssertNoContextChange BASE_EMBEDDED { 1402 class AssertNoContextChange BASE_EMBEDDED {
1403 #ifdef DEBUG 1403 #if DCHECK_IS_ON
1404 public: 1404 public:
1405 explicit AssertNoContextChange(Isolate* isolate) 1405 explicit AssertNoContextChange(Isolate* isolate)
1406 : isolate_(isolate), 1406 : isolate_(isolate),
1407 context_(isolate->context(), isolate) { } 1407 context_(isolate->context(), isolate) { }
1408 ~AssertNoContextChange() { 1408 ~AssertNoContextChange() {
1409 DCHECK(isolate_->context() == *context_); 1409 DCHECK(isolate_->context() == *context_);
1410 } 1410 }
1411 1411
1412 private: 1412 private:
1413 Isolate* isolate_; 1413 Isolate* isolate_;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 } 1553 }
1554 1554
1555 EmbeddedVector<char, 128> filename_; 1555 EmbeddedVector<char, 128> filename_;
1556 FILE* file_; 1556 FILE* file_;
1557 int scope_depth_; 1557 int scope_depth_;
1558 }; 1558 };
1559 1559
1560 } } // namespace v8::internal 1560 } } // namespace v8::internal
1561 1561
1562 #endif // V8_ISOLATE_H_ 1562 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698