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

Unified Diff: src/x64/stub-cache-x64.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/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
===================================================================
--- src/x64/stub-cache-x64.cc (revision 5559)
+++ src/x64/stub-cache-x64.cc (working copy)
@@ -800,9 +800,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());
__ Move(scratch, Handle<Object>(cell));
@@ -879,9 +881,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;
}
@@ -1033,9 +1038,11 @@
}
// Handle call cache miss.
+ 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);
@@ -1088,9 +1095,11 @@
__ InvokeFunction(rdi, 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);
@@ -1246,9 +1255,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);
@@ -1328,9 +1339,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);
@@ -1400,9 +1413,11 @@
__ LoadRoot(rax, Heap::kEmptyStringRootIndex);
__ 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);
@@ -1470,9 +1485,11 @@
__ LoadRoot(rax, Heap::kNanValueRootIndex);
__ 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);
@@ -1539,9 +1556,11 @@
__ InvokeFunction(function, arguments(), JUMP_FUNCTION);
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
// rcx: function name.
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
@@ -1652,9 +1671,11 @@
__ InvokeFunction(function, arguments(), JUMP_FUNCTION);
__ bind(&miss);
+ Object* obj;
+ { TryAllocation t = GenerateMissBranch();
+ if (!t->ToObject(&obj)) return t;
+ }
// rcx: function name.
- Object* obj = GenerateMissBranch();
- if (obj->IsFailure()) return obj;
// Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
@@ -1718,9 +1739,11 @@
__ InvokeFunction(rdi, 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);
@@ -1781,9 +1804,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/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698