Chromium Code Reviews| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 DCHECK(info()->IsStub()); | 376 DCHECK(info()->IsStub()); |
| 377 RestoreCallerDoubles(); | 377 RestoreCallerDoubles(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 // Add the base address to the offset previously loaded in entry_offset. | 380 // Add the base address to the offset previously loaded in entry_offset. |
| 381 __ add(entry_offset, entry_offset, | 381 __ add(entry_offset, entry_offset, |
| 382 Operand(ExternalReference::ForDeoptEntry(base))); | 382 Operand(ExternalReference::ForDeoptEntry(base))); |
| 383 __ bx(entry_offset); | 383 __ bx(entry_offset); |
| 384 } | 384 } |
| 385 | 385 |
| 386 // Force constant pool emission at the end of the deopt jump table to make | 386 if (FLAG_enable_embedded_constant_pool) { |
| 387 // sure that no constant pools are emitted after. | 387 masm()->EmitConstantPool(); |
|
rmcilroy
2015/05/20 14:32:10
Same question as full-codegen
MTBrandyberry
2015/05/20 22:28:22
See earlier response.
| |
| 388 masm()->CheckConstPool(true, false); | 388 } else { |
| 389 // Force constant pool emission at the end of the deopt jump table to make | |
| 390 // sure that no constant pools are emitted after. | |
| 391 masm()->CheckConstPool(true, false); | |
| 392 } | |
| 389 | 393 |
| 390 // The deoptimization jump table is the last part of the instruction | 394 // The deoptimization jump table is the last part of the instruction |
| 391 // sequence. Mark the generated code as done unless we bailed out. | 395 // sequence. Mark the generated code as done unless we bailed out. |
| 392 if (!is_aborted()) status_ = DONE; | 396 if (!is_aborted()) status_ = DONE; |
| 393 return !is_aborted(); | 397 return !is_aborted(); |
| 394 } | 398 } |
| 395 | 399 |
| 396 | 400 |
| 397 bool LCodeGen::GenerateSafepointTable() { | 401 bool LCodeGen::GenerateSafepointTable() { |
| 398 DCHECK(is_done()); | 402 DCHECK(is_done()); |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1009 Safepoint safepoint = safepoints_.DefineSafepoint(masm(), | 1013 Safepoint safepoint = safepoints_.DefineSafepoint(masm(), |
| 1010 kind, arguments, deopt_mode); | 1014 kind, arguments, deopt_mode); |
| 1011 for (int i = 0; i < operands->length(); i++) { | 1015 for (int i = 0; i < operands->length(); i++) { |
| 1012 LOperand* pointer = operands->at(i); | 1016 LOperand* pointer = operands->at(i); |
| 1013 if (pointer->IsStackSlot()) { | 1017 if (pointer->IsStackSlot()) { |
| 1014 safepoint.DefinePointerSlot(pointer->index(), zone()); | 1018 safepoint.DefinePointerSlot(pointer->index(), zone()); |
| 1015 } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { | 1019 } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { |
| 1016 safepoint.DefinePointerRegister(ToRegister(pointer), zone()); | 1020 safepoint.DefinePointerRegister(ToRegister(pointer), zone()); |
| 1017 } | 1021 } |
| 1018 } | 1022 } |
| 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 } | 1023 } |
| 1024 | 1024 |
| 1025 | 1025 |
| 1026 void LCodeGen::RecordSafepoint(LPointerMap* pointers, | 1026 void LCodeGen::RecordSafepoint(LPointerMap* pointers, |
| 1027 Safepoint::DeoptMode deopt_mode) { | 1027 Safepoint::DeoptMode deopt_mode) { |
| 1028 RecordSafepoint(pointers, Safepoint::kSimple, 0, deopt_mode); | 1028 RecordSafepoint(pointers, Safepoint::kSimple, 0, deopt_mode); |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 | 1031 |
| 1032 void LCodeGen::RecordSafepoint(Safepoint::DeoptMode deopt_mode) { | 1032 void LCodeGen::RecordSafepoint(Safepoint::DeoptMode deopt_mode) { |
| (...skipping 4919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5952 __ Push(scope_info); | 5952 __ Push(scope_info); |
| 5953 __ push(ToRegister(instr->function())); | 5953 __ push(ToRegister(instr->function())); |
| 5954 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5954 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5955 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5955 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5956 } | 5956 } |
| 5957 | 5957 |
| 5958 | 5958 |
| 5959 #undef __ | 5959 #undef __ |
| 5960 | 5960 |
| 5961 } } // namespace v8::internal | 5961 } } // namespace v8::internal |
| OLD | NEW |