| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value); | 983 if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value); |
| 984 if (trace_scope_ != NULL) { | 984 if (trace_scope_ != NULL) { |
| 985 PrintF(trace_scope_->file(), | 985 PrintF(trace_scope_->file(), |
| 986 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 986 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 987 V8PRIxPTR " ; caller's fp\n", | 987 V8PRIxPTR " ; caller's fp\n", |
| 988 fp_value, output_offset, value); | 988 fp_value, output_offset, value); |
| 989 } | 989 } |
| 990 DCHECK(!is_bottommost || !has_alignment_padding_ || | 990 DCHECK(!is_bottommost || !has_alignment_padding_ || |
| 991 (fp_value & kPointerSize) != 0); | 991 (fp_value & kPointerSize) != 0); |
| 992 | 992 |
| 993 if (FLAG_enable_ool_constant_pool) { | 993 if (FLAG_enable_embedded_constant_pool) { |
| 994 // For the bottommost output frame the constant pool pointer can be gotten | 994 // For the bottommost output frame the constant pool pointer can be gotten |
| 995 // from the input frame. For subsequent output frames, it can be read from | 995 // from the input frame. For subsequent output frames, it can be read from |
| 996 // the previous frame. | 996 // the previous frame. |
| 997 output_offset -= kPointerSize; | 997 output_offset -= kPointerSize; |
| 998 input_offset -= kPointerSize; | 998 input_offset -= kPointerSize; |
| 999 if (is_bottommost) { | 999 if (is_bottommost) { |
| 1000 value = input_->GetFrameSlot(input_offset); | 1000 value = input_->GetFrameSlot(input_offset); |
| 1001 } else { | 1001 } else { |
| 1002 value = output_[frame_index - 1]->GetConstantPool(); | 1002 value = output_[frame_index - 1]->GetConstantPool(); |
| 1003 } | 1003 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 Code* non_optimized_code = function->shared()->code(); | 1068 Code* non_optimized_code = function->shared()->code(); |
| 1069 FixedArray* raw_data = non_optimized_code->deoptimization_data(); | 1069 FixedArray* raw_data = non_optimized_code->deoptimization_data(); |
| 1070 DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data); | 1070 DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data); |
| 1071 Address start = non_optimized_code->instruction_start(); | 1071 Address start = non_optimized_code->instruction_start(); |
| 1072 unsigned pc_and_state = GetOutputInfo(data, node_id, function->shared()); | 1072 unsigned pc_and_state = GetOutputInfo(data, node_id, function->shared()); |
| 1073 unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state); | 1073 unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state); |
| 1074 intptr_t pc_value = reinterpret_cast<intptr_t>(start + pc_offset); | 1074 intptr_t pc_value = reinterpret_cast<intptr_t>(start + pc_offset); |
| 1075 output_frame->SetPc(pc_value); | 1075 output_frame->SetPc(pc_value); |
| 1076 | 1076 |
| 1077 // Update constant pool. | 1077 // Update constant pool. |
| 1078 if (FLAG_enable_ool_constant_pool) { | 1078 if (FLAG_enable_embedded_constant_pool) { |
| 1079 intptr_t constant_pool_value = | 1079 intptr_t constant_pool_value = |
| 1080 reinterpret_cast<intptr_t>(non_optimized_code->constant_pool()); | 1080 reinterpret_cast<intptr_t>(non_optimized_code->constant_pool()); |
| 1081 output_frame->SetConstantPool(constant_pool_value); | 1081 output_frame->SetConstantPool(constant_pool_value); |
| 1082 if (is_topmost) { | 1082 if (is_topmost) { |
| 1083 Register constant_pool_reg = | 1083 Register constant_pool_reg = |
| 1084 JavaScriptFrame::constant_pool_pointer_register(); | 1084 JavaScriptFrame::constant_pool_pointer_register(); |
| 1085 output_frame->SetRegister(constant_pool_reg.code(), constant_pool_value); | 1085 output_frame->SetRegister(constant_pool_reg.code(), constant_pool_value); |
| 1086 } | 1086 } |
| 1087 } | 1087 } |
| 1088 | 1088 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 output_frame->SetCallerFp(output_offset, value); | 1161 output_frame->SetCallerFp(output_offset, value); |
| 1162 intptr_t fp_value = top_address + output_offset; | 1162 intptr_t fp_value = top_address + output_offset; |
| 1163 output_frame->SetFp(fp_value); | 1163 output_frame->SetFp(fp_value); |
| 1164 if (trace_scope_ != NULL) { | 1164 if (trace_scope_ != NULL) { |
| 1165 PrintF(trace_scope_->file(), | 1165 PrintF(trace_scope_->file(), |
| 1166 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1166 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1167 V8PRIxPTR " ; caller's fp\n", | 1167 V8PRIxPTR " ; caller's fp\n", |
| 1168 fp_value, output_offset, value); | 1168 fp_value, output_offset, value); |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 if (FLAG_enable_ool_constant_pool) { | 1171 if (FLAG_enable_embedded_constant_pool) { |
| 1172 // Read the caller's constant pool from the previous frame. | 1172 // Read the caller's constant pool from the previous frame. |
| 1173 output_offset -= kPointerSize; | 1173 output_offset -= kPointerSize; |
| 1174 value = output_[frame_index - 1]->GetConstantPool(); | 1174 value = output_[frame_index - 1]->GetConstantPool(); |
| 1175 output_frame->SetCallerConstantPool(output_offset, value); | 1175 output_frame->SetCallerConstantPool(output_offset, value); |
| 1176 if (trace_scope_) { | 1176 if (trace_scope_) { |
| 1177 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1177 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1178 V8PRIxPTR "; caller's constant_pool\n", | 1178 V8PRIxPTR "; caller's constant_pool\n", |
| 1179 top_address + output_offset, output_offset, value); | 1179 top_address + output_offset, output_offset, value); |
| 1180 } | 1180 } |
| 1181 } | 1181 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 | 1216 |
| 1217 DCHECK(0 == output_offset); | 1217 DCHECK(0 == output_offset); |
| 1218 | 1218 |
| 1219 Builtins* builtins = isolate_->builtins(); | 1219 Builtins* builtins = isolate_->builtins(); |
| 1220 Code* adaptor_trampoline = | 1220 Code* adaptor_trampoline = |
| 1221 builtins->builtin(Builtins::kArgumentsAdaptorTrampoline); | 1221 builtins->builtin(Builtins::kArgumentsAdaptorTrampoline); |
| 1222 intptr_t pc_value = reinterpret_cast<intptr_t>( | 1222 intptr_t pc_value = reinterpret_cast<intptr_t>( |
| 1223 adaptor_trampoline->instruction_start() + | 1223 adaptor_trampoline->instruction_start() + |
| 1224 isolate_->heap()->arguments_adaptor_deopt_pc_offset()->value()); | 1224 isolate_->heap()->arguments_adaptor_deopt_pc_offset()->value()); |
| 1225 output_frame->SetPc(pc_value); | 1225 output_frame->SetPc(pc_value); |
| 1226 if (FLAG_enable_ool_constant_pool) { | 1226 if (FLAG_enable_embedded_constant_pool) { |
| 1227 intptr_t constant_pool_value = | 1227 intptr_t constant_pool_value = |
| 1228 reinterpret_cast<intptr_t>(adaptor_trampoline->constant_pool()); | 1228 reinterpret_cast<intptr_t>(adaptor_trampoline->constant_pool()); |
| 1229 output_frame->SetConstantPool(constant_pool_value); | 1229 output_frame->SetConstantPool(constant_pool_value); |
| 1230 } | 1230 } |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 | 1233 |
| 1234 void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator, | 1234 void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator, |
| 1235 int frame_index) { | 1235 int frame_index) { |
| 1236 Builtins* builtins = isolate_->builtins(); | 1236 Builtins* builtins = isolate_->builtins(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 output_frame->SetCallerFp(output_offset, value); | 1295 output_frame->SetCallerFp(output_offset, value); |
| 1296 intptr_t fp_value = top_address + output_offset; | 1296 intptr_t fp_value = top_address + output_offset; |
| 1297 output_frame->SetFp(fp_value); | 1297 output_frame->SetFp(fp_value); |
| 1298 if (trace_scope_ != NULL) { | 1298 if (trace_scope_ != NULL) { |
| 1299 PrintF(trace_scope_->file(), | 1299 PrintF(trace_scope_->file(), |
| 1300 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1300 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1301 V8PRIxPTR " ; caller's fp\n", | 1301 V8PRIxPTR " ; caller's fp\n", |
| 1302 fp_value, output_offset, value); | 1302 fp_value, output_offset, value); |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 if (FLAG_enable_ool_constant_pool) { | 1305 if (FLAG_enable_embedded_constant_pool) { |
| 1306 // Read the caller's constant pool from the previous frame. | 1306 // Read the caller's constant pool from the previous frame. |
| 1307 output_offset -= kPointerSize; | 1307 output_offset -= kPointerSize; |
| 1308 value = output_[frame_index - 1]->GetConstantPool(); | 1308 value = output_[frame_index - 1]->GetConstantPool(); |
| 1309 output_frame->SetCallerConstantPool(output_offset, value); | 1309 output_frame->SetCallerConstantPool(output_offset, value); |
| 1310 if (trace_scope_) { | 1310 if (trace_scope_) { |
| 1311 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1311 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1312 V8PRIxPTR " ; caller's constant pool\n", | 1312 V8PRIxPTR " ; caller's constant pool\n", |
| 1313 top_address + output_offset, output_offset, value); | 1313 top_address + output_offset, output_offset, value); |
| 1314 } | 1314 } |
| 1315 } | 1315 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 V8PRIxPTR " ; allocated receiver\n", | 1383 V8PRIxPTR " ; allocated receiver\n", |
| 1384 top_address + output_offset, output_offset, value); | 1384 top_address + output_offset, output_offset, value); |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 CHECK_EQ(0u, output_offset); | 1387 CHECK_EQ(0u, output_offset); |
| 1388 | 1388 |
| 1389 intptr_t pc = reinterpret_cast<intptr_t>( | 1389 intptr_t pc = reinterpret_cast<intptr_t>( |
| 1390 construct_stub->instruction_start() + | 1390 construct_stub->instruction_start() + |
| 1391 isolate_->heap()->construct_stub_deopt_pc_offset()->value()); | 1391 isolate_->heap()->construct_stub_deopt_pc_offset()->value()); |
| 1392 output_frame->SetPc(pc); | 1392 output_frame->SetPc(pc); |
| 1393 if (FLAG_enable_ool_constant_pool) { | 1393 if (FLAG_enable_embedded_constant_pool) { |
| 1394 intptr_t constant_pool_value = | 1394 intptr_t constant_pool_value = |
| 1395 reinterpret_cast<intptr_t>(construct_stub->constant_pool()); | 1395 reinterpret_cast<intptr_t>(construct_stub->constant_pool()); |
| 1396 output_frame->SetConstantPool(constant_pool_value); | 1396 output_frame->SetConstantPool(constant_pool_value); |
| 1397 } | 1397 } |
| 1398 } | 1398 } |
| 1399 | 1399 |
| 1400 | 1400 |
| 1401 void Deoptimizer::DoComputeAccessorStubFrame(TranslationIterator* iterator, | 1401 void Deoptimizer::DoComputeAccessorStubFrame(TranslationIterator* iterator, |
| 1402 int frame_index, | 1402 int frame_index, |
| 1403 bool is_setter_stub_frame) { | 1403 bool is_setter_stub_frame) { |
| 1404 JSFunction* accessor = JSFunction::cast(ComputeLiteral(iterator->Next())); | 1404 JSFunction* accessor = JSFunction::cast(ComputeLiteral(iterator->Next())); |
| 1405 // The receiver (and the implicit return value, if any) are expected in | 1405 // The receiver (and the implicit return value, if any) are expected in |
| 1406 // registers by the LoadIC/StoreIC, so they don't belong to the output stack | 1406 // registers by the LoadIC/StoreIC, so they don't belong to the output stack |
| 1407 // frame. This means that we have to use a height of 0. | 1407 // frame. This means that we have to use a height of 0. |
| 1408 unsigned height = 0; | 1408 unsigned height = 0; |
| 1409 unsigned height_in_bytes = height * kPointerSize; | 1409 unsigned height_in_bytes = height * kPointerSize; |
| 1410 const char* kind = is_setter_stub_frame ? "setter" : "getter"; | 1410 const char* kind = is_setter_stub_frame ? "setter" : "getter"; |
| 1411 if (trace_scope_ != NULL) { | 1411 if (trace_scope_ != NULL) { |
| 1412 PrintF(trace_scope_->file(), | 1412 PrintF(trace_scope_->file(), |
| 1413 " translating %s stub => height=%u\n", kind, height_in_bytes); | 1413 " translating %s stub => height=%u\n", kind, height_in_bytes); |
| 1414 } | 1414 } |
| 1415 | 1415 |
| 1416 // We need 1 stack entry for the return address and enough entries for the | 1416 // We need 1 stack entry for the return address and enough entries for the |
| 1417 // StackFrame::INTERNAL (FP, context, frame type, code object and constant | 1417 // StackFrame::INTERNAL (FP, context, frame type, code object and constant |
| 1418 // pool (if FLAG_enable_ool_constant_pool)- see MacroAssembler::EnterFrame). | 1418 // pool (if enabled)- see MacroAssembler::EnterFrame). |
| 1419 // For a setter stub frame we need one additional entry for the implicit | 1419 // For a setter stub frame we need one additional entry for the implicit |
| 1420 // return value, see StoreStubCompiler::CompileStoreViaSetter. | 1420 // return value, see StoreStubCompiler::CompileStoreViaSetter. |
| 1421 unsigned fixed_frame_entries = | 1421 unsigned fixed_frame_entries = |
| 1422 (StandardFrameConstants::kFixedFrameSize / kPointerSize) + 1 + | 1422 (StandardFrameConstants::kFixedFrameSize / kPointerSize) + 1 + |
| 1423 (is_setter_stub_frame ? 1 : 0); | 1423 (is_setter_stub_frame ? 1 : 0); |
| 1424 unsigned fixed_frame_size = fixed_frame_entries * kPointerSize; | 1424 unsigned fixed_frame_size = fixed_frame_entries * kPointerSize; |
| 1425 unsigned output_frame_size = height_in_bytes + fixed_frame_size; | 1425 unsigned output_frame_size = height_in_bytes + fixed_frame_size; |
| 1426 | 1426 |
| 1427 // Allocate and store the output frame description. | 1427 // Allocate and store the output frame description. |
| 1428 FrameDescription* output_frame = | 1428 FrameDescription* output_frame = |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1458 output_frame->SetCallerFp(output_offset, value); | 1458 output_frame->SetCallerFp(output_offset, value); |
| 1459 intptr_t fp_value = top_address + output_offset; | 1459 intptr_t fp_value = top_address + output_offset; |
| 1460 output_frame->SetFp(fp_value); | 1460 output_frame->SetFp(fp_value); |
| 1461 if (trace_scope_ != NULL) { | 1461 if (trace_scope_ != NULL) { |
| 1462 PrintF(trace_scope_->file(), | 1462 PrintF(trace_scope_->file(), |
| 1463 " 0x%08" V8PRIxPTR ": [top + %u] <- 0x%08" V8PRIxPTR | 1463 " 0x%08" V8PRIxPTR ": [top + %u] <- 0x%08" V8PRIxPTR |
| 1464 " ; caller's fp\n", | 1464 " ; caller's fp\n", |
| 1465 fp_value, output_offset, value); | 1465 fp_value, output_offset, value); |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 if (FLAG_enable_ool_constant_pool) { | 1468 if (FLAG_enable_embedded_constant_pool) { |
| 1469 // Read the caller's constant pool from the previous frame. | 1469 // Read the caller's constant pool from the previous frame. |
| 1470 output_offset -= kPointerSize; | 1470 output_offset -= kPointerSize; |
| 1471 value = output_[frame_index - 1]->GetConstantPool(); | 1471 value = output_[frame_index - 1]->GetConstantPool(); |
| 1472 output_frame->SetCallerConstantPool(output_offset, value); | 1472 output_frame->SetCallerConstantPool(output_offset, value); |
| 1473 if (trace_scope_) { | 1473 if (trace_scope_) { |
| 1474 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1474 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1475 V8PRIxPTR " ; caller's constant pool\n", | 1475 V8PRIxPTR " ; caller's constant pool\n", |
| 1476 top_address + output_offset, output_offset, value); | 1476 top_address + output_offset, output_offset, value); |
| 1477 } | 1477 } |
| 1478 } | 1478 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 } | 1525 } |
| 1526 | 1526 |
| 1527 CHECK_EQ(0u, output_offset); | 1527 CHECK_EQ(0u, output_offset); |
| 1528 | 1528 |
| 1529 Smi* offset = is_setter_stub_frame ? | 1529 Smi* offset = is_setter_stub_frame ? |
| 1530 isolate_->heap()->setter_stub_deopt_pc_offset() : | 1530 isolate_->heap()->setter_stub_deopt_pc_offset() : |
| 1531 isolate_->heap()->getter_stub_deopt_pc_offset(); | 1531 isolate_->heap()->getter_stub_deopt_pc_offset(); |
| 1532 intptr_t pc = reinterpret_cast<intptr_t>( | 1532 intptr_t pc = reinterpret_cast<intptr_t>( |
| 1533 accessor_stub->instruction_start() + offset->value()); | 1533 accessor_stub->instruction_start() + offset->value()); |
| 1534 output_frame->SetPc(pc); | 1534 output_frame->SetPc(pc); |
| 1535 if (FLAG_enable_ool_constant_pool) { | 1535 if (FLAG_enable_embedded_constant_pool) { |
| 1536 intptr_t constant_pool_value = | 1536 intptr_t constant_pool_value = |
| 1537 reinterpret_cast<intptr_t>(accessor_stub->constant_pool()); | 1537 reinterpret_cast<intptr_t>(accessor_stub->constant_pool()); |
| 1538 output_frame->SetConstantPool(constant_pool_value); | 1538 output_frame->SetConstantPool(constant_pool_value); |
| 1539 } | 1539 } |
| 1540 } | 1540 } |
| 1541 | 1541 |
| 1542 | 1542 |
| 1543 void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator, | 1543 void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator, |
| 1544 int frame_index) { | 1544 int frame_index) { |
| 1545 // | 1545 // |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 intptr_t frame_ptr = input_->GetRegister(fp_reg.code()); | 1632 intptr_t frame_ptr = input_->GetRegister(fp_reg.code()); |
| 1633 output_frame->SetRegister(fp_reg.code(), frame_ptr); | 1633 output_frame->SetRegister(fp_reg.code(), frame_ptr); |
| 1634 output_frame->SetFp(frame_ptr); | 1634 output_frame->SetFp(frame_ptr); |
| 1635 if (trace_scope_ != NULL) { | 1635 if (trace_scope_ != NULL) { |
| 1636 PrintF(trace_scope_->file(), | 1636 PrintF(trace_scope_->file(), |
| 1637 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1637 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1638 V8PRIxPTR " ; caller's fp\n", | 1638 V8PRIxPTR " ; caller's fp\n", |
| 1639 top_address + output_frame_offset, output_frame_offset, value); | 1639 top_address + output_frame_offset, output_frame_offset, value); |
| 1640 } | 1640 } |
| 1641 | 1641 |
| 1642 if (FLAG_enable_ool_constant_pool) { | 1642 if (FLAG_enable_embedded_constant_pool) { |
| 1643 // Read the caller's constant pool from the input frame. | 1643 // Read the caller's constant pool from the input frame. |
| 1644 input_frame_offset -= kPointerSize; | 1644 input_frame_offset -= kPointerSize; |
| 1645 value = input_->GetFrameSlot(input_frame_offset); | 1645 value = input_->GetFrameSlot(input_frame_offset); |
| 1646 output_frame_offset -= kPointerSize; | 1646 output_frame_offset -= kPointerSize; |
| 1647 output_frame->SetCallerConstantPool(output_frame_offset, value); | 1647 output_frame->SetCallerConstantPool(output_frame_offset, value); |
| 1648 if (trace_scope_) { | 1648 if (trace_scope_) { |
| 1649 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1649 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1650 V8PRIxPTR " ; caller's constant_pool\n", | 1650 V8PRIxPTR " ; caller's constant_pool\n", |
| 1651 top_address + output_frame_offset, output_frame_offset, value); | 1651 top_address + output_frame_offset, output_frame_offset, value); |
| 1652 } | 1652 } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 SetPlatformCompiledStubRegisters(output_frame, &descriptor); | 1774 SetPlatformCompiledStubRegisters(output_frame, &descriptor); |
| 1775 | 1775 |
| 1776 // Compute this frame's PC, state, and continuation. | 1776 // Compute this frame's PC, state, and continuation. |
| 1777 Code* trampoline = NULL; | 1777 Code* trampoline = NULL; |
| 1778 StubFunctionMode function_mode = descriptor.function_mode(); | 1778 StubFunctionMode function_mode = descriptor.function_mode(); |
| 1779 StubFailureTrampolineStub(isolate_, | 1779 StubFailureTrampolineStub(isolate_, |
| 1780 function_mode).FindCodeInCache(&trampoline); | 1780 function_mode).FindCodeInCache(&trampoline); |
| 1781 DCHECK(trampoline != NULL); | 1781 DCHECK(trampoline != NULL); |
| 1782 output_frame->SetPc(reinterpret_cast<intptr_t>( | 1782 output_frame->SetPc(reinterpret_cast<intptr_t>( |
| 1783 trampoline->instruction_start())); | 1783 trampoline->instruction_start())); |
| 1784 if (FLAG_enable_ool_constant_pool) { | 1784 if (FLAG_enable_embedded_constant_pool) { |
| 1785 Register constant_pool_reg = | 1785 Register constant_pool_reg = |
| 1786 StubFailureTrampolineFrame::constant_pool_pointer_register(); | 1786 StubFailureTrampolineFrame::constant_pool_pointer_register(); |
| 1787 intptr_t constant_pool_value = | 1787 intptr_t constant_pool_value = |
| 1788 reinterpret_cast<intptr_t>(trampoline->constant_pool()); | 1788 reinterpret_cast<intptr_t>(trampoline->constant_pool()); |
| 1789 output_frame->SetConstantPool(constant_pool_value); | 1789 output_frame->SetConstantPool(constant_pool_value); |
| 1790 output_frame->SetRegister(constant_pool_reg.code(), constant_pool_value); | 1790 output_frame->SetRegister(constant_pool_reg.code(), constant_pool_value); |
| 1791 } | 1791 } |
| 1792 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); | 1792 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); |
| 1793 Code* notify_failure = | 1793 Code* notify_failure = |
| 1794 isolate_->builtins()->builtin(Builtins::kNotifyStubFailureSaveDoubles); | 1794 isolate_->builtins()->builtin(Builtins::kNotifyStubFailureSaveDoubles); |
| (...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3805 int raw_position = static_cast<int>(info->data()); | 3805 int raw_position = static_cast<int>(info->data()); |
| 3806 last_position = raw_position ? SourcePosition::FromRaw(raw_position) | 3806 last_position = raw_position ? SourcePosition::FromRaw(raw_position) |
| 3807 : SourcePosition::Unknown(); | 3807 : SourcePosition::Unknown(); |
| 3808 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { | 3808 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { |
| 3809 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); | 3809 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); |
| 3810 } | 3810 } |
| 3811 } | 3811 } |
| 3812 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); | 3812 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); |
| 3813 } | 3813 } |
| 3814 } } // namespace v8::internal | 3814 } } // namespace v8::internal |
| OLD | NEW |