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

Side by Side Diff: src/deoptimizer.cc

Issue 7283043: Fix compilation on 64-bit Windows build. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 Address top, intptr_t size, DeoptimizedFrameInfo* info) { 550 Address top, intptr_t size, DeoptimizedFrameInfo* info) {
551 ASSERT_EQ(DEBUGGER, bailout_type_); 551 ASSERT_EQ(DEBUGGER, bailout_type_);
552 for (int i = 0; i < deferred_heap_numbers_.length(); i++) { 552 for (int i = 0; i < deferred_heap_numbers_.length(); i++) {
553 HeapNumberMaterializationDescriptor d = deferred_heap_numbers_[i]; 553 HeapNumberMaterializationDescriptor d = deferred_heap_numbers_[i];
554 554
555 // Check of the heap number to materialize actually belong to the frame 555 // Check of the heap number to materialize actually belong to the frame
556 // being extracted. 556 // being extracted.
557 Address slot = d.slot_address(); 557 Address slot = d.slot_address();
558 if (top <= slot && slot < top + size) { 558 if (top <= slot && slot < top + size) {
559 Handle<Object> num = isolate_->factory()->NewNumber(d.value()); 559 Handle<Object> num = isolate_->factory()->NewNumber(d.value());
560 int expression_index = 560 int expression_index = static_cast<int>(
561 info->expression_count_ - (slot - top) / kPointerSize - 1; 561 info->expression_count_ - (slot - top) / kPointerSize - 1);
562 if (FLAG_trace_deopt) { 562 if (FLAG_trace_deopt) {
563 PrintF("Materializing a new heap number %p [%e] in slot %p" 563 PrintF("Materializing a new heap number %p [%e] in slot %p"
564 "for expression stack index %d\n", 564 "for expression stack index %d\n",
565 reinterpret_cast<void*>(*num), 565 reinterpret_cast<void*>(*num),
566 d.value(), 566 d.value(),
567 d.slot_address(), 567 d.slot_address(),
568 expression_index); 568 expression_index);
569 } 569 }
570 info->SetExpression(expression_index, *num); 570 info->SetExpression(expression_index, *num);
571 } 571 }
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 // Incoming parameter. 1121 // Incoming parameter.
1122 unsigned base = static_cast<unsigned>(GetFrameSize() - 1122 unsigned base = static_cast<unsigned>(GetFrameSize() -
1123 deoptimizer->ComputeIncomingArgumentSize(GetFunction())); 1123 deoptimizer->ComputeIncomingArgumentSize(GetFunction()));
1124 return base - ((slot_index + 1) * kPointerSize); 1124 return base - ((slot_index + 1) * kPointerSize);
1125 } 1125 }
1126 } 1126 }
1127 1127
1128 1128
1129 unsigned FrameDescription::GetExpressionCount(Deoptimizer* deoptimizer) { 1129 unsigned FrameDescription::GetExpressionCount(Deoptimizer* deoptimizer) {
1130 ASSERT_EQ(Code::FUNCTION, kind_); 1130 ASSERT_EQ(Code::FUNCTION, kind_);
1131 return (GetFrameSize() - deoptimizer->ComputeFixedSize(GetFunction())) 1131 intptr_t size = GetFrameSize() - deoptimizer->ComputeFixedSize(GetFunction());
1132 / kPointerSize; 1132 return static_cast<unsigned>(size / kPointerSize);
1133 } 1133 }
1134 1134
1135 1135
1136 Object* FrameDescription::GetExpression(Deoptimizer* deoptimizer, int index) { 1136 Object* FrameDescription::GetExpression(Deoptimizer* deoptimizer, int index) {
1137 ASSERT_EQ(Code::FUNCTION, kind_); 1137 ASSERT_EQ(Code::FUNCTION, kind_);
1138 unsigned offset = GetOffsetFromSlotIndex(deoptimizer, index); 1138 unsigned offset = GetOffsetFromSlotIndex(deoptimizer, index);
1139 return reinterpret_cast<Object*>(*GetFrameSlotPointer(offset)); 1139 return reinterpret_cast<Object*>(*GetFrameSlotPointer(offset));
1140 } 1140 }
1141 1141
1142 1142
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 DeoptimizedFrameInfo::~DeoptimizedFrameInfo() { 1426 DeoptimizedFrameInfo::~DeoptimizedFrameInfo() {
1427 delete expression_stack_; 1427 delete expression_stack_;
1428 } 1428 }
1429 1429
1430 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 1430 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
1431 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 1431 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
1432 } 1432 }
1433 1433
1434 1434
1435 } } // namespace v8::internal 1435 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698