Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: src/deoptimizer.cc

Issue 188063002: Fix deoptimization for out-of-line constant pool. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use correct constant pool for stubs. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 PrintF(trace_scope_->file(), 961 PrintF(trace_scope_->file(),
962 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 962 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
963 V8PRIxPTR " ; caller's fp\n", 963 V8PRIxPTR " ; caller's fp\n",
964 fp_value, output_offset, value); 964 fp_value, output_offset, value);
965 } 965 }
966 ASSERT(!is_bottommost || !has_alignment_padding_ || 966 ASSERT(!is_bottommost || !has_alignment_padding_ ||
967 (fp_value & kPointerSize) != 0); 967 (fp_value & kPointerSize) != 0);
968 968
969 if (FLAG_enable_ool_constant_pool) { 969 if (FLAG_enable_ool_constant_pool) {
970 // For the bottommost output frame the constant pool pointer can be gotten 970 // For the bottommost output frame the constant pool pointer can be gotten
971 // from the input frame. For subsequent output frames, it can be gotten from 971 // from the input frame. For subsequent output frames, it can be read from
972 // the function's code. 972 // the previous frame.
973 Register constant_pool_reg =
974 JavaScriptFrame::constant_pool_pointer_register();
975 output_offset -= kPointerSize; 973 output_offset -= kPointerSize;
976 input_offset -= kPointerSize; 974 input_offset -= kPointerSize;
977 if (is_bottommost) { 975 if (is_bottommost) {
978 value = input_->GetFrameSlot(input_offset); 976 value = input_->GetFrameSlot(input_offset);
979 } else { 977 } else {
980 value = reinterpret_cast<intptr_t>( 978 value = output_[frame_index - 1]->GetConstantPool();
981 function->shared()->code()->constant_pool());
982 } 979 }
983 output_frame->SetFrameSlot(output_offset, value); 980 output_frame->SetCallerConstantPool(output_offset, value);
984 output_frame->SetConstantPool(value);
985 if (is_topmost) output_frame->SetRegister(constant_pool_reg.code(), value);
986 if (trace_scope_) { 981 if (trace_scope_) {
987 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 982 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
988 V8PRIxPTR "; constant_pool\n", 983 V8PRIxPTR "; caller's constant_pool\n",
989 top_address + output_offset, output_offset, value); 984 top_address + output_offset, output_offset, value);
990 } 985 }
991 } 986 }
992 987
993 // For the bottommost output frame the context can be gotten from the input 988 // For the bottommost output frame the context can be gotten from the input
994 // frame. For all subsequent output frames it can be gotten from the function 989 // frame. For all subsequent output frames it can be gotten from the function
995 // so long as we don't inline functions that need local contexts. 990 // so long as we don't inline functions that need local contexts.
996 Register context_reg = JavaScriptFrame::context_register(); 991 Register context_reg = JavaScriptFrame::context_register();
997 output_offset -= kPointerSize; 992 output_offset -= kPointerSize;
998 input_offset -= kPointerSize; 993 input_offset -= kPointerSize;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 // Compute this frame's PC, state, and continuation. 1031 // Compute this frame's PC, state, and continuation.
1037 Code* non_optimized_code = function->shared()->code(); 1032 Code* non_optimized_code = function->shared()->code();
1038 FixedArray* raw_data = non_optimized_code->deoptimization_data(); 1033 FixedArray* raw_data = non_optimized_code->deoptimization_data();
1039 DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data); 1034 DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data);
1040 Address start = non_optimized_code->instruction_start(); 1035 Address start = non_optimized_code->instruction_start();
1041 unsigned pc_and_state = GetOutputInfo(data, node_id, function->shared()); 1036 unsigned pc_and_state = GetOutputInfo(data, node_id, function->shared());
1042 unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state); 1037 unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state);
1043 intptr_t pc_value = reinterpret_cast<intptr_t>(start + pc_offset); 1038 intptr_t pc_value = reinterpret_cast<intptr_t>(start + pc_offset);
1044 output_frame->SetPc(pc_value); 1039 output_frame->SetPc(pc_value);
1045 1040
1041 // Update constant pool.
1042 if (FLAG_enable_ool_constant_pool) {
1043 intptr_t constant_pool_value =
1044 reinterpret_cast<intptr_t>(non_optimized_code->constant_pool());
1045 output_frame->SetConstantPool(constant_pool_value);
1046 if (is_topmost) {
1047 Register constant_pool_reg =
1048 JavaScriptFrame::constant_pool_pointer_register();
1049 output_frame->SetRegister(constant_pool_reg.code(), constant_pool_value);
1050 }
1051 }
1052
1046 FullCodeGenerator::State state = 1053 FullCodeGenerator::State state =
1047 FullCodeGenerator::StateField::decode(pc_and_state); 1054 FullCodeGenerator::StateField::decode(pc_and_state);
1048 output_frame->SetState(Smi::FromInt(state)); 1055 output_frame->SetState(Smi::FromInt(state));
1049 1056
1050 // Set the continuation for the topmost frame. 1057 // Set the continuation for the topmost frame.
1051 if (is_topmost && bailout_type_ != DEBUGGER) { 1058 if (is_topmost && bailout_type_ != DEBUGGER) {
1052 Builtins* builtins = isolate_->builtins(); 1059 Builtins* builtins = isolate_->builtins();
1053 Code* continuation = builtins->builtin(Builtins::kNotifyDeoptimized); 1060 Code* continuation = builtins->builtin(Builtins::kNotifyDeoptimized);
1054 if (bailout_type_ == LAZY) { 1061 if (bailout_type_ == LAZY) {
1055 continuation = builtins->builtin(Builtins::kNotifyLazyDeoptimized); 1062 continuation = builtins->builtin(Builtins::kNotifyLazyDeoptimized);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 intptr_t fp_value = top_address + output_offset; 1126 intptr_t fp_value = top_address + output_offset;
1120 output_frame->SetFp(fp_value); 1127 output_frame->SetFp(fp_value);
1121 if (trace_scope_ != NULL) { 1128 if (trace_scope_ != NULL) {
1122 PrintF(trace_scope_->file(), 1129 PrintF(trace_scope_->file(),
1123 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1130 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1124 V8PRIxPTR " ; caller's fp\n", 1131 V8PRIxPTR " ; caller's fp\n",
1125 fp_value, output_offset, value); 1132 fp_value, output_offset, value);
1126 } 1133 }
1127 1134
1128 if (FLAG_enable_ool_constant_pool) { 1135 if (FLAG_enable_ool_constant_pool) {
1129 // A marker value is used in place of the constant pool. 1136 // Read the caller's constant pool from the previous frame.
1130 output_offset -= kPointerSize; 1137 output_offset -= kPointerSize;
1131 intptr_t constant_pool = reinterpret_cast<intptr_t>( 1138 value = output_[frame_index - 1]->GetConstantPool();
1132 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); 1139 output_frame->SetCallerConstantPool(output_offset, value);
1133 output_frame->SetFrameSlot(output_offset, constant_pool);
1134 if (trace_scope_) { 1140 if (trace_scope_) {
1135 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1141 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1136 V8PRIxPTR " ; constant_pool (adaptor sentinel)\n", 1142 V8PRIxPTR "; caller's constant_pool\n",
1137 top_address + output_offset, output_offset, constant_pool); 1143 top_address + output_offset, output_offset, value);
1138 } 1144 }
1139 } 1145 }
1140 1146
1141 // A marker value is used in place of the context. 1147 // A marker value is used in place of the context.
1142 output_offset -= kPointerSize; 1148 output_offset -= kPointerSize;
1143 intptr_t context = reinterpret_cast<intptr_t>( 1149 intptr_t context = reinterpret_cast<intptr_t>(
1144 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); 1150 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
1145 output_frame->SetFrameSlot(output_offset, context); 1151 output_frame->SetFrameSlot(output_offset, context);
1146 if (trace_scope_ != NULL) { 1152 if (trace_scope_ != NULL) {
1147 PrintF(trace_scope_->file(), 1153 PrintF(trace_scope_->file(),
(...skipping 26 matching lines...) Expand all
1174 1180
1175 ASSERT(0 == output_offset); 1181 ASSERT(0 == output_offset);
1176 1182
1177 Builtins* builtins = isolate_->builtins(); 1183 Builtins* builtins = isolate_->builtins();
1178 Code* adaptor_trampoline = 1184 Code* adaptor_trampoline =
1179 builtins->builtin(Builtins::kArgumentsAdaptorTrampoline); 1185 builtins->builtin(Builtins::kArgumentsAdaptorTrampoline);
1180 intptr_t pc_value = reinterpret_cast<intptr_t>( 1186 intptr_t pc_value = reinterpret_cast<intptr_t>(
1181 adaptor_trampoline->instruction_start() + 1187 adaptor_trampoline->instruction_start() +
1182 isolate_->heap()->arguments_adaptor_deopt_pc_offset()->value()); 1188 isolate_->heap()->arguments_adaptor_deopt_pc_offset()->value());
1183 output_frame->SetPc(pc_value); 1189 output_frame->SetPc(pc_value);
1190 if (FLAG_enable_ool_constant_pool) {
1191 intptr_t constant_pool_value =
1192 reinterpret_cast<intptr_t>(adaptor_trampoline->constant_pool());
1193 output_frame->SetConstantPool(constant_pool_value);
1194 }
1184 } 1195 }
1185 1196
1186 1197
1187 void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator, 1198 void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator,
1188 int frame_index) { 1199 int frame_index) {
1189 Builtins* builtins = isolate_->builtins(); 1200 Builtins* builtins = isolate_->builtins();
1190 Code* construct_stub = builtins->builtin(Builtins::kJSConstructStubGeneric); 1201 Code* construct_stub = builtins->builtin(Builtins::kJSConstructStubGeneric);
1191 JSFunction* function = JSFunction::cast(ComputeLiteral(iterator->Next())); 1202 JSFunction* function = JSFunction::cast(ComputeLiteral(iterator->Next()));
1192 unsigned height = iterator->Next(); 1203 unsigned height = iterator->Next();
1193 unsigned height_in_bytes = height * kPointerSize; 1204 unsigned height_in_bytes = height * kPointerSize;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 intptr_t fp_value = top_address + output_offset; 1260 intptr_t fp_value = top_address + output_offset;
1250 output_frame->SetFp(fp_value); 1261 output_frame->SetFp(fp_value);
1251 if (trace_scope_ != NULL) { 1262 if (trace_scope_ != NULL) {
1252 PrintF(trace_scope_->file(), 1263 PrintF(trace_scope_->file(),
1253 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1264 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1254 V8PRIxPTR " ; caller's fp\n", 1265 V8PRIxPTR " ; caller's fp\n",
1255 fp_value, output_offset, value); 1266 fp_value, output_offset, value);
1256 } 1267 }
1257 1268
1258 if (FLAG_enable_ool_constant_pool) { 1269 if (FLAG_enable_ool_constant_pool) {
1259 // The constant pool pointer can be gotten from the previous frame. 1270 // Read the caller's constant pool from the previous frame.
1260 output_offset -= kPointerSize; 1271 output_offset -= kPointerSize;
1261 value = output_[frame_index - 1]->GetConstantPool(); 1272 value = output_[frame_index - 1]->GetConstantPool();
1262 output_frame->SetFrameSlot(output_offset, value); 1273 output_frame->SetCallerConstantPool(output_offset, value);
1263 if (trace_scope_) { 1274 if (trace_scope_) {
1264 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1275 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1265 V8PRIxPTR " ; constant pool\n", 1276 V8PRIxPTR " ; caller's constant pool\n",
1266 top_address + output_offset, output_offset, value); 1277 top_address + output_offset, output_offset, value);
1267 } 1278 }
1268 } 1279 }
1269 1280
1270 // The context can be gotten from the previous frame. 1281 // The context can be gotten from the previous frame.
1271 output_offset -= kPointerSize; 1282 output_offset -= kPointerSize;
1272 value = output_[frame_index - 1]->GetContext(); 1283 value = output_[frame_index - 1]->GetContext();
1273 output_frame->SetFrameSlot(output_offset, value); 1284 output_frame->SetFrameSlot(output_offset, value);
1274 if (trace_scope_ != NULL) { 1285 if (trace_scope_ != NULL) {
1275 PrintF(trace_scope_->file(), 1286 PrintF(trace_scope_->file(),
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 V8PRIxPTR " ; allocated receiver\n", 1347 V8PRIxPTR " ; allocated receiver\n",
1337 top_address + output_offset, output_offset, value); 1348 top_address + output_offset, output_offset, value);
1338 } 1349 }
1339 1350
1340 ASSERT(0 == output_offset); 1351 ASSERT(0 == output_offset);
1341 1352
1342 intptr_t pc = reinterpret_cast<intptr_t>( 1353 intptr_t pc = reinterpret_cast<intptr_t>(
1343 construct_stub->instruction_start() + 1354 construct_stub->instruction_start() +
1344 isolate_->heap()->construct_stub_deopt_pc_offset()->value()); 1355 isolate_->heap()->construct_stub_deopt_pc_offset()->value());
1345 output_frame->SetPc(pc); 1356 output_frame->SetPc(pc);
1357 if (FLAG_enable_ool_constant_pool) {
1358 intptr_t constant_pool_value =
1359 reinterpret_cast<intptr_t>(construct_stub->constant_pool());
1360 output_frame->SetConstantPool(constant_pool_value);
1361 }
1346 } 1362 }
1347 1363
1348 1364
1349 void Deoptimizer::DoComputeAccessorStubFrame(TranslationIterator* iterator, 1365 void Deoptimizer::DoComputeAccessorStubFrame(TranslationIterator* iterator,
1350 int frame_index, 1366 int frame_index,
1351 bool is_setter_stub_frame) { 1367 bool is_setter_stub_frame) {
1352 JSFunction* accessor = JSFunction::cast(ComputeLiteral(iterator->Next())); 1368 JSFunction* accessor = JSFunction::cast(ComputeLiteral(iterator->Next()));
1353 // The receiver (and the implicit return value, if any) are expected in 1369 // The receiver (and the implicit return value, if any) are expected in
1354 // registers by the LoadIC/StoreIC, so they don't belong to the output stack 1370 // registers by the LoadIC/StoreIC, so they don't belong to the output stack
1355 // frame. This means that we have to use a height of 0. 1371 // frame. This means that we have to use a height of 0.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 intptr_t fp_value = top_address + output_offset; 1423 intptr_t fp_value = top_address + output_offset;
1408 output_frame->SetFp(fp_value); 1424 output_frame->SetFp(fp_value);
1409 if (trace_scope_ != NULL) { 1425 if (trace_scope_ != NULL) {
1410 PrintF(trace_scope_->file(), 1426 PrintF(trace_scope_->file(),
1411 " 0x%08" V8PRIxPTR ": [top + %u] <- 0x%08" V8PRIxPTR 1427 " 0x%08" V8PRIxPTR ": [top + %u] <- 0x%08" V8PRIxPTR
1412 " ; caller's fp\n", 1428 " ; caller's fp\n",
1413 fp_value, output_offset, value); 1429 fp_value, output_offset, value);
1414 } 1430 }
1415 1431
1416 if (FLAG_enable_ool_constant_pool) { 1432 if (FLAG_enable_ool_constant_pool) {
1417 // The constant pool pointer can be gotten from the previous frame. 1433 // Read the caller's constant pool from the previous frame.
1418 output_offset -= kPointerSize; 1434 output_offset -= kPointerSize;
1419 value = output_[frame_index - 1]->GetConstantPool(); 1435 value = output_[frame_index - 1]->GetConstantPool();
1420 output_frame->SetFrameSlot(output_offset, value); 1436 output_frame->SetCallerConstantPool(output_offset, value);
1421 if (trace_scope_) { 1437 if (trace_scope_) {
1422 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1438 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1423 V8PRIxPTR " ; constant pool\n", 1439 V8PRIxPTR " ; caller's constant pool\n",
1424 top_address + output_offset, output_offset, value); 1440 top_address + output_offset, output_offset, value);
1425 } 1441 }
1426 } 1442 }
1427 1443
1428 // The context can be gotten from the previous frame. 1444 // The context can be gotten from the previous frame.
1429 output_offset -= kPointerSize; 1445 output_offset -= kPointerSize;
1430 value = output_[frame_index - 1]->GetContext(); 1446 value = output_[frame_index - 1]->GetContext();
1431 output_frame->SetFrameSlot(output_offset, value); 1447 output_frame->SetFrameSlot(output_offset, value);
1432 if (trace_scope_ != NULL) { 1448 if (trace_scope_ != NULL) {
1433 PrintF(trace_scope_->file(), 1449 PrintF(trace_scope_->file(),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 } 1491 }
1476 1492
1477 ASSERT(0 == output_offset); 1493 ASSERT(0 == output_offset);
1478 1494
1479 Smi* offset = is_setter_stub_frame ? 1495 Smi* offset = is_setter_stub_frame ?
1480 isolate_->heap()->setter_stub_deopt_pc_offset() : 1496 isolate_->heap()->setter_stub_deopt_pc_offset() :
1481 isolate_->heap()->getter_stub_deopt_pc_offset(); 1497 isolate_->heap()->getter_stub_deopt_pc_offset();
1482 intptr_t pc = reinterpret_cast<intptr_t>( 1498 intptr_t pc = reinterpret_cast<intptr_t>(
1483 accessor_stub->instruction_start() + offset->value()); 1499 accessor_stub->instruction_start() + offset->value());
1484 output_frame->SetPc(pc); 1500 output_frame->SetPc(pc);
1501 if (FLAG_enable_ool_constant_pool) {
1502 intptr_t constant_pool_value =
1503 reinterpret_cast<intptr_t>(accessor_stub->constant_pool());
1504 output_frame->SetConstantPool(constant_pool_value);
1505 }
1485 } 1506 }
1486 1507
1487 1508
1488 void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator, 1509 void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator,
1489 int frame_index) { 1510 int frame_index) {
1490 // 1511 //
1491 // FROM TO 1512 // FROM TO
1492 // | .... | | .... | 1513 // | .... | | .... |
1493 // +-------------------------+ +-------------------------+ 1514 // +-------------------------+ +-------------------------+
1494 // | JSFunction continuation | | JSFunction continuation | 1515 // | JSFunction continuation | | JSFunction continuation |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 output_frame->SetRegister(fp_reg.code(), frame_ptr); 1599 output_frame->SetRegister(fp_reg.code(), frame_ptr);
1579 output_frame->SetFp(frame_ptr); 1600 output_frame->SetFp(frame_ptr);
1580 if (trace_scope_ != NULL) { 1601 if (trace_scope_ != NULL) {
1581 PrintF(trace_scope_->file(), 1602 PrintF(trace_scope_->file(),
1582 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1603 " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1583 V8PRIxPTR " ; caller's fp\n", 1604 V8PRIxPTR " ; caller's fp\n",
1584 top_address + output_frame_offset, output_frame_offset, value); 1605 top_address + output_frame_offset, output_frame_offset, value);
1585 } 1606 }
1586 1607
1587 if (FLAG_enable_ool_constant_pool) { 1608 if (FLAG_enable_ool_constant_pool) {
1588 // The constant pool pointer can be gotten from the input frame. 1609 // Read the caller's constant pool from the input frame.
1589 Register constant_pool_pointer_register =
1590 StubFailureTrampolineFrame::constant_pool_pointer_register();
1591 input_frame_offset -= kPointerSize; 1610 input_frame_offset -= kPointerSize;
1592 value = input_->GetFrameSlot(input_frame_offset); 1611 value = input_->GetFrameSlot(input_frame_offset);
1593 output_frame->SetRegister(constant_pool_pointer_register.code(), value);
1594 output_frame_offset -= kPointerSize; 1612 output_frame_offset -= kPointerSize;
1595 output_frame->SetFrameSlot(output_frame_offset, value); 1613 output_frame->SetCallerConstantPool(output_frame_offset, value);
1596 if (trace_scope_) { 1614 if (trace_scope_) {
1597 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1615 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1598 V8PRIxPTR " ; constant_pool_pointer\n", 1616 V8PRIxPTR " ; caller's constant_pool\n",
1599 top_address + output_frame_offset, output_frame_offset, value); 1617 top_address + output_frame_offset, output_frame_offset, value);
1600 } 1618 }
1601 } 1619 }
1602 1620
1603 // The context can be gotten from the input frame. 1621 // The context can be gotten from the input frame.
1604 Register context_reg = StubFailureTrampolineFrame::context_register(); 1622 Register context_reg = StubFailureTrampolineFrame::context_register();
1605 input_frame_offset -= kPointerSize; 1623 input_frame_offset -= kPointerSize;
1606 value = input_->GetFrameSlot(input_frame_offset); 1624 value = input_->GetFrameSlot(input_frame_offset);
1607 output_frame->SetRegister(context_reg.code(), value); 1625 output_frame->SetRegister(context_reg.code(), value);
1608 output_frame_offset -= kPointerSize; 1626 output_frame_offset -= kPointerSize;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 SetPlatformCompiledStubRegisters(output_frame, descriptor); 1740 SetPlatformCompiledStubRegisters(output_frame, descriptor);
1723 1741
1724 // Compute this frame's PC, state, and continuation. 1742 // Compute this frame's PC, state, and continuation.
1725 Code* trampoline = NULL; 1743 Code* trampoline = NULL;
1726 StubFunctionMode function_mode = descriptor->function_mode_; 1744 StubFunctionMode function_mode = descriptor->function_mode_;
1727 StubFailureTrampolineStub(function_mode).FindCodeInCache(&trampoline, 1745 StubFailureTrampolineStub(function_mode).FindCodeInCache(&trampoline,
1728 isolate_); 1746 isolate_);
1729 ASSERT(trampoline != NULL); 1747 ASSERT(trampoline != NULL);
1730 output_frame->SetPc(reinterpret_cast<intptr_t>( 1748 output_frame->SetPc(reinterpret_cast<intptr_t>(
1731 trampoline->instruction_start())); 1749 trampoline->instruction_start()));
1750 if (FLAG_enable_ool_constant_pool) {
1751 Register constant_pool_reg =
1752 StubFailureTrampolineFrame::constant_pool_pointer_register();
1753 intptr_t constant_pool_value =
1754 reinterpret_cast<intptr_t>(trampoline->constant_pool());
1755 output_frame->SetConstantPool(constant_pool_value);
1756 output_frame->SetRegister(constant_pool_reg.code(), constant_pool_value);
1757 }
1732 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); 1758 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS));
1733 Code* notify_failure = NotifyStubFailureBuiltin(); 1759 Code* notify_failure = NotifyStubFailureBuiltin();
1734 output_frame->SetContinuation( 1760 output_frame->SetContinuation(
1735 reinterpret_cast<intptr_t>(notify_failure->entry())); 1761 reinterpret_cast<intptr_t>(notify_failure->entry()));
1736 } 1762 }
1737 1763
1738 1764
1739 Handle<Object> Deoptimizer::MaterializeNextHeapObject() { 1765 Handle<Object> Deoptimizer::MaterializeNextHeapObject() {
1740 int object_index = materialization_object_index_++; 1766 int object_index = materialization_object_index_++;
1741 ObjectMaterializationDescriptor desc = deferred_objects_[object_index]; 1767 ObjectMaterializationDescriptor desc = deferred_objects_[object_index];
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
3471 3497
3472 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3498 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3473 v->VisitPointer(BitCast<Object**>(&function_)); 3499 v->VisitPointer(BitCast<Object**>(&function_));
3474 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3500 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3475 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3501 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3476 } 3502 }
3477 3503
3478 #endif // ENABLE_DEBUGGER_SUPPORT 3504 #endif // ENABLE_DEBUGGER_SUPPORT
3479 3505
3480 } } // namespace v8::internal 3506 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698