| 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 3713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3724 | 3724 |
| 3725 void PrepareExternalArrayElements(i::Handle<i::JSObject> object, | 3725 void PrepareExternalArrayElements(i::Handle<i::JSObject> object, |
| 3726 void* data, | 3726 void* data, |
| 3727 ExternalArrayType array_type, | 3727 ExternalArrayType array_type, |
| 3728 int length) { | 3728 int length) { |
| 3729 i::Isolate* isolate = object->GetIsolate(); | 3729 i::Isolate* isolate = object->GetIsolate(); |
| 3730 i::Handle<i::ExternalArray> array = | 3730 i::Handle<i::ExternalArray> array = |
| 3731 isolate->factory()->NewExternalArray(length, array_type, data); | 3731 isolate->factory()->NewExternalArray(length, array_type, data); |
| 3732 | 3732 |
| 3733 i::Handle<i::Map> external_array_map = | 3733 i::Handle<i::Map> external_array_map = |
| 3734 isolate->factory()->GetElementsTransitionMap( | 3734 i::JSObject::GetElementsTransitionMap( |
| 3735 object, | 3735 object, |
| 3736 GetElementsKindFromExternalArrayType(array_type)); | 3736 GetElementsKindFromExternalArrayType(array_type)); |
| 3737 | 3737 |
| 3738 object->set_map(*external_array_map); | 3738 object->set_map(*external_array_map); |
| 3739 object->set_elements(*array); | 3739 object->set_elements(*array); |
| 3740 } | 3740 } |
| 3741 | 3741 |
| 3742 } // namespace | 3742 } // namespace |
| 3743 | 3743 |
| 3744 | 3744 |
| (...skipping 3890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7635 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7635 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7636 Address callback_address = | 7636 Address callback_address = |
| 7637 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7637 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7638 VMState<EXTERNAL> state(isolate); | 7638 VMState<EXTERNAL> state(isolate); |
| 7639 ExternalCallbackScope call_scope(isolate, callback_address); | 7639 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7640 callback(info); | 7640 callback(info); |
| 7641 } | 7641 } |
| 7642 | 7642 |
| 7643 | 7643 |
| 7644 } } // namespace v8::internal | 7644 } } // namespace v8::internal |
| OLD | NEW |