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

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

Issue 12089098: MIPS: Support slow-mode prototypes for load and call ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/stub-cache-mips.cc
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
index 0be9e03c371b4206978031b0245f5153c8af9ae3..2981e4099822996ab4b3fa70e3339157a8c550d3 100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -2893,9 +2893,11 @@ Handle<Code> StoreStubCompiler::CompileStoreGlobal(
}
-Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<String> name,
- Handle<JSObject> object,
- Handle<JSObject> last) {
+Handle<Code> LoadStubCompiler::CompileLoadNonexistent(
+ Handle<String> name,
+ Handle<JSObject> object,
+ Handle<JSObject> last,
+ Handle<GlobalObject> global) {
// ----------- S t a t e -------------
// -- a0 : receiver
// -- ra : return address
@@ -2905,14 +2907,22 @@ Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<String> name,
// Check that the receiver is not a smi.
__ JumpIfSmi(a0, &miss);
+ Register scratch = a1;
+
// Check the maps of the full prototype chain.
- CheckPrototypes(object, a0, last, a3, a1, t0, name, &miss);
+ Register result =
+ CheckPrototypes(object, a0, last, a3, scratch, t0, name, &miss);
// If the last object in the prototype chain is a global object,
// check that the global property cell is empty.
- if (last->IsGlobalObject()) {
- GenerateCheckPropertyCell(
- masm(), Handle<GlobalObject>::cast(last), name, a1, &miss);
+ if (!global.is_null()) {
+ GenerateCheckPropertyCell(masm(), global, name, scratch, &miss);
+ }
+
+ if (!last->HasFastProperties()) {
+ __ lw(scratch, FieldMemOperand(result, HeapObject::kMapOffset));
+ __ lw(scratch, FieldMemOperand(scratch, Map::kPrototypeOffset));
+ __ Branch(&miss, ne, scratch, Operand(isolate()->factory()->null_value()));
}
// Return undefined if maps of the full prototype chain is still the same.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698