| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 Handle<Context> Factory::NewGlobalContext() { | 245 Handle<Context> Factory::NewGlobalContext() { |
| 246 CALL_HEAP_FUNCTION( | 246 CALL_HEAP_FUNCTION( |
| 247 isolate(), | 247 isolate(), |
| 248 isolate()->heap()->AllocateGlobalContext(), | 248 isolate()->heap()->AllocateGlobalContext(), |
| 249 Context); | 249 Context); |
| 250 } | 250 } |
| 251 | 251 |
| 252 | 252 |
| 253 Handle<Context> Factory::NewFunctionContext(int length, | 253 Handle<Context> Factory::NewFunctionContext(int length, |
| 254 Handle<JSFunction> closure) { | 254 Handle<JSFunction> function) { |
| 255 CALL_HEAP_FUNCTION( | 255 CALL_HEAP_FUNCTION( |
| 256 isolate(), | 256 isolate(), |
| 257 isolate()->heap()->AllocateFunctionContext(length, *closure), | 257 isolate()->heap()->AllocateFunctionContext(length, *function), |
| 258 Context); | 258 Context); |
| 259 } | 259 } |
| 260 | 260 |
| 261 | 261 |
| 262 Handle<Context> Factory::NewCatchContext(Handle<Context> previous, | 262 Handle<Context> Factory::NewCatchContext(Handle<JSFunction> function, |
| 263 Handle<Context> previous, |
| 263 Handle<String> name, | 264 Handle<String> name, |
| 264 Handle<Object> thrown_object) { | 265 Handle<Object> thrown_object) { |
| 265 CALL_HEAP_FUNCTION( | 266 CALL_HEAP_FUNCTION( |
| 266 isolate(), | 267 isolate(), |
| 267 isolate()->heap()->AllocateCatchContext(*previous, *name, *thrown_object), | 268 isolate()->heap()->AllocateCatchContext(*function, |
| 269 *previous, |
| 270 *name, |
| 271 *thrown_object), |
| 268 Context); | 272 Context); |
| 269 } | 273 } |
| 270 | 274 |
| 271 | 275 |
| 272 Handle<Context> Factory::NewWithContext(Handle<Context> previous, | 276 Handle<Context> Factory::NewWithContext(Handle<JSFunction> function, |
| 277 Handle<Context> previous, |
| 273 Handle<JSObject> extension) { | 278 Handle<JSObject> extension) { |
| 274 CALL_HEAP_FUNCTION( | 279 CALL_HEAP_FUNCTION( |
| 275 isolate(), | 280 isolate(), |
| 276 isolate()->heap()->AllocateWithContext(*previous, *extension), | 281 isolate()->heap()->AllocateWithContext(*function, *previous, *extension), |
| 277 Context); | 282 Context); |
| 278 } | 283 } |
| 279 | 284 |
| 280 | 285 |
| 281 Handle<Struct> Factory::NewStruct(InstanceType type) { | 286 Handle<Struct> Factory::NewStruct(InstanceType type) { |
| 282 CALL_HEAP_FUNCTION( | 287 CALL_HEAP_FUNCTION( |
| 283 isolate(), | 288 isolate(), |
| 284 isolate()->heap()->AllocateStruct(type), | 289 isolate()->heap()->AllocateStruct(type), |
| 285 Struct); | 290 Struct); |
| 286 } | 291 } |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 Execution::ConfigureInstance(instance, | 1245 Execution::ConfigureInstance(instance, |
| 1241 instance_template, | 1246 instance_template, |
| 1242 pending_exception); | 1247 pending_exception); |
| 1243 } else { | 1248 } else { |
| 1244 *pending_exception = false; | 1249 *pending_exception = false; |
| 1245 } | 1250 } |
| 1246 } | 1251 } |
| 1247 | 1252 |
| 1248 | 1253 |
| 1249 } } // namespace v8::internal | 1254 } } // namespace v8::internal |
| OLD | NEW |