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

Side by Side Diff: src/isolate.cc

Issue 1241883002: Cleanup element normalization logic (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 // shouldn't be performed. 2430 // shouldn't be performed.
2431 return cell_reports_intact; 2431 return cell_reports_intact;
2432 } 2432 }
2433 2433
2434 // Check that the array prototype hasn't been altered WRT empty elements. 2434 // Check that the array prototype hasn't been altered WRT empty elements.
2435 if (root_array_map->prototype() != initial_array_proto) { 2435 if (root_array_map->prototype() != initial_array_proto) {
2436 DCHECK_EQ(false, cell_reports_intact); 2436 DCHECK_EQ(false, cell_reports_intact);
2437 return cell_reports_intact; 2437 return cell_reports_intact;
2438 } 2438 }
2439 2439
2440 if (initial_array_proto->elements() != heap()->empty_fixed_array()) { 2440 FixedArrayBase* elements = initial_array_proto->elements();
2441 if (elements != heap()->empty_fixed_array() &&
2442 elements != heap()->empty_slow_element_dictionary()) {
2441 DCHECK_EQ(false, cell_reports_intact); 2443 DCHECK_EQ(false, cell_reports_intact);
2442 return cell_reports_intact; 2444 return cell_reports_intact;
2443 } 2445 }
2444 2446
2445 // Check that the object prototype hasn't been altered WRT empty elements. 2447 // Check that the object prototype hasn't been altered WRT empty elements.
2446 PrototypeIterator iter(this, initial_array_proto); 2448 PrototypeIterator iter(this, initial_array_proto);
2447 if (iter.IsAtEnd() || iter.GetCurrent() != initial_object_proto) { 2449 if (iter.IsAtEnd() || iter.GetCurrent() != initial_object_proto) {
2448 DCHECK_EQ(false, cell_reports_intact); 2450 DCHECK_EQ(false, cell_reports_intact);
2449 return cell_reports_intact; 2451 return cell_reports_intact;
2450 } 2452 }
2451 if (initial_object_proto->elements() != heap()->empty_fixed_array()) { 2453
2454 elements = initial_object_proto->elements();
2455 if (elements != heap()->empty_fixed_array() &&
2456 elements != heap()->empty_slow_element_dictionary()) {
2452 DCHECK_EQ(false, cell_reports_intact); 2457 DCHECK_EQ(false, cell_reports_intact);
2453 return cell_reports_intact; 2458 return cell_reports_intact;
2454 } 2459 }
2455 2460
2456 iter.Advance(); 2461 iter.Advance();
2457 if (!iter.IsAtEnd()) { 2462 if (!iter.IsAtEnd()) {
2458 DCHECK_EQ(false, cell_reports_intact); 2463 DCHECK_EQ(false, cell_reports_intact);
2459 return cell_reports_intact; 2464 return cell_reports_intact;
2460 } 2465 }
2461 2466
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2807 // Then check whether this scope intercepts. 2812 // Then check whether this scope intercepts.
2808 if ((flag & intercept_mask_)) { 2813 if ((flag & intercept_mask_)) {
2809 intercepted_flags_ |= flag; 2814 intercepted_flags_ |= flag;
2810 return true; 2815 return true;
2811 } 2816 }
2812 return false; 2817 return false;
2813 } 2818 }
2814 2819
2815 } // namespace internal 2820 } // namespace internal
2816 } // namespace v8 2821 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698