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

Unified Diff: src/ia32/stub-cache-ia32.cc

Issue 3522008: This is a little experiment to move Failure to a superclass above Object... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 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/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/stub-cache-ia32.cc
===================================================================
--- src/ia32/stub-cache-ia32.cc (revision 5559)
+++ src/ia32/stub-cache-ia32.cc (working copy)
@@ -811,9 +811,11 @@
GlobalObject* global,
String* name,
Register scratch,
+ Object* probe;
+ { TryAllocation t = global->EnsurePropertyCell(name);
+ if (!t->ToObject(&probe)) return t;
+ }
Label* miss) {
- Object* probe = global->EnsurePropertyCell(name);
- if (probe->IsFailure()) return probe;
JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(probe);
ASSERT(cell->value()->IsTheHole());
__ mov(scratch, Immediate(Handle<Object>(cell)));
@@ -1314,9 +1316,12 @@
}
+ Object* obj;
+ { TryAllocation t =
+ StubCache::ComputeCallMiss(arguments().immediate(), kind_);
+ if (!t->ToObject(&obj)) return t;
+ }
Object* CallStubCompiler::GenerateMissBranch() {
- Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_);
- if (obj->IsFailure()) return obj;
__ jmp(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET);
return obj;
}
@@ -1368,9 +1373,11 @@
__ InvokeFunction(edi, arguments(), JUMP_FUNCTION);
// Handle call cache miss.
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ bind(&miss);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(FIELD, name);
@@ -1514,9 +1521,11 @@
1);
}
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ bind(&miss);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(function);
@@ -1595,9 +1604,11 @@
argc + 1,
1);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ bind(&miss);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(function);
@@ -1665,9 +1676,11 @@
__ Set(eax, Immediate(Factory::nan_value()));
__ ret((argc + 1) * kPointerSize);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ bind(&miss);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(function);
@@ -1737,9 +1750,11 @@
__ Set(eax, Immediate(Factory::empty_string()));
__ ret((argc + 1) * kPointerSize);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ bind(&miss);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(function);
@@ -1810,9 +1825,11 @@
__ InvokeFunction(function, arguments(), JUMP_FUNCTION);
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
// ecx: function name.
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
@@ -1935,9 +1952,11 @@
__ InvokeFunction(function, arguments(), JUMP_FUNCTION);
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
// ecx: function name.
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
@@ -2038,9 +2057,11 @@
__ InvokeFunction(function, arguments(), JUMP_FUNCTION);
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
// ecx: function name.
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
@@ -2191,9 +2212,11 @@
if (depth != kInvalidProtoDepth) {
FreeSpaceForFastApiCall(masm(), eax);
}
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ bind(&miss_in_smi_check);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(function);
@@ -2256,9 +2279,11 @@
__ InvokeFunction(edi, arguments(), JUMP_FUNCTION);
// Handle load cache miss.
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ bind(&miss);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(INTERCEPTOR, name);
@@ -2317,9 +2342,11 @@
// Handle call cache miss.
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
__ IncrementCounter(&Counters::call_global_inline_miss, 1);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(NORMAL, name);
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698