OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 | 932 |
933 Handle<GlobalObject> Factory::NewGlobalObject( | 933 Handle<GlobalObject> Factory::NewGlobalObject( |
934 Handle<JSFunction> constructor) { | 934 Handle<JSFunction> constructor) { |
935 CALL_HEAP_FUNCTION(isolate(), | 935 CALL_HEAP_FUNCTION(isolate(), |
936 isolate()->heap()->AllocateGlobalObject(*constructor), | 936 isolate()->heap()->AllocateGlobalObject(*constructor), |
937 GlobalObject); | 937 GlobalObject); |
938 } | 938 } |
939 | 939 |
940 | 940 |
941 | 941 |
942 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) { | 942 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map, |
| 943 PretenureFlag pretenure) { |
943 CALL_HEAP_FUNCTION( | 944 CALL_HEAP_FUNCTION( |
944 isolate(), | 945 isolate(), |
945 isolate()->heap()->AllocateJSObjectFromMap(*map, NOT_TENURED), | 946 isolate()->heap()->AllocateJSObjectFromMap(*map, pretenure), |
946 JSObject); | 947 JSObject); |
947 } | 948 } |
948 | 949 |
949 | 950 |
950 Handle<JSArray> Factory::NewJSArray(int capacity, | 951 Handle<JSArray> Factory::NewJSArray(int capacity, |
951 ElementsKind elements_kind, | 952 ElementsKind elements_kind, |
952 PretenureFlag pretenure) { | 953 PretenureFlag pretenure) { |
953 if (capacity != 0) { | 954 if (capacity != 0) { |
954 elements_kind = GetHoleyElementsKind(elements_kind); | 955 elements_kind = GetHoleyElementsKind(elements_kind); |
955 } | 956 } |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 | 1448 |
1448 | 1449 |
1449 Handle<Object> Factory::ToBoolean(bool value) { | 1450 Handle<Object> Factory::ToBoolean(bool value) { |
1450 return Handle<Object>(value | 1451 return Handle<Object>(value |
1451 ? isolate()->heap()->true_value() | 1452 ? isolate()->heap()->true_value() |
1452 : isolate()->heap()->false_value()); | 1453 : isolate()->heap()->false_value()); |
1453 } | 1454 } |
1454 | 1455 |
1455 | 1456 |
1456 } } // namespace v8::internal | 1457 } } // namespace v8::internal |
OLD | NEW |