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

Side by Side Diff: src/factory.cc

Issue 933533003: Version 4.2.70.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.2.70
Patch Set: Created 5 years, 10 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/heap/heap.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 1788
1789 void SetupArrayBufferView(i::Isolate* isolate, 1789 void SetupArrayBufferView(i::Isolate* isolate,
1790 i::Handle<i::JSArrayBufferView> obj, 1790 i::Handle<i::JSArrayBufferView> obj,
1791 i::Handle<i::JSArrayBuffer> buffer, 1791 i::Handle<i::JSArrayBuffer> buffer,
1792 size_t byte_offset, size_t byte_length) { 1792 size_t byte_offset, size_t byte_length) {
1793 DCHECK(byte_offset + byte_length <= 1793 DCHECK(byte_offset + byte_length <=
1794 static_cast<size_t>(buffer->byte_length()->Number())); 1794 static_cast<size_t>(buffer->byte_length()->Number()));
1795 1795
1796 obj->set_buffer(*buffer); 1796 obj->set_buffer(*buffer);
1797 1797
1798 Heap* heap = isolate->heap(); 1798 obj->set_weak_next(buffer->weak_first_view());
1799 if (heap->InNewSpace(*obj)) { 1799 buffer->set_weak_first_view(*obj);
1800 obj->set_weak_next(heap->new_array_buffer_views_list());
1801 heap->set_new_array_buffer_views_list(*obj);
1802 } else {
1803 obj->set_weak_next(buffer->weak_first_view());
1804 buffer->set_weak_first_view(*obj);
1805 }
1806 1800
1807 i::Handle<i::Object> byte_offset_object = 1801 i::Handle<i::Object> byte_offset_object =
1808 isolate->factory()->NewNumberFromSize(byte_offset); 1802 isolate->factory()->NewNumberFromSize(byte_offset);
1809 obj->set_byte_offset(*byte_offset_object); 1803 obj->set_byte_offset(*byte_offset_object);
1810 1804
1811 i::Handle<i::Object> byte_length_object = 1805 i::Handle<i::Object> byte_length_object =
1812 isolate->factory()->NewNumberFromSize(byte_length); 1806 isolate->factory()->NewNumberFromSize(byte_length);
1813 obj->set_byte_length(*byte_length_object); 1807 obj->set_byte_length(*byte_length_object);
1814 } 1808 }
1815 1809
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 return Handle<Object>::null(); 2328 return Handle<Object>::null();
2335 } 2329 }
2336 2330
2337 2331
2338 Handle<Object> Factory::ToBoolean(bool value) { 2332 Handle<Object> Factory::ToBoolean(bool value) {
2339 return value ? true_value() : false_value(); 2333 return value ? true_value() : false_value();
2340 } 2334 }
2341 2335
2342 2336
2343 } } // namespace v8::internal 2337 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698