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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 function_entry_hook_ = function_entry_hook; | 1101 function_entry_hook_ = function_entry_hook; |
1102 } | 1102 } |
1103 | 1103 |
1104 void* stress_deopt_count_address() { return &stress_deopt_count_; } | 1104 void* stress_deopt_count_address() { return &stress_deopt_count_; } |
1105 | 1105 |
1106 inline RandomNumberGenerator* random_number_generator(); | 1106 inline RandomNumberGenerator* random_number_generator(); |
1107 | 1107 |
1108 // Given an address occupied by a live code object, return that object. | 1108 // Given an address occupied by a live code object, return that object. |
1109 Object* FindCodeObject(Address a); | 1109 Object* FindCodeObject(Address a); |
1110 | 1110 |
| 1111 int NextOptimizationId() { |
| 1112 int id = next_optimization_id_++; |
| 1113 if (!Smi::IsValid(next_optimization_id_)) { |
| 1114 next_optimization_id_ = 0; |
| 1115 } |
| 1116 return id; |
| 1117 } |
| 1118 |
1111 private: | 1119 private: |
1112 Isolate(); | 1120 Isolate(); |
1113 | 1121 |
1114 friend struct GlobalState; | 1122 friend struct GlobalState; |
1115 friend struct InitializeGlobalState; | 1123 friend struct InitializeGlobalState; |
1116 | 1124 |
1117 enum State { | 1125 enum State { |
1118 UNINITIALIZED, // Some components may not have been allocated. | 1126 UNINITIALIZED, // Some components may not have been allocated. |
1119 INITIALIZED // All components are fully initialized. | 1127 INITIALIZED // All components are fully initialized. |
1120 }; | 1128 }; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 SweeperThread** sweeper_thread_; | 1341 SweeperThread** sweeper_thread_; |
1334 int num_sweeper_threads_; | 1342 int num_sweeper_threads_; |
1335 | 1343 |
1336 // TODO(yangguo): This will become obsolete once ResourceConstraints | 1344 // TODO(yangguo): This will become obsolete once ResourceConstraints |
1337 // becomes an argument to Isolate constructor. | 1345 // becomes an argument to Isolate constructor. |
1338 int max_available_threads_; | 1346 int max_available_threads_; |
1339 | 1347 |
1340 // Counts deopt points if deopt_every_n_times is enabled. | 1348 // Counts deopt points if deopt_every_n_times is enabled. |
1341 unsigned int stress_deopt_count_; | 1349 unsigned int stress_deopt_count_; |
1342 | 1350 |
| 1351 int next_optimization_id_; |
| 1352 |
1343 friend class ExecutionAccess; | 1353 friend class ExecutionAccess; |
1344 friend class HandleScopeImplementer; | 1354 friend class HandleScopeImplementer; |
1345 friend class IsolateInitializer; | 1355 friend class IsolateInitializer; |
1346 friend class OptimizingCompilerThread; | 1356 friend class OptimizingCompilerThread; |
1347 friend class SweeperThread; | 1357 friend class SweeperThread; |
1348 friend class ThreadManager; | 1358 friend class ThreadManager; |
1349 friend class Simulator; | 1359 friend class Simulator; |
1350 friend class StackGuard; | 1360 friend class StackGuard; |
1351 friend class ThreadId; | 1361 friend class ThreadId; |
1352 friend class TestMemoryAllocatorScope; | 1362 friend class TestMemoryAllocatorScope; |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 } | 1554 } |
1545 | 1555 |
1546 EmbeddedVector<char, 128> filename_; | 1556 EmbeddedVector<char, 128> filename_; |
1547 FILE* file_; | 1557 FILE* file_; |
1548 int scope_depth_; | 1558 int scope_depth_; |
1549 }; | 1559 }; |
1550 | 1560 |
1551 } } // namespace v8::internal | 1561 } } // namespace v8::internal |
1552 | 1562 |
1553 #endif // V8_ISOLATE_H_ | 1563 #endif // V8_ISOLATE_H_ |
OLD | NEW |