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

Side by Side Diff: src/deoptimizer.cc

Issue 185563004: Fix a few nits found by PVS Studio (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 1 month 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 | src/hydrogen.cc » ('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 // 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/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/disasm.h" 10 #include "src/disasm.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 return base->area_start() + (id * table_entry_size_); 686 return base->area_start() + (id * table_entry_size_);
687 } 687 }
688 688
689 689
690 int Deoptimizer::GetDeoptimizationId(Isolate* isolate, 690 int Deoptimizer::GetDeoptimizationId(Isolate* isolate,
691 Address addr, 691 Address addr,
692 BailoutType type) { 692 BailoutType type) {
693 DeoptimizerData* data = isolate->deoptimizer_data(); 693 DeoptimizerData* data = isolate->deoptimizer_data();
694 MemoryChunk* base = data->deopt_entry_code_[type]; 694 MemoryChunk* base = data->deopt_entry_code_[type];
695 Address start = base->area_start(); 695 Address start = base->area_start();
696 if (base == NULL || 696 if (addr < start ||
697 addr < start ||
698 addr >= start + (kMaxNumberOfEntries * table_entry_size_)) { 697 addr >= start + (kMaxNumberOfEntries * table_entry_size_)) {
699 return kNotDeoptimizationEntry; 698 return kNotDeoptimizationEntry;
700 } 699 }
701 DCHECK_EQ(0, 700 DCHECK_EQ(0,
702 static_cast<int>(addr - start) % table_entry_size_); 701 static_cast<int>(addr - start) % table_entry_size_);
703 return static_cast<int>(addr - start) / table_entry_size_; 702 return static_cast<int>(addr - start) / table_entry_size_;
704 } 703 }
705 704
706 705
707 int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data, 706 int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
(...skipping 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after
3628 3627
3629 3628
3630 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3629 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3631 v->VisitPointer(bit_cast<Object**>(&function_)); 3630 v->VisitPointer(bit_cast<Object**>(&function_));
3632 v->VisitPointer(&context_); 3631 v->VisitPointer(&context_);
3633 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3632 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3634 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3633 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3635 } 3634 }
3636 3635
3637 } } // namespace v8::internal 3636 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698