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

Side by Side Diff: src/objects.cc

Issue 2554343002: [runtime] Add instance size check for CheckEquivalent(). (Closed)
Patch Set: Fix the header size calculation for modules. Created 4 years 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
« no previous file with comments | « no previous file | src/objects-inl.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 12278 matching lines...) Expand 10 before | Expand all | Expand 10 after
12289 } 12289 }
12290 return true; 12290 return true;
12291 } 12291 }
12292 12292
12293 12293
12294 bool Map::EquivalentToForNormalization(Map* other, 12294 bool Map::EquivalentToForNormalization(Map* other,
12295 PropertyNormalizationMode mode) { 12295 PropertyNormalizationMode mode) {
12296 int properties = 12296 int properties =
12297 mode == CLEAR_INOBJECT_PROPERTIES ? 0 : other->GetInObjectProperties(); 12297 mode == CLEAR_INOBJECT_PROPERTIES ? 0 : other->GetInObjectProperties();
12298 return CheckEquivalent(this, other) && bit_field2() == other->bit_field2() && 12298 return CheckEquivalent(this, other) && bit_field2() == other->bit_field2() &&
12299 GetInObjectProperties() == properties; 12299 GetInObjectProperties() == properties &&
12300 JSObject::GetInternalFieldCount(this) ==
12301 JSObject::GetInternalFieldCount(other);
12300 } 12302 }
12301 12303
12302 12304
12303 bool JSFunction::Inlines(SharedFunctionInfo* candidate) { 12305 bool JSFunction::Inlines(SharedFunctionInfo* candidate) {
12304 DisallowHeapAllocation no_gc; 12306 DisallowHeapAllocation no_gc;
12305 if (shared() == candidate) return true; 12307 if (shared() == candidate) return true;
12306 if (code()->kind() != Code::OPTIMIZED_FUNCTION) return false; 12308 if (code()->kind() != Code::OPTIMIZED_FUNCTION) return false;
12307 DeoptimizationInputData* const data = 12309 DeoptimizationInputData* const data =
12308 DeoptimizationInputData::cast(code()->deoptimization_data()); 12310 DeoptimizationInputData::cast(code()->deoptimization_data());
12309 if (data->length() == 0) return false; 12311 if (data->length() == 0) return false;
(...skipping 8124 matching lines...) Expand 10 before | Expand all | Expand 10 after
20434 // depend on this. 20436 // depend on this.
20435 return DICTIONARY_ELEMENTS; 20437 return DICTIONARY_ELEMENTS;
20436 } 20438 }
20437 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20439 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20438 return kind; 20440 return kind;
20439 } 20441 }
20440 } 20442 }
20441 20443
20442 } // namespace internal 20444 } // namespace internal
20443 } // namespace v8 20445 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698