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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 15274 matching lines...) Expand 10 before | Expand all | Expand 10 after
15285 15285
15286 isolate->factory()->set_string_table(table); 15286 isolate->factory()->set_string_table(table);
15287 return Handle<String>::cast(string); 15287 return Handle<String>::cast(string);
15288 } 15288 }
15289 15289
15290 15290
15291 Handle<Object> CompilationCacheTable::Lookup(Handle<String> src, 15291 Handle<Object> CompilationCacheTable::Lookup(Handle<String> src,
15292 Handle<Context> context) { 15292 Handle<Context> context) {
15293 Isolate* isolate = GetIsolate(); 15293 Isolate* isolate = GetIsolate();
15294 Handle<SharedFunctionInfo> shared(context->closure()->shared()); 15294 Handle<SharedFunctionInfo> shared(context->closure()->shared());
15295 StringSharedKey key(src, shared, FLAG_use_strict ? STRICT : SLOPPY, 15295 LanguageMode mode = construct_language_mode(FLAG_use_strict, FLAG_use_strong);
15296 RelocInfo::kNoPosition); 15296 StringSharedKey key(src, shared, mode, RelocInfo::kNoPosition);
15297 int entry = FindEntry(&key); 15297 int entry = FindEntry(&key);
15298 if (entry == kNotFound) return isolate->factory()->undefined_value(); 15298 if (entry == kNotFound) return isolate->factory()->undefined_value();
15299 int index = EntryToIndex(entry); 15299 int index = EntryToIndex(entry);
15300 if (!get(index)->IsFixedArray()) return isolate->factory()->undefined_value(); 15300 if (!get(index)->IsFixedArray()) return isolate->factory()->undefined_value();
15301 return Handle<Object>(get(index + 1), isolate); 15301 return Handle<Object>(get(index + 1), isolate);
15302 } 15302 }
15303 15303
15304 15304
15305 Handle<Object> CompilationCacheTable::LookupEval( 15305 Handle<Object> CompilationCacheTable::LookupEval(
15306 Handle<String> src, Handle<SharedFunctionInfo> outer_info, 15306 Handle<String> src, Handle<SharedFunctionInfo> outer_info,
(...skipping 19 matching lines...) Expand all
15326 if (entry == kNotFound) return isolate->factory()->undefined_value(); 15326 if (entry == kNotFound) return isolate->factory()->undefined_value();
15327 return Handle<Object>(get(EntryToIndex(entry) + 1), isolate); 15327 return Handle<Object>(get(EntryToIndex(entry) + 1), isolate);
15328 } 15328 }
15329 15329
15330 15330
15331 Handle<CompilationCacheTable> CompilationCacheTable::Put( 15331 Handle<CompilationCacheTable> CompilationCacheTable::Put(
15332 Handle<CompilationCacheTable> cache, Handle<String> src, 15332 Handle<CompilationCacheTable> cache, Handle<String> src,
15333 Handle<Context> context, Handle<Object> value) { 15333 Handle<Context> context, Handle<Object> value) {
15334 Isolate* isolate = cache->GetIsolate(); 15334 Isolate* isolate = cache->GetIsolate();
15335 Handle<SharedFunctionInfo> shared(context->closure()->shared()); 15335 Handle<SharedFunctionInfo> shared(context->closure()->shared());
15336 StringSharedKey key(src, shared, FLAG_use_strict ? STRICT : SLOPPY, 15336 LanguageMode mode = construct_language_mode(FLAG_use_strict, FLAG_use_strong);
15337 RelocInfo::kNoPosition); 15337 StringSharedKey key(src, shared, mode, RelocInfo::kNoPosition);
15338 { 15338 {
15339 Handle<Object> k = key.AsHandle(isolate); 15339 Handle<Object> k = key.AsHandle(isolate);
15340 DisallowHeapAllocation no_allocation_scope; 15340 DisallowHeapAllocation no_allocation_scope;
15341 int entry = cache->FindEntry(&key); 15341 int entry = cache->FindEntry(&key);
15342 if (entry != kNotFound) { 15342 if (entry != kNotFound) {
15343 cache->set(EntryToIndex(entry), *k); 15343 cache->set(EntryToIndex(entry), *k);
15344 cache->set(EntryToIndex(entry) + 1, *value); 15344 cache->set(EntryToIndex(entry) + 1, *value);
15345 return cache; 15345 return cache;
15346 } 15346 }
15347 } 15347 }
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
16940 Handle<DependentCode> codes = 16940 Handle<DependentCode> codes =
16941 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16941 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16942 DependentCode::kPropertyCellChangedGroup, 16942 DependentCode::kPropertyCellChangedGroup,
16943 info->object_wrapper()); 16943 info->object_wrapper());
16944 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16944 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16945 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16945 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16946 cell, info->zone()); 16946 cell, info->zone());
16947 } 16947 }
16948 16948
16949 } } // namespace v8::internal 16949 } } // namespace v8::internal
OLDNEW
« 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