| Index: src/x64/macro-assembler-x64.cc
|
| ===================================================================
|
| --- src/x64/macro-assembler-x64.cc (revision 4439)
|
| +++ src/x64/macro-assembler-x64.cc (working copy)
|
| @@ -2172,6 +2172,7 @@
|
| JSObject* holder,
|
| Register holder_reg,
|
| Register scratch,
|
| + int save_at_depth,
|
| Label* miss) {
|
| // Make sure there's no overlap between scratch and the other
|
| // registers.
|
| @@ -2181,8 +2182,12 @@
|
| // iteration, reg is an alias for object_reg, on later iterations,
|
| // it is an alias for holder_reg.
|
| Register reg = object_reg;
|
| - int depth = 1;
|
| + int depth = 0;
|
|
|
| + if (save_at_depth == depth) {
|
| + movq(Operand(rsp, kPointerSize), reg);
|
| + }
|
| +
|
| // Check the maps in the prototype chain.
|
| // Traverse the prototype chain from the object and do map checks.
|
| while (object != holder) {
|
| @@ -2231,6 +2236,10 @@
|
| Move(reg, Handle<JSObject>(prototype));
|
| }
|
|
|
| + if (save_at_depth == depth) {
|
| + movq(Operand(rsp, kPointerSize), reg);
|
| + }
|
| +
|
| // Go to the next object in the prototype chain.
|
| object = prototype;
|
| }
|
| @@ -2240,7 +2249,7 @@
|
| j(not_equal, miss);
|
|
|
| // Log the check depth.
|
| - LOG(IntEvent("check-maps-depth", depth));
|
| + LOG(IntEvent("check-maps-depth", depth + 1));
|
|
|
| // Perform security check for access to the global object and return
|
| // the holder register.
|
|
|