| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 284 |
| 285 | 285 |
| 286 Handle<Context> Factory::NewGlobalContext() { | 286 Handle<Context> Factory::NewGlobalContext() { |
| 287 CALL_HEAP_FUNCTION( | 287 CALL_HEAP_FUNCTION( |
| 288 isolate(), | 288 isolate(), |
| 289 isolate()->heap()->AllocateGlobalContext(), | 289 isolate()->heap()->AllocateGlobalContext(), |
| 290 Context); | 290 Context); |
| 291 } | 291 } |
| 292 | 292 |
| 293 | 293 |
| 294 Handle<Context> Factory::NewModuleContext(Handle<Context> previous, |
| 295 Handle<ScopeInfo> scope_info) { |
| 296 CALL_HEAP_FUNCTION( |
| 297 isolate(), |
| 298 isolate()->heap()->AllocateModuleContext(*previous, *scope_info), |
| 299 Context); |
| 300 } |
| 301 |
| 302 |
| 294 Handle<Context> Factory::NewFunctionContext(int length, | 303 Handle<Context> Factory::NewFunctionContext(int length, |
| 295 Handle<JSFunction> function) { | 304 Handle<JSFunction> function) { |
| 296 CALL_HEAP_FUNCTION( | 305 CALL_HEAP_FUNCTION( |
| 297 isolate(), | 306 isolate(), |
| 298 isolate()->heap()->AllocateFunctionContext(length, *function), | 307 isolate()->heap()->AllocateFunctionContext(length, *function), |
| 299 Context); | 308 Context); |
| 300 } | 309 } |
| 301 | 310 |
| 302 | 311 |
| 303 Handle<Context> Factory::NewCatchContext(Handle<JSFunction> function, | 312 Handle<Context> Factory::NewCatchContext(Handle<JSFunction> function, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 317 Handle<Context> Factory::NewWithContext(Handle<JSFunction> function, | 326 Handle<Context> Factory::NewWithContext(Handle<JSFunction> function, |
| 318 Handle<Context> previous, | 327 Handle<Context> previous, |
| 319 Handle<JSObject> extension) { | 328 Handle<JSObject> extension) { |
| 320 CALL_HEAP_FUNCTION( | 329 CALL_HEAP_FUNCTION( |
| 321 isolate(), | 330 isolate(), |
| 322 isolate()->heap()->AllocateWithContext(*function, *previous, *extension), | 331 isolate()->heap()->AllocateWithContext(*function, *previous, *extension), |
| 323 Context); | 332 Context); |
| 324 } | 333 } |
| 325 | 334 |
| 326 | 335 |
| 327 Handle<Context> Factory::NewBlockContext( | 336 Handle<Context> Factory::NewBlockContext(Handle<JSFunction> function, |
| 328 Handle<JSFunction> function, | 337 Handle<Context> previous, |
| 329 Handle<Context> previous, | 338 Handle<ScopeInfo> scope_info) { |
| 330 Handle<ScopeInfo> scope_info) { | |
| 331 CALL_HEAP_FUNCTION( | 339 CALL_HEAP_FUNCTION( |
| 332 isolate(), | 340 isolate(), |
| 333 isolate()->heap()->AllocateBlockContext(*function, | 341 isolate()->heap()->AllocateBlockContext(*function, |
| 334 *previous, | 342 *previous, |
| 335 *scope_info), | 343 *scope_info), |
| 336 Context); | 344 Context); |
| 337 } | 345 } |
| 338 | 346 |
| 339 | 347 |
| 340 Handle<Struct> Factory::NewStruct(InstanceType type) { | 348 Handle<Struct> Factory::NewStruct(InstanceType type) { |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 | 929 |
| 922 | 930 |
| 923 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, | 931 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, |
| 924 PretenureFlag pretenure) { | 932 PretenureFlag pretenure) { |
| 925 CALL_HEAP_FUNCTION( | 933 CALL_HEAP_FUNCTION( |
| 926 isolate(), | 934 isolate(), |
| 927 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); | 935 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); |
| 928 } | 936 } |
| 929 | 937 |
| 930 | 938 |
| 939 Handle<JSModule> Factory::NewJSModule() { |
| 940 CALL_HEAP_FUNCTION( |
| 941 isolate(), |
| 942 isolate()->heap()->AllocateJSModule(), JSModule); |
| 943 } |
| 944 |
| 945 |
| 931 Handle<GlobalObject> Factory::NewGlobalObject( | 946 Handle<GlobalObject> Factory::NewGlobalObject( |
| 932 Handle<JSFunction> constructor) { | 947 Handle<JSFunction> constructor) { |
| 933 CALL_HEAP_FUNCTION(isolate(), | 948 CALL_HEAP_FUNCTION(isolate(), |
| 934 isolate()->heap()->AllocateGlobalObject(*constructor), | 949 isolate()->heap()->AllocateGlobalObject(*constructor), |
| 935 GlobalObject); | 950 GlobalObject); |
| 936 } | 951 } |
| 937 | 952 |
| 938 | 953 |
| 939 | 954 |
| 940 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) { | 955 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) { |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1425 | 1440 |
| 1426 | 1441 |
| 1427 Handle<Object> Factory::ToBoolean(bool value) { | 1442 Handle<Object> Factory::ToBoolean(bool value) { |
| 1428 return Handle<Object>(value | 1443 return Handle<Object>(value |
| 1429 ? isolate()->heap()->true_value() | 1444 ? isolate()->heap()->true_value() |
| 1430 : isolate()->heap()->false_value()); | 1445 : isolate()->heap()->false_value()); |
| 1431 } | 1446 } |
| 1432 | 1447 |
| 1433 | 1448 |
| 1434 } } // namespace v8::internal | 1449 } } // namespace v8::internal |
| OLD | NEW |