| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 } | 493 } |
| 494 | 494 |
| 495 // Go to the next object in the prototype chain. | 495 // Go to the next object in the prototype chain. |
| 496 current = prototype; | 496 current = prototype; |
| 497 current_map = handle(current->map()); | 497 current_map = handle(current->map()); |
| 498 } | 498 } |
| 499 | 499 |
| 500 // Log the check depth. | 500 // Log the check depth. |
| 501 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); | 501 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
| 502 | 502 |
| 503 if (!current_map->IsJSGlobalObjectMap() && | 503 if (depth != 0 || check == CHECK_ALL_MAPS) { |
| 504 (depth != 0 || check == CHECK_ALL_MAPS)) { | |
| 505 __ movp(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); | 504 __ movp(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); |
| 506 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); | 505 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); |
| 507 __ CmpWeakValue(scratch1, cell, scratch2); | 506 __ CmpWeakValue(scratch1, cell, scratch2); |
| 508 __ j(not_equal, miss); | 507 __ j(not_equal, miss); |
| 509 } | 508 } |
| 510 | 509 |
| 511 // Return the register containing the holder. | 510 // Return the register containing the holder. |
| 512 return reg; | 511 return reg; |
| 513 } | 512 } |
| 514 | 513 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 // Return the generated code. | 759 // Return the generated code. |
| 761 return GetCode(kind(), Code::NORMAL, name); | 760 return GetCode(kind(), Code::NORMAL, name); |
| 762 } | 761 } |
| 763 | 762 |
| 764 | 763 |
| 765 #undef __ | 764 #undef __ |
| 766 } | 765 } |
| 767 } // namespace v8::internal | 766 } // namespace v8::internal |
| 768 | 767 |
| 769 #endif // V8_TARGET_ARCH_X64 | 768 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |