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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 function_entry_hook_ = function_entry_hook; | 1141 function_entry_hook_ = function_entry_hook; |
1142 } | 1142 } |
1143 | 1143 |
1144 void* stress_deopt_count_address() { return &stress_deopt_count_; } | 1144 void* stress_deopt_count_address() { return &stress_deopt_count_; } |
1145 | 1145 |
1146 inline RandomNumberGenerator* random_number_generator(); | 1146 inline RandomNumberGenerator* random_number_generator(); |
1147 | 1147 |
1148 // Given an address occupied by a live code object, return that object. | 1148 // Given an address occupied by a live code object, return that object. |
1149 Object* FindCodeObject(Address a); | 1149 Object* FindCodeObject(Address a); |
1150 | 1150 |
| 1151 int NextOptimizationId() { |
| 1152 int id = next_optimization_id_++; |
| 1153 if (!Smi::IsValid(next_optimization_id_)) { |
| 1154 next_optimization_id_ = 0; |
| 1155 } |
| 1156 return id; |
| 1157 } |
| 1158 |
1151 private: | 1159 private: |
1152 Isolate(); | 1160 Isolate(); |
1153 | 1161 |
1154 friend struct GlobalState; | 1162 friend struct GlobalState; |
1155 friend struct InitializeGlobalState; | 1163 friend struct InitializeGlobalState; |
1156 | 1164 |
1157 enum State { | 1165 enum State { |
1158 UNINITIALIZED, // Some components may not have been allocated. | 1166 UNINITIALIZED, // Some components may not have been allocated. |
1159 INITIALIZED // All components are fully initialized. | 1167 INITIALIZED // All components are fully initialized. |
1160 }; | 1168 }; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 SweeperThread** sweeper_thread_; | 1379 SweeperThread** sweeper_thread_; |
1372 int num_sweeper_threads_; | 1380 int num_sweeper_threads_; |
1373 | 1381 |
1374 // TODO(yangguo): This will become obsolete once ResourceConstraints | 1382 // TODO(yangguo): This will become obsolete once ResourceConstraints |
1375 // becomes an argument to Isolate constructor. | 1383 // becomes an argument to Isolate constructor. |
1376 int max_available_threads_; | 1384 int max_available_threads_; |
1377 | 1385 |
1378 // Counts deopt points if deopt_every_n_times is enabled. | 1386 // Counts deopt points if deopt_every_n_times is enabled. |
1379 unsigned int stress_deopt_count_; | 1387 unsigned int stress_deopt_count_; |
1380 | 1388 |
| 1389 int next_optimization_id_; |
| 1390 |
1381 friend class ExecutionAccess; | 1391 friend class ExecutionAccess; |
1382 friend class HandleScopeImplementer; | 1392 friend class HandleScopeImplementer; |
1383 friend class IsolateInitializer; | 1393 friend class IsolateInitializer; |
1384 friend class OptimizingCompilerThread; | 1394 friend class OptimizingCompilerThread; |
1385 friend class SweeperThread; | 1395 friend class SweeperThread; |
1386 friend class ThreadManager; | 1396 friend class ThreadManager; |
1387 friend class Simulator; | 1397 friend class Simulator; |
1388 friend class StackGuard; | 1398 friend class StackGuard; |
1389 friend class ThreadId; | 1399 friend class ThreadId; |
1390 friend class TestMemoryAllocatorScope; | 1400 friend class TestMemoryAllocatorScope; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 } | 1585 } |
1576 | 1586 |
1577 EmbeddedVector<char, 128> filename_; | 1587 EmbeddedVector<char, 128> filename_; |
1578 FILE* file_; | 1588 FILE* file_; |
1579 int scope_depth_; | 1589 int scope_depth_; |
1580 }; | 1590 }; |
1581 | 1591 |
1582 } } // namespace v8::internal | 1592 } } // namespace v8::internal |
1583 | 1593 |
1584 #endif // V8_ISOLATE_H_ | 1594 #endif // V8_ISOLATE_H_ |
OLD | NEW |