Revision: 22585
Author: [email protected]
Date: Thu Jul 24 09:11:59 2014 UTC
Log: X87: Move function prototype handling into a special handler
rather than IC
port r22526.
original commit message:
Move function prototype handling into a special handler rather than IC
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/410203002
Patch from Chunyang Dai <[email protected]>.
http://code.google.com/p/v8/source/detail?r=22585
Modified:
/branches/bleeding_edge/src/x87/lithium-codegen-x87.cc
=======================================
--- /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Wed Jul 23
07:48:19 2014 UTC
+++ /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Thu Jul 24
09:11:59 2014 UTC
@@ -3131,16 +3131,6 @@
Register temp = ToRegister(instr->temp());
Register result = ToRegister(instr->result());
- // Check that the function really is a function.
- __ CmpObjectType(function, JS_FUNCTION_TYPE, result);
- DeoptimizeIf(not_equal, instr->environment());
-
- // Check whether the function has an instance prototype.
- Label non_instance;
- __ test_b(FieldOperand(result, Map::kBitFieldOffset),
- 1 << Map::kHasNonInstancePrototype);
- __ j(not_zero, &non_instance, Label::kNear);
-
// Get the prototype or initial map from the function.
__ mov(result,
FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
@@ -3156,12 +3146,6 @@
// Get the prototype from the initial map.
__ mov(result, FieldOperand(result, Map::kPrototypeOffset));
- __ jmp(&done, Label::kNear);
-
- // Non-instance prototype: Fetch prototype from constructor field
- // in the function's map.
- __ bind(&non_instance);
- __ mov(result, FieldOperand(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.