Revision: 22534
Author:   [email protected]
Date:     Tue Jul 22 17:14:27 2014 UTC
Log: MIPS: Move function prototype handling into a special handler rather than IC.

Port r22526 (d4c953e)

Original commit message:
Adjust hydrogen handling of function.prototype to be based on map feedback. Handle non-instance prototype loading using an IC rather than in the hydrogen instruction. In the future, remove the special instruction and replace by multiple hydrogen instructions.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/414463002
http://code.google.com/p/v8/source/detail?r=22534

Modified:
 /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
 /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc

=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jul 22 14:34:55 2014 UTC +++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jul 22 17:14:27 2014 UTC
@@ -3057,17 +3057,6 @@
   Register function = ToRegister(instr->function());
   Register result = ToRegister(instr->result());

-  // Check that the function really is a function. Load map into the
-  // result register.
-  __ GetObjectType(function, result, scratch);
- DeoptimizeIf(ne, instr->environment(), scratch, Operand(JS_FUNCTION_TYPE));
-
-  // Make sure that the function has an instance prototype.
-  Label non_instance;
-  __ lbu(scratch, FieldMemOperand(result, Map::kBitFieldOffset));
-  __ And(scratch, scratch, Operand(1 << Map::kHasNonInstancePrototype));
-  __ Branch(&non_instance, ne, scratch, Operand(zero_reg));
-
   // Get the prototype or initial map from the function.
   __ lw(result,
FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
@@ -3083,12 +3072,6 @@

   // Get the prototype from the initial map.
   __ lw(result, FieldMemOperand(result, Map::kPrototypeOffset));
-  __ Branch(&done);
-
-  // Non-instance prototype: Fetch prototype from constructor field
-  // in initial map.
-  __ bind(&non_instance);
-  __ lw(result, FieldMemOperand(result, Map::kConstructorOffset));

   // All done.
   __ bind(&done);
=======================================
--- /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Tue Jul 22 14:34:55 2014 UTC +++ /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Tue Jul 22 17:14:27 2014 UTC
@@ -3039,17 +3039,6 @@
   Register function = ToRegister(instr->function());
   Register result = ToRegister(instr->result());

-  // Check that the function really is a function. Load map into the
-  // result register.
-  __ GetObjectType(function, result, scratch);
- DeoptimizeIf(ne, instr->environment(), scratch, Operand(JS_FUNCTION_TYPE));
-
-  // Make sure that the function has an instance prototype.
-  Label non_instance;
-  __ lbu(scratch, FieldMemOperand(result, Map::kBitFieldOffset));
-  __ And(scratch, scratch, Operand(1 << Map::kHasNonInstancePrototype));
-  __ Branch(&non_instance, ne, scratch, Operand(zero_reg));
-
   // Get the prototype or initial map from the function.
   __ ld(result,
FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
@@ -3065,12 +3054,6 @@

   // Get the prototype from the initial map.
   __ ld(result, FieldMemOperand(result, Map::kPrototypeOffset));
-  __ Branch(&done);
-
-  // Non-instance prototype: Fetch prototype from constructor field
-  // in initial map.
-  __ bind(&non_instance);
-  __ ld(result, FieldMemOperand(result, Map::kConstructorOffset));

   // All done.
   __ bind(&done);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to