| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 // in JS or not. | 987 // in JS or not. |
| 988 ASSERT((current_state == JS) == (state == JS)); | 988 ASSERT((current_state == JS) == (state == JS)); |
| 989 } | 989 } |
| 990 } | 990 } |
| 991 thread_local_top_.current_vm_state_ = state; | 991 thread_local_top_.current_vm_state_ = state; |
| 992 } | 992 } |
| 993 #endif | 993 #endif |
| 994 | 994 |
| 995 void ResetEagerOptimizingData(); | 995 void ResetEagerOptimizingData(); |
| 996 | 996 |
| 997 bool ShouldFlattenString() { |
| 998 if (--flatten_counter_ != 0) { |
| 999 return false; |
| 1000 } |
| 1001 flatten_counter_ = kStringFlattenInterval; |
| 1002 return true; |
| 1003 } |
| 1004 |
| 997 private: | 1005 private: |
| 998 Isolate(); | 1006 Isolate(); |
| 999 | 1007 |
| 1000 // The per-process lock should be acquired before the ThreadDataTable is | 1008 // The per-process lock should be acquired before the ThreadDataTable is |
| 1001 // modified. | 1009 // modified. |
| 1002 class ThreadDataTable { | 1010 class ThreadDataTable { |
| 1003 public: | 1011 public: |
| 1004 ThreadDataTable(); | 1012 ThreadDataTable(); |
| 1005 ~ThreadDataTable(); | 1013 ~ThreadDataTable(); |
| 1006 | 1014 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 StringInputBuffer objects_string_compare_buffer_a_; | 1158 StringInputBuffer objects_string_compare_buffer_a_; |
| 1151 StringInputBuffer objects_string_compare_buffer_b_; | 1159 StringInputBuffer objects_string_compare_buffer_b_; |
| 1152 StaticResource<StringInputBuffer> objects_string_input_buffer_; | 1160 StaticResource<StringInputBuffer> objects_string_input_buffer_; |
| 1153 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1161 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1154 regexp_macro_assembler_canonicalize_; | 1162 regexp_macro_assembler_canonicalize_; |
| 1155 RegExpStack* regexp_stack_; | 1163 RegExpStack* regexp_stack_; |
| 1156 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1164 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1157 ZoneObjectList frame_element_constant_list_; | 1165 ZoneObjectList frame_element_constant_list_; |
| 1158 ZoneObjectList result_constant_list_; | 1166 ZoneObjectList result_constant_list_; |
| 1159 | 1167 |
| 1168 static const int kStringFlattenInterval = 257; |
| 1169 int flatten_counter_; |
| 1170 |
| 1160 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ | 1171 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ |
| 1161 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) | 1172 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) |
| 1162 bool simulator_initialized_; | 1173 bool simulator_initialized_; |
| 1163 HashMap* simulator_i_cache_; | 1174 HashMap* simulator_i_cache_; |
| 1164 Redirection* simulator_redirection_; | 1175 Redirection* simulator_redirection_; |
| 1165 #endif | 1176 #endif |
| 1166 | 1177 |
| 1167 #ifdef DEBUG | 1178 #ifdef DEBUG |
| 1168 // A static array of histogram info for each type. | 1179 // A static array of histogram info for each type. |
| 1169 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1180 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 | 1394 |
| 1384 } } // namespace v8::internal | 1395 } } // namespace v8::internal |
| 1385 | 1396 |
| 1386 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1397 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
| 1387 // they're needed. | 1398 // they're needed. |
| 1388 #include "allocation-inl.h" | 1399 #include "allocation-inl.h" |
| 1389 #include "zone-inl.h" | 1400 #include "zone-inl.h" |
| 1390 #include "frames-inl.h" | 1401 #include "frames-inl.h" |
| 1391 | 1402 |
| 1392 #endif // V8_ISOLATE_H_ | 1403 #endif // V8_ISOLATE_H_ |
| OLD | NEW |