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

Unified Diff: src/ic.cc

Issue 11737032: Use enum instead of bool for force_generic (MISS / MISS_FORCE_GENERIC) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 12 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.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 255f6e89eb3a0caf0590d52a960d3e6f1450d6de..8b3b4723fe215f6ad68566d6a7c3ed70067c3e14 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1108,7 +1108,7 @@ static Handle<Object> TryConvertKey(Handle<Object> key, Isolate* isolate) {
MaybeObject* KeyedLoadIC::Load(State state,
Handle<Object> object,
Handle<Object> key,
- bool force_generic_stub) {
+ ICMissMode miss_mode) {
// Check for values that can be converted into a symbol directly or
// is representable as a smi.
key = TryConvertKey(key, isolate());
@@ -1209,7 +1209,7 @@ MaybeObject* KeyedLoadIC::Load(State state,
if (use_ic) {
Handle<Code> stub = generic_stub();
- if (!force_generic_stub) {
+ if (miss_mode != MISS_FORCE_GENERIC) {
if (object->IsString() && key->IsNumber()) {
if (state == UNINITIALIZED) {
stub = string_stub();
@@ -1880,7 +1880,7 @@ MaybeObject* KeyedStoreIC::Store(State state,
Handle<Object> object,
Handle<Object> key,
Handle<Object> value,
- bool force_generic) {
+ ICMissMode miss_mode) {
// Check for values that can be converted into a symbol directly or
// is representable as a smi.
key = TryConvertKey(key, isolate());
@@ -1942,7 +1942,7 @@ MaybeObject* KeyedStoreIC::Store(State state,
if (receiver->elements()->map() ==
isolate()->heap()->non_strict_arguments_elements_map()) {
stub = non_strict_arguments_stub();
- } else if (!force_generic) {
+ } else if (miss_mode != MISS_FORCE_GENERIC) {
if (key->IsSmi() && (target() != *non_strict_arguments_stub())) {
StubKind stub_kind = GetStubKind(receiver, key, value);
stub = ComputeStub(receiver, stub_kind, strict_mode, stub);
@@ -2110,7 +2110,7 @@ RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss) {
ASSERT(args.length() == 2);
KeyedLoadIC ic(isolate);
IC::State state = IC::StateFrom(ic.target(), args[0], args[1]);
- return ic.Load(state, args.at<Object>(0), args.at<Object>(1), false);
+ return ic.Load(state, args.at<Object>(0), args.at<Object>(1), MISS);
}
@@ -2119,7 +2119,10 @@ RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissForceGeneric) {
ASSERT(args.length() == 2);
KeyedLoadIC ic(isolate);
IC::State state = IC::StateFrom(ic.target(), args[0], args[1]);
- return ic.Load(state, args.at<Object>(0), args.at<Object>(1), true);
+ return ic.Load(state,
+ args.at<Object>(0),
+ args.at<Object>(1),
+ MISS_FORCE_GENERIC);
}
@@ -2211,7 +2214,7 @@ RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_Miss) {
args.at<Object>(0),
args.at<Object>(1),
args.at<Object>(2),
- false);
+ MISS);
}
@@ -2244,7 +2247,7 @@ RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissForceGeneric) {
args.at<Object>(0),
args.at<Object>(1),
args.at<Object>(2),
- true);
+ MISS_FORCE_GENERIC);
}
« no previous file with comments | « src/ic.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698