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

Side by Side Diff: src/objects.cc

Issue 2517153002: Introduce set_the_hole(Isolate*, int) and friends (Closed)
Patch Set: merged with master 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 | « src/objects.h ('k') | 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 17510 matching lines...) Expand 10 before | Expand all | Expand 10 after
17521 } else if (current->IsUndefined(isolate)) { 17521 } else if (current->IsUndefined(isolate)) {
17522 undefs--; 17522 undefs--;
17523 } else { 17523 } else {
17524 elements->set(i, current, write_barrier); 17524 elements->set(i, current, write_barrier);
17525 break; 17525 break;
17526 } 17526 }
17527 } 17527 }
17528 } 17528 }
17529 result = undefs; 17529 result = undefs;
17530 while (undefs < holes) { 17530 while (undefs < holes) {
17531 elements->set_undefined(undefs); 17531 elements->set_undefined(isolate, undefs);
17532 undefs++; 17532 undefs++;
17533 } 17533 }
17534 while (holes < limit) { 17534 while (holes < limit) {
17535 elements->set_the_hole(holes); 17535 elements->set_the_hole(isolate, holes);
17536 holes++; 17536 holes++;
17537 } 17537 }
17538 } 17538 }
17539 17539
17540 return isolate->factory()->NewNumberFromUint(result); 17540 return isolate->factory()->NewNumberFromUint(result);
17541 } 17541 }
17542 17542
17543 17543
17544 ExternalArrayType JSTypedArray::type() { 17544 ExternalArrayType JSTypedArray::type() {
17545 switch (elements()->map()->instance_type()) { 17545 switch (elements()->map()->instance_type()) {
(...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after
20418 // depend on this. 20418 // depend on this.
20419 return DICTIONARY_ELEMENTS; 20419 return DICTIONARY_ELEMENTS;
20420 } 20420 }
20421 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20421 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20422 return kind; 20422 return kind;
20423 } 20423 }
20424 } 20424 }
20425 20425
20426 } // namespace internal 20426 } // namespace internal
20427 } // namespace v8 20427 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698