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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 } | 491 } |
492 | 492 |
493 // Go to the next object in the prototype chain. | 493 // Go to the next object in the prototype chain. |
494 current = prototype; | 494 current = prototype; |
495 current_map = handle(current->map()); | 495 current_map = handle(current->map()); |
496 } | 496 } |
497 | 497 |
498 // Log the check depth. | 498 // Log the check depth. |
499 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); | 499 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
500 | 500 |
501 if (depth != 0 || check == CHECK_ALL_MAPS) { | 501 if (!current_map->IsJSGlobalObjectMap() && |
| 502 (depth != 0 || check == CHECK_ALL_MAPS)) { |
502 // Check the holder map. | 503 // Check the holder map. |
503 __ mov(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); | 504 __ mov(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); |
504 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); | 505 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); |
505 __ CmpWeakValue(scratch1, cell, scratch2); | 506 __ CmpWeakValue(scratch1, cell, scratch2); |
506 __ j(not_equal, miss); | 507 __ j(not_equal, miss); |
507 } | 508 } |
508 | 509 |
509 // Return the register containing the holder. | 510 // Return the register containing the holder. |
510 return reg; | 511 return reg; |
511 } | 512 } |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 // Return the generated code. | 767 // Return the generated code. |
767 return GetCode(kind(), Code::NORMAL, name); | 768 return GetCode(kind(), Code::NORMAL, name); |
768 } | 769 } |
769 | 770 |
770 | 771 |
771 #undef __ | 772 #undef __ |
772 } | 773 } |
773 } // namespace v8::internal | 774 } // namespace v8::internal |
774 | 775 |
775 #endif // V8_TARGET_ARCH_IA32 | 776 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |