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

Unified Diff: src/arm/stub-cache-arm.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/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/stub-cache-arm.cc
===================================================================
--- src/arm/stub-cache-arm.cc (revision 5559)
+++ src/arm/stub-cache-arm.cc (working copy)
@@ -838,9 +838,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, Operand(Handle<Object>(cell)));
@@ -1281,9 +1283,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;
__ Jump(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET);
return obj;
}
@@ -1316,9 +1321,11 @@
GenerateCallFunction(masm(), object, arguments(), &miss);
// 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);
@@ -1360,9 +1367,11 @@
1);
// 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(function);
@@ -1404,9 +1413,11 @@
1);
// 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(function);
@@ -1476,9 +1487,11 @@
__ Drop(argc + 1);
__ Ret();
+ 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);
@@ -1550,9 +1563,11 @@
__ Drop(argc + 1);
__ Ret();
+ 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);
@@ -1624,9 +1639,11 @@
__ InvokeFunction(function, arguments(), JUMP_FUNCTION);
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
// r2: function name.
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
@@ -1736,9 +1753,11 @@
__ InvokeFunction(function, arguments(), JUMP_FUNCTION);
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
// r2: function name.
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
@@ -1890,9 +1909,11 @@
FreeSpaceForFastApiCall(masm());
}
+ 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);
@@ -1940,9 +1961,11 @@
GenerateCallFunction(masm(), object, arguments(), &miss);
// 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(INTERCEPTOR, name);
@@ -1999,9 +2022,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, r1, r3);
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return GetCode(NORMAL, name);
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698