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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 // in LookupForRead(). | 431 // in LookupForRead(). |
432 if (current_map->IsJSGlobalProxyMap()) { | 432 if (current_map->IsJSGlobalProxyMap()) { |
433 __ CheckAccessGlobalProxy(reg, scratch2, miss); | 433 __ CheckAccessGlobalProxy(reg, scratch2, miss); |
434 } else if (current_map->IsJSGlobalObjectMap()) { | 434 } else if (current_map->IsJSGlobalObjectMap()) { |
435 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current), | 435 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current), |
436 name, scratch2, miss); | 436 name, scratch2, miss); |
437 } | 437 } |
438 | 438 |
439 reg = holder_reg; // From now on the object will be in holder_reg. | 439 reg = holder_reg; // From now on the object will be in holder_reg. |
440 | 440 |
441 // Two possible reasons for loading the prototype from the map: | 441 __ ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); |
442 // (1) Can't store references to new space in code. | |
443 // (2) Handler is shared for all receivers with the same prototype | |
444 // map (but not necessarily the same prototype instance). | |
445 bool load_prototype_from_map = | |
446 heap()->InNewSpace(*prototype) || depth == 1; | |
447 if (load_prototype_from_map) { | |
448 __ ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); | |
449 } else { | |
450 __ mov(reg, Operand(prototype)); | |
451 } | |
452 } | 442 } |
453 | 443 |
454 // Go to the next object in the prototype chain. | 444 // Go to the next object in the prototype chain. |
455 current = prototype; | 445 current = prototype; |
456 current_map = handle(current->map()); | 446 current_map = handle(current->map()); |
457 } | 447 } |
458 | 448 |
459 // Log the check depth. | 449 // Log the check depth. |
460 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); | 450 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
461 | 451 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 // Return the generated code. | 679 // Return the generated code. |
690 return GetCode(kind(), Code::NORMAL, name); | 680 return GetCode(kind(), Code::NORMAL, name); |
691 } | 681 } |
692 | 682 |
693 | 683 |
694 #undef __ | 684 #undef __ |
695 } | 685 } |
696 } // namespace v8::internal | 686 } // namespace v8::internal |
697 | 687 |
698 #endif // V8_TARGET_ARCH_ARM | 688 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |