| 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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 | 925 |
| 926 | 926 |
| 927 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, | 927 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, |
| 928 PretenureFlag pretenure) { | 928 PretenureFlag pretenure) { |
| 929 CALL_HEAP_FUNCTION( | 929 CALL_HEAP_FUNCTION( |
| 930 isolate(), | 930 isolate(), |
| 931 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); | 931 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); |
| 932 } | 932 } |
| 933 | 933 |
| 934 | 934 |
| 935 Handle<JSObject> Factory::NewJSObjectWithAllocationSiteInfo( |
| 936 Handle<JSFunction> constructor, |
| 937 Handle<Object> payload) { |
| 938 CALL_HEAP_FUNCTION( |
| 939 isolate(), |
| 940 isolate()->heap()->AllocateJSObject(*constructor, |
| 941 NOT_TENURED, |
| 942 TRACK_ALLOCATION_SITE, |
| 943 &payload), JSObject); |
| 944 } |
| 945 |
| 946 |
| 935 Handle<JSModule> Factory::NewJSModule(Handle<Context> context, | 947 Handle<JSModule> Factory::NewJSModule(Handle<Context> context, |
| 936 Handle<ScopeInfo> scope_info) { | 948 Handle<ScopeInfo> scope_info) { |
| 937 CALL_HEAP_FUNCTION( | 949 CALL_HEAP_FUNCTION( |
| 938 isolate(), | 950 isolate(), |
| 939 isolate()->heap()->AllocateJSModule(*context, *scope_info), JSModule); | 951 isolate()->heap()->AllocateJSModule(*context, *scope_info), JSModule); |
| 940 } | 952 } |
| 941 | 953 |
| 942 | 954 |
| 943 Handle<GlobalObject> Factory::NewGlobalObject( | 955 Handle<GlobalObject> Factory::NewGlobalObject( |
| 944 Handle<JSFunction> constructor) { | 956 Handle<JSFunction> constructor) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 961 ElementsKind elements_kind, | 973 ElementsKind elements_kind, |
| 962 PretenureFlag pretenure) { | 974 PretenureFlag pretenure) { |
| 963 if (capacity != 0) { | 975 if (capacity != 0) { |
| 964 elements_kind = GetHoleyElementsKind(elements_kind); | 976 elements_kind = GetHoleyElementsKind(elements_kind); |
| 965 } | 977 } |
| 966 CALL_HEAP_FUNCTION(isolate(), | 978 CALL_HEAP_FUNCTION(isolate(), |
| 967 isolate()->heap()->AllocateJSArrayAndStorage( | 979 isolate()->heap()->AllocateJSArrayAndStorage( |
| 968 elements_kind, | 980 elements_kind, |
| 969 0, | 981 0, |
| 970 capacity, | 982 capacity, |
| 983 DONT_TRACK_ALLOCATION_SITE, |
| 984 NULL, |
| 971 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, | 985 INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, |
| 972 pretenure), | 986 pretenure), |
| 973 JSArray); | 987 JSArray); |
| 974 } | 988 } |
| 975 | 989 |
| 976 | 990 |
| 977 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, | 991 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, |
| 978 ElementsKind elements_kind, | 992 ElementsKind elements_kind, |
| 979 PretenureFlag pretenure) { | 993 PretenureFlag pretenure) { |
| 980 CALL_HEAP_FUNCTION( | 994 CALL_HEAP_FUNCTION( |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 | 1471 |
| 1458 | 1472 |
| 1459 Handle<Object> Factory::ToBoolean(bool value) { | 1473 Handle<Object> Factory::ToBoolean(bool value) { |
| 1460 return Handle<Object>(value | 1474 return Handle<Object>(value |
| 1461 ? isolate()->heap()->true_value() | 1475 ? isolate()->heap()->true_value() |
| 1462 : isolate()->heap()->false_value()); | 1476 : isolate()->heap()->false_value()); |
| 1463 } | 1477 } |
| 1464 | 1478 |
| 1465 | 1479 |
| 1466 } } // namespace v8::internal | 1480 } } // namespace v8::internal |
| OLD | NEW |