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

Unified Diff: src/ic/ic.cc

Issue 1700993002: Remove strong mode support from property loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 4 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/ic/ic.h ('k') | src/ic/ic-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index dcd01cd292b74b459b9c141fa7f7e8e392644959..0d8b45fe7e9fa7667befac6f038d5b028c6139db 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -559,9 +559,7 @@ Handle<Code> KeyedLoadIC::ChooseMegamorphicStub(Isolate* isolate,
if (FLAG_compiled_keyed_generic_loads) {
return KeyedLoadGenericStub(isolate, LoadICState(extra_state)).GetCode();
} else {
- return is_strong(LoadICState::GetLanguageMode(extra_state))
- ? isolate->builtins()->KeyedLoadIC_Megamorphic_Strong()
- : isolate->builtins()->KeyedLoadIC_Megamorphic();
+ return isolate->builtins()->KeyedLoadIC_Megamorphic();
}
}
@@ -668,9 +666,9 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
TRACE_GENERIC_IC(isolate(), "LoadIC", "name as array index");
}
Handle<Object> result;
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::GetElement(isolate(), object, index, language_mode()), Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
+ Object::GetElement(isolate(), object, index),
+ Object);
return result;
}
@@ -714,8 +712,8 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
// Get the property.
Handle<Object> result;
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result, Object::GetProperty(&it, language_mode()), Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate(), result, Object::GetProperty(&it),
+ Object);
if (it.IsFound()) {
return result;
} else if (!ShouldThrowReferenceError(object)) {
@@ -900,9 +898,7 @@ Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code(
if (initialization_state != MEGAMORPHIC) {
return KeyedLoadICStub(isolate, LoadICState(extra_state)).GetCode();
}
- return is_strong(LoadICState::GetLanguageMode(extra_state))
- ? isolate->builtins()->KeyedLoadIC_Megamorphic_Strong()
- : isolate->builtins()->KeyedLoadIC_Megamorphic();
+ return isolate->builtins()->KeyedLoadIC_Megamorphic();
}
@@ -1025,7 +1021,7 @@ void LoadIC::UpdateCaches(LookupIterator* lookup) {
lookup->state() == LookupIterator::ACCESS_CHECK) {
code = slow_stub();
} else if (!lookup->IsFound()) {
- if (kind() == Code::LOAD_IC && !is_strong(language_mode())) {
+ if (kind() == Code::LOAD_IC) {
code = NamedLoadHandlerCompiler::ComputeLoadNonexistent(lookup->name(),
receiver_map());
// TODO(jkummerow/verwaest): Introduce a builtin that handles this case.
@@ -1232,9 +1228,7 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
// property must be found in the object for the stub to be
// applicable.
if (!receiver_is_holder) break;
- return is_strong(language_mode())
- ? isolate()->builtins()->LoadIC_Normal_Strong()
- : isolate()->builtins()->LoadIC_Normal();
+ return isolate()->builtins()->LoadIC_Normal();
}
// -------------- Fields --------------
@@ -1344,8 +1338,7 @@ Handle<Code> KeyedLoadIC::LoadElementStub(Handle<HeapObject> receiver) {
CodeHandleList handlers(target_receiver_maps.length());
ElementHandlerCompiler compiler(isolate());
- compiler.CompileElementHandlers(&target_receiver_maps, &handlers,
- language_mode());
+ compiler.CompileElementHandlers(&target_receiver_maps, &handlers);
ConfigureVectorState(Handle<Name>::null(), &target_receiver_maps, &handlers);
return null_handle;
}
@@ -1356,8 +1349,7 @@ MaybeHandle<Object> KeyedLoadIC::Load(Handle<Object> object,
if (MigrateDeprecated(object)) {
Handle<Object> result;
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Runtime::GetObjectProperty(isolate(), object, key, language_mode()),
+ isolate(), result, Runtime::GetObjectProperty(isolate(), object, key),
Object);
return result;
}
@@ -1395,10 +1387,9 @@ MaybeHandle<Object> KeyedLoadIC::Load(Handle<Object> object,
if (!load_handle.is_null()) return load_handle;
Handle<Object> result;
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Runtime::GetObjectProperty(isolate(), object, key, language_mode()),
- Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
+ Runtime::GetObjectProperty(isolate(), object, key),
+ Object);
return result;
}
@@ -2919,11 +2910,8 @@ RUNTIME_FUNCTION(Runtime_LoadElementWithInterceptor) {
DCHECK(args.smi_at(1) >= 0);
uint32_t index = args.smi_at(1);
Handle<Object> result;
- // TODO(conradw): Investigate strong mode semantics for this.
- LanguageMode language_mode = SLOPPY;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- Object::GetElement(isolate, receiver, index, language_mode));
+ isolate, result, Object::GetElement(isolate, receiver, index));
return *result;
}
« no previous file with comments | « src/ic/ic.h ('k') | src/ic/ic-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698