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

Unified Diff: src/objects.cc

Issue 923573002: Properly thread language mode to compilation cache (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 44057dbd9f51de787e62c18fe9bf196a36260a77..3d7fd18d7e98043a281907131616649f2475fb7e 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -15354,11 +15354,11 @@ Handle<String> StringTable::LookupKey(Isolate* isolate, HashTableKey* key) {
Handle<Object> CompilationCacheTable::Lookup(Handle<String> src,
- Handle<Context> context) {
+ Handle<Context> context,
+ LanguageMode language_mode) {
Isolate* isolate = GetIsolate();
Handle<SharedFunctionInfo> shared(context->closure()->shared());
- LanguageMode mode = construct_language_mode(FLAG_use_strict, FLAG_use_strong);
- StringSharedKey key(src, shared, mode, RelocInfo::kNoPosition);
+ StringSharedKey key(src, shared, language_mode, RelocInfo::kNoPosition);
int entry = FindEntry(&key);
if (entry == kNotFound) return isolate->factory()->undefined_value();
int index = EntryToIndex(entry);
@@ -15395,11 +15395,10 @@ Handle<Object> CompilationCacheTable::LookupRegExp(Handle<String> src,
Handle<CompilationCacheTable> CompilationCacheTable::Put(
Handle<CompilationCacheTable> cache, Handle<String> src,
- Handle<Context> context, Handle<Object> value) {
+ Handle<Context> context, LanguageMode language_mode, Handle<Object> value) {
Isolate* isolate = cache->GetIsolate();
Handle<SharedFunctionInfo> shared(context->closure()->shared());
- LanguageMode mode = construct_language_mode(FLAG_use_strict, FLAG_use_strong);
- StringSharedKey key(src, shared, mode, RelocInfo::kNoPosition);
+ StringSharedKey key(src, shared, language_mode, RelocInfo::kNoPosition);
{
Handle<Object> k = key.AsHandle(isolate);
DisallowHeapAllocation no_allocation_scope;
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698