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

Side by Side Diff: src/objects.cc

Issue 1882833006: Revert of Immediately cache compiled scripts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | test/cctest/heap/test-heap.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 17608 matching lines...) Expand 10 before | Expand all | Expand 10 after
17619 return Handle<Object>(get(EntryToIndex(entry) + 1), isolate); 17619 return Handle<Object>(get(EntryToIndex(entry) + 1), isolate);
17620 } 17620 }
17621 17621
17622 17622
17623 Handle<CompilationCacheTable> CompilationCacheTable::Put( 17623 Handle<CompilationCacheTable> CompilationCacheTable::Put(
17624 Handle<CompilationCacheTable> cache, Handle<String> src, 17624 Handle<CompilationCacheTable> cache, Handle<String> src,
17625 Handle<Context> context, LanguageMode language_mode, Handle<Object> value) { 17625 Handle<Context> context, LanguageMode language_mode, Handle<Object> value) {
17626 Isolate* isolate = cache->GetIsolate(); 17626 Isolate* isolate = cache->GetIsolate();
17627 Handle<SharedFunctionInfo> shared(context->closure()->shared()); 17627 Handle<SharedFunctionInfo> shared(context->closure()->shared());
17628 StringSharedKey key(src, shared, language_mode, RelocInfo::kNoPosition); 17628 StringSharedKey key(src, shared, language_mode, RelocInfo::kNoPosition);
17629 Handle<Object> k = key.AsHandle(isolate); 17629 {
17630 Handle<Object> k = key.AsHandle(isolate);
17631 DisallowHeapAllocation no_allocation_scope;
17632 int entry = cache->FindEntry(&key);
17633 if (entry != kNotFound) {
17634 cache->set(EntryToIndex(entry), *k);
17635 cache->set(EntryToIndex(entry) + 1, *value);
17636 return cache;
17637 }
17638 }
17639
17630 cache = EnsureCapacity(cache, 1, &key); 17640 cache = EnsureCapacity(cache, 1, &key);
17631 int entry = cache->FindInsertionEntry(key.Hash()); 17641 int entry = cache->FindInsertionEntry(key.Hash());
17642 Handle<Object> k =
17643 isolate->factory()->NewNumber(static_cast<double>(key.Hash()));
17632 cache->set(EntryToIndex(entry), *k); 17644 cache->set(EntryToIndex(entry), *k);
17633 cache->set(EntryToIndex(entry) + 1, *value); 17645 cache->set(EntryToIndex(entry) + 1, Smi::FromInt(kHashGenerations));
17634 cache->ElementAdded(); 17646 cache->ElementAdded();
17635 return cache; 17647 return cache;
17636 } 17648 }
17637 17649
17638 17650
17639 Handle<CompilationCacheTable> CompilationCacheTable::PutEval( 17651 Handle<CompilationCacheTable> CompilationCacheTable::PutEval(
17640 Handle<CompilationCacheTable> cache, Handle<String> src, 17652 Handle<CompilationCacheTable> cache, Handle<String> src,
17641 Handle<SharedFunctionInfo> outer_info, Handle<SharedFunctionInfo> value, 17653 Handle<SharedFunctionInfo> outer_info, Handle<SharedFunctionInfo> value,
17642 int scope_position) { 17654 int scope_position) {
17643 Isolate* isolate = cache->GetIsolate(); 17655 Isolate* isolate = cache->GetIsolate();
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
19364 if (cell->value() != *new_value) { 19376 if (cell->value() != *new_value) {
19365 cell->set_value(*new_value); 19377 cell->set_value(*new_value);
19366 Isolate* isolate = cell->GetIsolate(); 19378 Isolate* isolate = cell->GetIsolate();
19367 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19379 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19368 isolate, DependentCode::kPropertyCellChangedGroup); 19380 isolate, DependentCode::kPropertyCellChangedGroup);
19369 } 19381 }
19370 } 19382 }
19371 19383
19372 } // namespace internal 19384 } // namespace internal
19373 } // namespace v8 19385 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698