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

Side by Side Diff: src/frames.cc

Issue 9148006: [objects] seed NumberDictionary (only ia32 now) Base URL: gh:v8/v8@master
Patch Set: fixed linter issues, use pseudo-random function in test Created 8 years, 11 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
« no previous file with comments | « src/debug.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 addr = next_addr; 1296 addr = next_addr;
1297 } 1297 }
1298 } 1298 }
1299 1299
1300 1300
1301 InnerPointerToCodeCache::InnerPointerToCodeCacheEntry* 1301 InnerPointerToCodeCache::InnerPointerToCodeCacheEntry*
1302 InnerPointerToCodeCache::GetCacheEntry(Address inner_pointer) { 1302 InnerPointerToCodeCache::GetCacheEntry(Address inner_pointer) {
1303 isolate_->counters()->pc_to_code()->Increment(); 1303 isolate_->counters()->pc_to_code()->Increment();
1304 ASSERT(IsPowerOf2(kInnerPointerToCodeCacheSize)); 1304 ASSERT(IsPowerOf2(kInnerPointerToCodeCacheSize));
1305 uint32_t hash = ComputeIntegerHash( 1305 uint32_t hash = ComputeIntegerHash(
1306 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(inner_pointer))); 1306 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(inner_pointer)),
1307 v8::internal::kZeroHashSeed);
1307 uint32_t index = hash & (kInnerPointerToCodeCacheSize - 1); 1308 uint32_t index = hash & (kInnerPointerToCodeCacheSize - 1);
1308 InnerPointerToCodeCacheEntry* entry = cache(index); 1309 InnerPointerToCodeCacheEntry* entry = cache(index);
1309 if (entry->inner_pointer == inner_pointer) { 1310 if (entry->inner_pointer == inner_pointer) {
1310 isolate_->counters()->pc_to_code_cached()->Increment(); 1311 isolate_->counters()->pc_to_code_cached()->Increment();
1311 ASSERT(entry->code == GcSafeFindCodeForInnerPointer(inner_pointer)); 1312 ASSERT(entry->code == GcSafeFindCodeForInnerPointer(inner_pointer));
1312 } else { 1313 } else {
1313 // Because this code may be interrupted by a profiling signal that 1314 // Because this code may be interrupted by a profiling signal that
1314 // also queries the cache, we cannot update inner_pointer before the code 1315 // also queries the cache, we cannot update inner_pointer before the code
1315 // has been set. Otherwise, we risk trying to use a cache entry before 1316 // has been set. Otherwise, we risk trying to use a cache entry before
1316 // the code has been computed. 1317 // the code has been computed.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 ZoneList<StackFrame*> list(10); 1387 ZoneList<StackFrame*> list(10);
1387 for (StackFrameIterator it; !it.done(); it.Advance()) { 1388 for (StackFrameIterator it; !it.done(); it.Advance()) {
1388 StackFrame* frame = AllocateFrameCopy(it.frame()); 1389 StackFrame* frame = AllocateFrameCopy(it.frame());
1389 list.Add(frame); 1390 list.Add(frame);
1390 } 1391 }
1391 return list.ToVector(); 1392 return list.ToVector();
1392 } 1393 }
1393 1394
1394 1395
1395 } } // namespace v8::internal 1396 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698