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