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

Side by Side Diff: src/factory.cc

Issue 1488023002: Fix inobject slack tracking for both subclassing and non-subclassing cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved and updated comments about slack tracking Created 5 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/crankshaft/hydrogen.cc ('k') | src/heap/heap.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 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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 array->set_elements(*elms); 1646 array->set_elements(*elms);
1647 array->set_length(Smi::FromInt(length)); 1647 array->set_length(Smi::FromInt(length));
1648 } 1648 }
1649 1649
1650 1650
1651 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject( 1651 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject(
1652 Handle<JSFunction> function) { 1652 Handle<JSFunction> function) {
1653 DCHECK(function->shared()->is_generator()); 1653 DCHECK(function->shared()->is_generator());
1654 JSFunction::EnsureHasInitialMap(function); 1654 JSFunction::EnsureHasInitialMap(function);
1655 Handle<Map> map(function->initial_map()); 1655 Handle<Map> map(function->initial_map());
1656 DCHECK(map->instance_type() == JS_GENERATOR_OBJECT_TYPE); 1656 DCHECK_EQ(JS_GENERATOR_OBJECT_TYPE, map->instance_type());
1657 CALL_HEAP_FUNCTION( 1657 CALL_HEAP_FUNCTION(
1658 isolate(), 1658 isolate(),
1659 isolate()->heap()->AllocateJSObjectFromMap(*map), 1659 isolate()->heap()->AllocateJSObjectFromMap(*map),
1660 JSGeneratorObject); 1660 JSGeneratorObject);
1661 } 1661 }
1662 1662
1663 1663
1664 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer(SharedFlag shared, 1664 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer(SharedFlag shared,
1665 PretenureFlag pretenure) { 1665 PretenureFlag pretenure) {
1666 Handle<JSFunction> array_buffer_fun( 1666 Handle<JSFunction> array_buffer_fun(
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 } 2326 }
2327 2327
2328 2328
2329 Handle<Object> Factory::ToBoolean(bool value) { 2329 Handle<Object> Factory::ToBoolean(bool value) {
2330 return value ? true_value() : false_value(); 2330 return value ? true_value() : false_value();
2331 } 2331 }
2332 2332
2333 2333
2334 } // namespace internal 2334 } // namespace internal
2335 } // namespace v8 2335 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698