| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 #ifdef DEBUG | 107 #ifdef DEBUG |
| 108 if (strlen(FLAG_stop_at) > 0 && | 108 if (strlen(FLAG_stop_at) > 0 && |
| 109 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 109 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
| 110 __ stop("stop_at"); | 110 __ stop("stop_at"); |
| 111 } | 111 } |
| 112 #endif | 112 #endif |
| 113 | 113 |
| 114 // r1: Callee's JS function. | 114 // r1: Callee's JS function. |
| 115 // cp: Callee's context. | 115 // cp: Callee's context. |
| 116 // pp: Callee's constant pool pointer (if FLAG_enable_ool_constant_pool) | 116 // pp: Callee's constant pool pointer (if enabled) |
| 117 // fp: Caller's frame pointer. | 117 // fp: Caller's frame pointer. |
| 118 // lr: Caller's pc. | 118 // lr: Caller's pc. |
| 119 | 119 |
| 120 // Sloppy mode functions and builtins need to replace the receiver with the | 120 // Sloppy mode functions and builtins need to replace the receiver with the |
| 121 // global proxy when called as functions (without an explicit receiver | 121 // global proxy when called as functions (without an explicit receiver |
| 122 // object). | 122 // object). |
| 123 if (is_sloppy(info_->language_mode()) && info()->MayUseThis() && | 123 if (is_sloppy(info_->language_mode()) && info()->MayUseThis() && |
| 124 !info_->is_native()) { | 124 !info_->is_native()) { |
| 125 Label ok; | 125 Label ok; |
| 126 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; | 126 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 Safepoint safepoint = safepoints_.DefineSafepoint(masm(), | 1009 Safepoint safepoint = safepoints_.DefineSafepoint(masm(), |
| 1010 kind, arguments, deopt_mode); | 1010 kind, arguments, deopt_mode); |
| 1011 for (int i = 0; i < operands->length(); i++) { | 1011 for (int i = 0; i < operands->length(); i++) { |
| 1012 LOperand* pointer = operands->at(i); | 1012 LOperand* pointer = operands->at(i); |
| 1013 if (pointer->IsStackSlot()) { | 1013 if (pointer->IsStackSlot()) { |
| 1014 safepoint.DefinePointerSlot(pointer->index(), zone()); | 1014 safepoint.DefinePointerSlot(pointer->index(), zone()); |
| 1015 } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { | 1015 } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { |
| 1016 safepoint.DefinePointerRegister(ToRegister(pointer), zone()); | 1016 safepoint.DefinePointerRegister(ToRegister(pointer), zone()); |
| 1017 } | 1017 } |
| 1018 } | 1018 } |
| 1019 if (FLAG_enable_ool_constant_pool && (kind & Safepoint::kWithRegisters)) { | |
| 1020 // Register pp always contains a pointer to the constant pool. | |
| 1021 safepoint.DefinePointerRegister(pp, zone()); | |
| 1022 } | |
| 1023 } | 1019 } |
| 1024 | 1020 |
| 1025 | 1021 |
| 1026 void LCodeGen::RecordSafepoint(LPointerMap* pointers, | 1022 void LCodeGen::RecordSafepoint(LPointerMap* pointers, |
| 1027 Safepoint::DeoptMode deopt_mode) { | 1023 Safepoint::DeoptMode deopt_mode) { |
| 1028 RecordSafepoint(pointers, Safepoint::kSimple, 0, deopt_mode); | 1024 RecordSafepoint(pointers, Safepoint::kSimple, 0, deopt_mode); |
| 1029 } | 1025 } |
| 1030 | 1026 |
| 1031 | 1027 |
| 1032 void LCodeGen::RecordSafepoint(Safepoint::DeoptMode deopt_mode) { | 1028 void LCodeGen::RecordSafepoint(Safepoint::DeoptMode deopt_mode) { |
| (...skipping 4919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5952 __ Push(scope_info); | 5948 __ Push(scope_info); |
| 5953 __ push(ToRegister(instr->function())); | 5949 __ push(ToRegister(instr->function())); |
| 5954 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5950 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5955 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5951 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5956 } | 5952 } |
| 5957 | 5953 |
| 5958 | 5954 |
| 5959 #undef __ | 5955 #undef __ |
| 5960 | 5956 |
| 5961 } } // namespace v8::internal | 5957 } } // namespace v8::internal |
| OLD | NEW |