| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 286 |
| 287 | 287 |
| 288 Handle<Context> Factory::NewGlobalContext() { | 288 Handle<Context> Factory::NewGlobalContext() { |
| 289 CALL_HEAP_FUNCTION( | 289 CALL_HEAP_FUNCTION( |
| 290 isolate(), | 290 isolate(), |
| 291 isolate()->heap()->AllocateGlobalContext(), | 291 isolate()->heap()->AllocateGlobalContext(), |
| 292 Context); | 292 Context); |
| 293 } | 293 } |
| 294 | 294 |
| 295 | 295 |
| 296 Handle<Context> Factory::NewModuleContext(Handle<Context> previous, | 296 Handle<Context> Factory::NewModuleContext(Handle<ScopeInfo> scope_info) { |
| 297 Handle<ScopeInfo> scope_info) { | |
| 298 CALL_HEAP_FUNCTION( | 297 CALL_HEAP_FUNCTION( |
| 299 isolate(), | 298 isolate(), |
| 300 isolate()->heap()->AllocateModuleContext(*previous, *scope_info), | 299 isolate()->heap()->AllocateModuleContext(*scope_info), |
| 301 Context); | 300 Context); |
| 302 } | 301 } |
| 303 | 302 |
| 304 | 303 |
| 305 Handle<Context> Factory::NewFunctionContext(int length, | 304 Handle<Context> Factory::NewFunctionContext(int length, |
| 306 Handle<JSFunction> function) { | 305 Handle<JSFunction> function) { |
| 307 CALL_HEAP_FUNCTION( | 306 CALL_HEAP_FUNCTION( |
| 308 isolate(), | 307 isolate(), |
| 309 isolate()->heap()->AllocateFunctionContext(length, *function), | 308 isolate()->heap()->AllocateFunctionContext(length, *function), |
| 310 Context); | 309 Context); |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 | 968 |
| 970 | 969 |
| 971 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, | 970 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, |
| 972 PretenureFlag pretenure) { | 971 PretenureFlag pretenure) { |
| 973 CALL_HEAP_FUNCTION( | 972 CALL_HEAP_FUNCTION( |
| 974 isolate(), | 973 isolate(), |
| 975 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); | 974 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); |
| 976 } | 975 } |
| 977 | 976 |
| 978 | 977 |
| 979 Handle<JSModule> Factory::NewJSModule() { | 978 Handle<JSModule> Factory::NewJSModule(Handle<Context> context, |
| 979 Handle<ScopeInfo> scope_info) { |
| 980 CALL_HEAP_FUNCTION( | 980 CALL_HEAP_FUNCTION( |
| 981 isolate(), | 981 isolate(), |
| 982 isolate()->heap()->AllocateJSModule(), JSModule); | 982 isolate()->heap()->AllocateJSModule(*context, *scope_info), JSModule); |
| 983 } | 983 } |
| 984 | 984 |
| 985 | 985 |
| 986 Handle<GlobalObject> Factory::NewGlobalObject( | 986 Handle<GlobalObject> Factory::NewGlobalObject( |
| 987 Handle<JSFunction> constructor) { | 987 Handle<JSFunction> constructor) { |
| 988 CALL_HEAP_FUNCTION(isolate(), | 988 CALL_HEAP_FUNCTION(isolate(), |
| 989 isolate()->heap()->AllocateGlobalObject(*constructor), | 989 isolate()->heap()->AllocateGlobalObject(*constructor), |
| 990 GlobalObject); | 990 GlobalObject); |
| 991 } | 991 } |
| 992 | 992 |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 | 1481 |
| 1482 | 1482 |
| 1483 Handle<Object> Factory::ToBoolean(bool value) { | 1483 Handle<Object> Factory::ToBoolean(bool value) { |
| 1484 return Handle<Object>(value | 1484 return Handle<Object>(value |
| 1485 ? isolate()->heap()->true_value() | 1485 ? isolate()->heap()->true_value() |
| 1486 : isolate()->heap()->false_value()); | 1486 : isolate()->heap()->false_value()); |
| 1487 } | 1487 } |
| 1488 | 1488 |
| 1489 | 1489 |
| 1490 } } // namespace v8::internal | 1490 } } // namespace v8::internal |
| OLD | NEW |