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

Side by Side Diff: src/factory.cc

Issue 238273006: Remove some direct uses of heap allocators from runtime.cc (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.h ('k') | src/runtime.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 "factory.h" 5 #include "factory.h"
6 6
7 #include "isolate-inl.h" 7 #include "isolate-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 1547
1548 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, 1548 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler,
1549 Handle<Object> prototype) { 1549 Handle<Object> prototype) {
1550 CALL_HEAP_FUNCTION( 1550 CALL_HEAP_FUNCTION(
1551 isolate(), 1551 isolate(),
1552 isolate()->heap()->AllocateJSProxy(*handler, *prototype), 1552 isolate()->heap()->AllocateJSProxy(*handler, *prototype),
1553 JSProxy); 1553 JSProxy);
1554 } 1554 }
1555 1555
1556 1556
1557 Handle<JSProxy> Factory::NewJSFunctionProxy(Handle<Object> handler,
1558 Handle<Object> call_trap,
1559 Handle<Object> construct_trap,
1560 Handle<Object> prototype) {
1561 CALL_HEAP_FUNCTION(
1562 isolate(),
1563 isolate()->heap()->AllocateJSFunctionProxy(
1564 *handler, *call_trap, *construct_trap, *prototype),
1565 JSProxy);
1566 }
1567
1568
1557 void Factory::BecomeJSObject(Handle<JSReceiver> object) { 1569 void Factory::BecomeJSObject(Handle<JSReceiver> object) {
1558 CALL_HEAP_FUNCTION_VOID( 1570 CALL_HEAP_FUNCTION_VOID(
1559 isolate(), 1571 isolate(),
1560 isolate()->heap()->ReinitializeJSReceiver( 1572 isolate()->heap()->ReinitializeJSReceiver(
1561 *object, JS_OBJECT_TYPE, JSObject::kHeaderSize)); 1573 *object, JS_OBJECT_TYPE, JSObject::kHeaderSize));
1562 } 1574 }
1563 1575
1564 1576
1565 void Factory::BecomeJSFunction(Handle<JSReceiver> object) { 1577 void Factory::BecomeJSFunction(Handle<JSReceiver> object) {
1566 CALL_HEAP_FUNCTION_VOID( 1578 CALL_HEAP_FUNCTION_VOID(
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 if (String::Equals(name, infinity_string())) return infinity_value(); 2018 if (String::Equals(name, infinity_string())) return infinity_value();
2007 return Handle<Object>::null(); 2019 return Handle<Object>::null();
2008 } 2020 }
2009 2021
2010 2022
2011 Handle<Object> Factory::ToBoolean(bool value) { 2023 Handle<Object> Factory::ToBoolean(bool value) {
2012 return value ? true_value() : false_value(); 2024 return value ? true_value() : false_value();
2013 } 2025 }
2014 2026
2015 } } // namespace v8::internal 2027 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698