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

Side by Side Diff: src/objects.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 | « src/hydrogen.cc ('k') | src/parser.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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 7179 matching lines...) Expand 10 before | Expand all | Expand 10 after
7190 bool IsIterating() { 7190 bool IsIterating() {
7191 return (*IteratorField())->IsSmi() && 7191 return (*IteratorField())->IsSmi() &&
7192 Smi::cast(*IteratorField())->value() < 0; 7192 Smi::cast(*IteratorField())->value() < 0;
7193 } 7193 }
7194 7194
7195 Map* Next() { 7195 Map* Next() {
7196 DCHECK(IsIterating()); 7196 DCHECK(IsIterating());
7197 int value = Smi::cast(*IteratorField())->value(); 7197 int value = Smi::cast(*IteratorField())->value();
7198 int index = -value - 1; 7198 int index = -value - 1;
7199 int number_of_transitions = transition_array_->number_of_transitions(); 7199 int number_of_transitions = transition_array_->number_of_transitions();
7200 while (index < number_of_transitions) { 7200 if (index < number_of_transitions) {
7201 *IteratorField() = Smi::FromInt(value - 1); 7201 *IteratorField() = Smi::FromInt(value - 1);
7202 return transition_array_->GetTarget(index); 7202 return transition_array_->GetTarget(index);
7203 } 7203 }
7204 7204
7205 *IteratorField() = constructor_; 7205 *IteratorField() = constructor_;
7206 return NULL; 7206 return NULL;
7207 } 7207 }
7208 7208
7209 private: 7209 private:
7210 Object** IteratorField() { 7210 Object** IteratorField() {
(...skipping 9354 matching lines...) Expand 10 before | Expand all | Expand 10 after
16565 Handle<DependentCode> codes = 16565 Handle<DependentCode> codes =
16566 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16566 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16567 DependentCode::kPropertyCellChangedGroup, 16567 DependentCode::kPropertyCellChangedGroup,
16568 info->object_wrapper()); 16568 info->object_wrapper());
16569 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16569 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16570 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16570 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16571 cell, info->zone()); 16571 cell, info->zone());
16572 } 16572 }
16573 16573
16574 } } // namespace v8::internal 16574 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698