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

Unified Diff: src/objects.cc

Issue 907403002: [strong] Introduce --use-strong flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added flag implication 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/flag-definitions.h ('k') | no next file » | 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 e8bb005dc8b8f46ae88b0b68dc75e3b5ef773e2f..7e85e59bdb169ea56e6fc862d7d21d01cd2defbe 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -15292,8 +15292,8 @@ Handle<Object> CompilationCacheTable::Lookup(Handle<String> src,
Handle<Context> context) {
Isolate* isolate = GetIsolate();
Handle<SharedFunctionInfo> shared(context->closure()->shared());
- StringSharedKey key(src, shared, FLAG_use_strict ? STRICT : SLOPPY,
- RelocInfo::kNoPosition);
+ LanguageMode mode = construct_language_mode(FLAG_use_strict, FLAG_use_strong);
+ StringSharedKey key(src, shared, mode, RelocInfo::kNoPosition);
int entry = FindEntry(&key);
if (entry == kNotFound) return isolate->factory()->undefined_value();
int index = EntryToIndex(entry);
@@ -15333,8 +15333,8 @@ Handle<CompilationCacheTable> CompilationCacheTable::Put(
Handle<Context> context, Handle<Object> value) {
Isolate* isolate = cache->GetIsolate();
Handle<SharedFunctionInfo> shared(context->closure()->shared());
- StringSharedKey key(src, shared, FLAG_use_strict ? STRICT : SLOPPY,
- RelocInfo::kNoPosition);
+ LanguageMode mode = construct_language_mode(FLAG_use_strict, FLAG_use_strong);
+ StringSharedKey key(src, shared, mode, RelocInfo::kNoPosition);
{
Handle<Object> k = key.AsHandle(isolate);
DisallowHeapAllocation no_allocation_scope;
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698