| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ | 73 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ |
| 74 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ | 74 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ |
| 75 V(Map, meta_map, MetaMap) \ | 75 V(Map, meta_map, MetaMap) \ |
| 76 V(Map, hash_table_map, HashTableMap) \ | 76 V(Map, hash_table_map, HashTableMap) \ |
| 77 V(Smi, stack_limit, StackLimit) \ | 77 V(Smi, stack_limit, StackLimit) \ |
| 78 V(FixedArray, number_string_cache, NumberStringCache) \ | 78 V(FixedArray, number_string_cache, NumberStringCache) \ |
| 79 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ | 79 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ |
| 80 V(Object, instanceof_cache_map, InstanceofCacheMap) \ | 80 V(Object, instanceof_cache_map, InstanceofCacheMap) \ |
| 81 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ | 81 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ |
| 82 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ | 82 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ |
| 83 V(FixedArray, string_split_cache, StringSplitCache) \ |
| 83 V(Object, termination_exception, TerminationException) \ | 84 V(Object, termination_exception, TerminationException) \ |
| 84 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ | 85 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ |
| 85 V(ByteArray, empty_byte_array, EmptyByteArray) \ | 86 V(ByteArray, empty_byte_array, EmptyByteArray) \ |
| 86 V(FixedDoubleArray, empty_fixed_double_array, EmptyFixedDoubleArray) \ | 87 V(FixedDoubleArray, empty_fixed_double_array, EmptyFixedDoubleArray) \ |
| 87 V(String, empty_string, EmptyString) \ | 88 V(String, empty_string, EmptyString) \ |
| 88 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ | 89 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ |
| 89 V(Map, string_map, StringMap) \ | 90 V(Map, string_map, StringMap) \ |
| 90 V(Map, ascii_string_map, AsciiStringMap) \ | 91 V(Map, ascii_string_map, AsciiStringMap) \ |
| 91 V(Map, symbol_map, SymbolMap) \ | 92 V(Map, symbol_map, SymbolMap) \ |
| 92 V(Map, cons_string_map, ConsStringMap) \ | 93 V(Map, cons_string_map, ConsStringMap) \ |
| 93 V(Map, cons_ascii_string_map, ConsAsciiStringMap) \ | 94 V(Map, cons_ascii_string_map, ConsAsciiStringMap) \ |
| 95 V(Map, sliced_string_map, SlicedStringMap) \ |
| 96 V(Map, sliced_ascii_string_map, SlicedAsciiStringMap) \ |
| 94 V(Map, ascii_symbol_map, AsciiSymbolMap) \ | 97 V(Map, ascii_symbol_map, AsciiSymbolMap) \ |
| 95 V(Map, cons_symbol_map, ConsSymbolMap) \ | 98 V(Map, cons_symbol_map, ConsSymbolMap) \ |
| 96 V(Map, cons_ascii_symbol_map, ConsAsciiSymbolMap) \ | 99 V(Map, cons_ascii_symbol_map, ConsAsciiSymbolMap) \ |
| 97 V(Map, external_symbol_map, ExternalSymbolMap) \ | 100 V(Map, external_symbol_map, ExternalSymbolMap) \ |
| 98 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \ | 101 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \ |
| 99 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ | 102 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ |
| 100 V(Map, external_string_map, ExternalStringMap) \ | 103 V(Map, external_string_map, ExternalStringMap) \ |
| 101 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \ | 104 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \ |
| 102 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ | 105 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ |
| 103 V(Map, undetectable_string_map, UndetectableStringMap) \ | 106 V(Map, undetectable_string_map, UndetectableStringMap) \ |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 V(redeclaration_symbol, "redeclaration") \ | 222 V(redeclaration_symbol, "redeclaration") \ |
| 220 V(failure_symbol, "<failure>") \ | 223 V(failure_symbol, "<failure>") \ |
| 221 V(space_symbol, " ") \ | 224 V(space_symbol, " ") \ |
| 222 V(exec_symbol, "exec") \ | 225 V(exec_symbol, "exec") \ |
| 223 V(zero_symbol, "0") \ | 226 V(zero_symbol, "0") \ |
| 224 V(global_eval_symbol, "GlobalEval") \ | 227 V(global_eval_symbol, "GlobalEval") \ |
| 225 V(identity_hash_symbol, "v8::IdentityHash") \ | 228 V(identity_hash_symbol, "v8::IdentityHash") \ |
| 226 V(closure_symbol, "(closure)") \ | 229 V(closure_symbol, "(closure)") \ |
| 227 V(use_strict, "use strict") \ | 230 V(use_strict, "use strict") \ |
| 228 V(dot_symbol, ".") \ | 231 V(dot_symbol, ".") \ |
| 229 V(anonymous_function_symbol, "(anonymous function)") \ | 232 V(anonymous_function_symbol, "(anonymous function)") |
| 230 V(block_scope_symbol, ".block") | |
| 231 | 233 |
| 232 // Forward declarations. | 234 // Forward declarations. |
| 233 class GCTracer; | 235 class GCTracer; |
| 234 class HeapStats; | 236 class HeapStats; |
| 235 class Isolate; | 237 class Isolate; |
| 236 class WeakObjectRetainer; | 238 class WeakObjectRetainer; |
| 237 | 239 |
| 238 | 240 |
| 239 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, | 241 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, |
| 240 Object** pointer); | 242 Object** pointer); |
| (...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2257 int steps_count_; | 2259 int steps_count_; |
| 2258 double steps_took_; | 2260 double steps_took_; |
| 2259 double longest_step_; | 2261 double longest_step_; |
| 2260 int steps_count_since_last_gc_; | 2262 int steps_count_since_last_gc_; |
| 2261 double steps_took_since_last_gc_; | 2263 double steps_took_since_last_gc_; |
| 2262 | 2264 |
| 2263 Heap* heap_; | 2265 Heap* heap_; |
| 2264 }; | 2266 }; |
| 2265 | 2267 |
| 2266 | 2268 |
| 2269 class StringSplitCache { |
| 2270 public: |
| 2271 static Object* Lookup(FixedArray* cache, String* string, String* pattern); |
| 2272 static void Enter(Heap* heap, |
| 2273 FixedArray* cache, |
| 2274 String* string, |
| 2275 String* pattern, |
| 2276 FixedArray* array); |
| 2277 static void Clear(FixedArray* cache); |
| 2278 static const int kStringSplitCacheSize = 0x100; |
| 2279 |
| 2280 private: |
| 2281 static const int kArrayEntriesPerCacheEntry = 4; |
| 2282 static const int kStringOffset = 0; |
| 2283 static const int kPatternOffset = 1; |
| 2284 static const int kArrayOffset = 2; |
| 2285 |
| 2286 static MaybeObject* WrapFixedArrayInJSArray(Object* fixed_array); |
| 2287 }; |
| 2288 |
| 2289 |
| 2267 class TranscendentalCache { | 2290 class TranscendentalCache { |
| 2268 public: | 2291 public: |
| 2269 enum Type {ACOS, ASIN, ATAN, COS, EXP, LOG, SIN, TAN, kNumberOfCaches}; | 2292 enum Type {ACOS, ASIN, ATAN, COS, EXP, LOG, SIN, TAN, kNumberOfCaches}; |
| 2270 static const int kTranscendentalTypeBits = 3; | 2293 static const int kTranscendentalTypeBits = 3; |
| 2271 STATIC_ASSERT((1 << kTranscendentalTypeBits) >= kNumberOfCaches); | 2294 STATIC_ASSERT((1 << kTranscendentalTypeBits) >= kNumberOfCaches); |
| 2272 | 2295 |
| 2273 // Returns a heap number with f(input), where f is a math function specified | 2296 // Returns a heap number with f(input), where f is a math function specified |
| 2274 // by the 'type' argument. | 2297 // by the 'type' argument. |
| 2275 MUST_USE_RESULT inline MaybeObject* Get(Type type, double input); | 2298 MUST_USE_RESULT inline MaybeObject* Get(Type type, double input); |
| 2276 | 2299 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2446 | 2469 |
| 2447 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2470 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2448 }; | 2471 }; |
| 2449 #endif // DEBUG || LIVE_OBJECT_LIST | 2472 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2450 | 2473 |
| 2451 } } // namespace v8::internal | 2474 } } // namespace v8::internal |
| 2452 | 2475 |
| 2453 #undef HEAP | 2476 #undef HEAP |
| 2454 | 2477 |
| 2455 #endif // V8_HEAP_H_ | 2478 #endif // V8_HEAP_H_ |
| OLD | NEW |