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

Side by Side Diff: src/objects-inl.h

Issue 10990076: Short term JSON eval cache Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/runtime.h » ('j') | src/v8.cc » ('J')
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 // 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 #endif 696 #endif
697 return true; 697 return true;
698 } 698 }
699 699
700 700
701 bool Object::IsCompilationCacheTable() { 701 bool Object::IsCompilationCacheTable() {
702 return IsHashTable(); 702 return IsHashTable();
703 } 703 }
704 704
705 705
706 bool Object::IsShortTermJSONEvalCacheTable() {
707 return IsHashTable();
708 }
709
710
706 bool Object::IsCodeCacheHashTable() { 711 bool Object::IsCodeCacheHashTable() {
707 return IsHashTable(); 712 return IsHashTable();
708 } 713 }
709 714
710 715
711 bool Object::IsPolymorphicCodeCacheHashTable() { 716 bool Object::IsPolymorphicCodeCacheHashTable() {
712 return IsHashTable(); 717 return IsHashTable();
713 } 718 }
714 719
715 720
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 2248
2244 2249
2245 // Find entry for key otherwise return kNotFound. 2250 // Find entry for key otherwise return kNotFound.
2246 template<typename Shape, typename Key> 2251 template<typename Shape, typename Key>
2247 int HashTable<Shape, Key>::FindEntry(Isolate* isolate, Key key) { 2252 int HashTable<Shape, Key>::FindEntry(Isolate* isolate, Key key) {
2248 uint32_t capacity = Capacity(); 2253 uint32_t capacity = Capacity();
2249 uint32_t entry = FirstProbe(HashTable<Shape, Key>::Hash(key), capacity); 2254 uint32_t entry = FirstProbe(HashTable<Shape, Key>::Hash(key), capacity);
2250 uint32_t count = 1; 2255 uint32_t count = 1;
2251 // EnsureCapacity will guarantee the hash table is never full. 2256 // EnsureCapacity will guarantee the hash table is never full.
2252 while (true) { 2257 while (true) {
2258 ASSERT(count <= capacity);
2253 Object* element = KeyAt(entry); 2259 Object* element = KeyAt(entry);
2254 // Empty entry. 2260 // Empty entry.
2255 if (element == isolate->heap()->raw_unchecked_undefined_value()) break; 2261 if (element == isolate->heap()->raw_unchecked_undefined_value()) break;
2256 if (element != isolate->heap()->raw_unchecked_the_hole_value() && 2262 if (element != isolate->heap()->raw_unchecked_the_hole_value() &&
2257 Shape::IsMatch(key, element)) return entry; 2263 Shape::IsMatch(key, element)) return entry;
2258 entry = NextProbe(entry, count++, capacity); 2264 entry = NextProbe(entry, count++, capacity);
2259 } 2265 }
2260 return kNotFound; 2266 return kNotFound;
2261 } 2267 }
2262 2268
(...skipping 26 matching lines...) Expand all
2289 CAST_ACCESSOR(FixedDoubleArray) 2295 CAST_ACCESSOR(FixedDoubleArray)
2290 CAST_ACCESSOR(DescriptorArray) 2296 CAST_ACCESSOR(DescriptorArray)
2291 CAST_ACCESSOR(DeoptimizationInputData) 2297 CAST_ACCESSOR(DeoptimizationInputData)
2292 CAST_ACCESSOR(DeoptimizationOutputData) 2298 CAST_ACCESSOR(DeoptimizationOutputData)
2293 CAST_ACCESSOR(TypeFeedbackCells) 2299 CAST_ACCESSOR(TypeFeedbackCells)
2294 CAST_ACCESSOR(SymbolTable) 2300 CAST_ACCESSOR(SymbolTable)
2295 CAST_ACCESSOR(JSFunctionResultCache) 2301 CAST_ACCESSOR(JSFunctionResultCache)
2296 CAST_ACCESSOR(NormalizedMapCache) 2302 CAST_ACCESSOR(NormalizedMapCache)
2297 CAST_ACCESSOR(ScopeInfo) 2303 CAST_ACCESSOR(ScopeInfo)
2298 CAST_ACCESSOR(CompilationCacheTable) 2304 CAST_ACCESSOR(CompilationCacheTable)
2305 CAST_ACCESSOR(ShortTermJSONEvalCacheTable)
2299 CAST_ACCESSOR(CodeCacheHashTable) 2306 CAST_ACCESSOR(CodeCacheHashTable)
2300 CAST_ACCESSOR(PolymorphicCodeCacheHashTable) 2307 CAST_ACCESSOR(PolymorphicCodeCacheHashTable)
2301 CAST_ACCESSOR(MapCache) 2308 CAST_ACCESSOR(MapCache)
2302 CAST_ACCESSOR(String) 2309 CAST_ACCESSOR(String)
2303 CAST_ACCESSOR(SeqString) 2310 CAST_ACCESSOR(SeqString)
2304 CAST_ACCESSOR(SeqAsciiString) 2311 CAST_ACCESSOR(SeqAsciiString)
2305 CAST_ACCESSOR(SeqTwoByteString) 2312 CAST_ACCESSOR(SeqTwoByteString)
2306 CAST_ACCESSOR(SlicedString) 2313 CAST_ACCESSOR(SlicedString)
2307 CAST_ACCESSOR(ConsString) 2314 CAST_ACCESSOR(ConsString)
2308 CAST_ACCESSOR(ExternalString) 2315 CAST_ACCESSOR(ExternalString)
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
3961 allows_lazy_compilation_without_context, 3968 allows_lazy_compilation_without_context,
3962 kAllowLazyCompilationWithoutContext) 3969 kAllowLazyCompilationWithoutContext)
3963 BOOL_ACCESSORS(SharedFunctionInfo, 3970 BOOL_ACCESSORS(SharedFunctionInfo,
3964 compiler_hints, 3971 compiler_hints,
3965 uses_arguments, 3972 uses_arguments,
3966 kUsesArguments) 3973 kUsesArguments)
3967 BOOL_ACCESSORS(SharedFunctionInfo, 3974 BOOL_ACCESSORS(SharedFunctionInfo,
3968 compiler_hints, 3975 compiler_hints,
3969 has_duplicate_parameters, 3976 has_duplicate_parameters,
3970 kHasDuplicateParameters) 3977 kHasDuplicateParameters)
3978 BOOL_ACCESSORS(SharedFunctionInfo,
3979 compiler_hints,
3980 is_json_eval,
3981 kIsJSONEval)
3971 3982
3972 3983
3973 #if V8_HOST_ARCH_32_BIT 3984 #if V8_HOST_ARCH_32_BIT
3974 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) 3985 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset)
3975 SMI_ACCESSORS(SharedFunctionInfo, formal_parameter_count, 3986 SMI_ACCESSORS(SharedFunctionInfo, formal_parameter_count,
3976 kFormalParameterCountOffset) 3987 kFormalParameterCountOffset)
3977 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties, 3988 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties,
3978 kExpectedNofPropertiesOffset) 3989 kExpectedNofPropertiesOffset)
3979 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset) 3990 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset)
3980 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type, 3991 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type,
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
5550 #undef WRITE_UINT32_FIELD 5561 #undef WRITE_UINT32_FIELD
5551 #undef READ_SHORT_FIELD 5562 #undef READ_SHORT_FIELD
5552 #undef WRITE_SHORT_FIELD 5563 #undef WRITE_SHORT_FIELD
5553 #undef READ_BYTE_FIELD 5564 #undef READ_BYTE_FIELD
5554 #undef WRITE_BYTE_FIELD 5565 #undef WRITE_BYTE_FIELD
5555 5566
5556 5567
5557 } } // namespace v8::internal 5568 } } // namespace v8::internal
5558 5569
5559 #endif // V8_OBJECTS_INL_H_ 5570 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.h » ('j') | src/v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698