| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 230 } |
| 231 | 231 |
| 232 | 232 |
| 233 Handle<Object> SetElement(Handle<JSObject> object, | 233 Handle<Object> SetElement(Handle<JSObject> object, |
| 234 uint32_t index, | 234 uint32_t index, |
| 235 Handle<Object> value) { | 235 Handle<Object> value) { |
| 236 CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object); | 236 CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object); |
| 237 } | 237 } |
| 238 | 238 |
| 239 | 239 |
| 240 Handle<JSObject> Copy(Handle<JSObject> obj, PretenureFlag pretenure) { | 240 Handle<JSObject> Copy(Handle<JSObject> obj) { |
| 241 CALL_HEAP_FUNCTION(obj->Copy(pretenure), JSObject); | 241 CALL_HEAP_FUNCTION(Heap::CopyJSObject(*obj), JSObject); |
| 242 } | 242 } |
| 243 | 243 |
| 244 | 244 |
| 245 // Wrappers for scripts are kept alive and cached in weak global | 245 // Wrappers for scripts are kept alive and cached in weak global |
| 246 // handles referred from proxy objects held by the scripts as long as | 246 // handles referred from proxy objects held by the scripts as long as |
| 247 // they are used. When they are not used anymore, the garbage | 247 // they are used. When they are not used anymore, the garbage |
| 248 // collector will call the weak callback on the global handle | 248 // collector will call the weak callback on the global handle |
| 249 // associated with the wrapper and get rid of both the wrapper and the | 249 // associated with the wrapper and get rid of both the wrapper and the |
| 250 // handle. | 250 // handle. |
| 251 static void ClearWrapperCache(Persistent<v8::Object> handle, void*) { | 251 static void ClearWrapperCache(Persistent<v8::Object> handle, void*) { |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 Handle<Context> compile_context, | 540 Handle<Context> compile_context, |
| 541 Handle<Context> function_context) { | 541 Handle<Context> function_context) { |
| 542 Handle<FixedArray> arr = Factory::NewFixedArray(3); | 542 Handle<FixedArray> arr = Factory::NewFixedArray(3); |
| 543 arr->set(0, Smi::FromInt(index)); | 543 arr->set(0, Smi::FromInt(index)); |
| 544 arr->set(1, *compile_context); // Compile in this context | 544 arr->set(1, *compile_context); // Compile in this context |
| 545 arr->set(2, *function_context); // Set function context to this | 545 arr->set(2, *function_context); // Set function context to this |
| 546 fun->shared()->set_lazy_load_data(*arr); | 546 fun->shared()->set_lazy_load_data(*arr); |
| 547 } | 547 } |
| 548 | 548 |
| 549 } } // namespace v8::internal | 549 } } // namespace v8::internal |
| OLD | NEW |