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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 CALL_HEAP_FUNCTION(obj->GetIsolate(), | 414 CALL_HEAP_FUNCTION(obj->GetIsolate(), |
415 obj->SetPrototype(*value, skip_hidden_prototypes), Object); | 415 obj->SetPrototype(*value, skip_hidden_prototypes), Object); |
416 } | 416 } |
417 | 417 |
418 | 418 |
419 Handle<Object> PreventExtensions(Handle<JSObject> object) { | 419 Handle<Object> PreventExtensions(Handle<JSObject> object) { |
420 CALL_HEAP_FUNCTION(object->GetIsolate(), object->PreventExtensions(), Object); | 420 CALL_HEAP_FUNCTION(object->GetIsolate(), object->PreventExtensions(), Object); |
421 } | 421 } |
422 | 422 |
423 | 423 |
424 Handle<Object> GetHiddenProperties(Handle<JSObject> obj, | 424 Handle<Object> SetHiddenProperty(Handle<JSObject> obj, |
425 JSObject::HiddenPropertiesFlag flag) { | 425 Handle<String> key, |
| 426 Handle<Object> value) { |
426 CALL_HEAP_FUNCTION(obj->GetIsolate(), | 427 CALL_HEAP_FUNCTION(obj->GetIsolate(), |
427 obj->GetHiddenProperties(flag), | 428 obj->SetHiddenProperty(*key, *value), |
428 Object); | 429 Object); |
429 } | 430 } |
430 | 431 |
431 | 432 |
432 int GetIdentityHash(Handle<JSObject> obj) { | 433 int GetIdentityHash(Handle<JSReceiver> obj) { |
433 CALL_AND_RETRY(obj->GetIsolate(), | 434 CALL_AND_RETRY(obj->GetIsolate(), |
434 obj->GetIdentityHash(JSObject::ALLOW_CREATION), | 435 obj->GetIdentityHash(ALLOW_CREATION), |
435 return Smi::cast(__object__)->value(), | 436 return Smi::cast(__object__)->value(), |
436 return 0); | 437 return 0); |
437 } | 438 } |
438 | 439 |
439 | 440 |
440 Handle<Object> DeleteElement(Handle<JSObject> obj, | 441 Handle<Object> DeleteElement(Handle<JSObject> obj, |
441 uint32_t index) { | 442 uint32_t index) { |
442 CALL_HEAP_FUNCTION(obj->GetIsolate(), | 443 CALL_HEAP_FUNCTION(obj->GetIsolate(), |
443 obj->DeleteElement(index, JSObject::NORMAL_DELETION), | 444 obj->DeleteElement(index, JSObject::NORMAL_DELETION), |
444 Object); | 445 Object); |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 int num_enum = object->NumberOfEnumProperties(); | 880 int num_enum = object->NumberOfEnumProperties(); |
880 Handle<FixedArray> storage = isolate->factory()->NewFixedArray(num_enum); | 881 Handle<FixedArray> storage = isolate->factory()->NewFixedArray(num_enum); |
881 Handle<FixedArray> sort_array = isolate->factory()->NewFixedArray(num_enum); | 882 Handle<FixedArray> sort_array = isolate->factory()->NewFixedArray(num_enum); |
882 object->property_dictionary()->CopyEnumKeysTo(*storage, *sort_array); | 883 object->property_dictionary()->CopyEnumKeysTo(*storage, *sort_array); |
883 return storage; | 884 return storage; |
884 } | 885 } |
885 } | 886 } |
886 | 887 |
887 | 888 |
888 Handle<ObjectHashTable> PutIntoObjectHashTable(Handle<ObjectHashTable> table, | 889 Handle<ObjectHashTable> PutIntoObjectHashTable(Handle<ObjectHashTable> table, |
889 Handle<JSObject> key, | 890 Handle<JSReceiver> key, |
890 Handle<Object> value) { | 891 Handle<Object> value) { |
891 CALL_HEAP_FUNCTION(table->GetIsolate(), | 892 CALL_HEAP_FUNCTION(table->GetIsolate(), |
892 table->Put(*key, *value), | 893 table->Put(*key, *value), |
893 ObjectHashTable); | 894 ObjectHashTable); |
894 } | 895 } |
895 | 896 |
896 | 897 |
897 bool EnsureCompiled(Handle<SharedFunctionInfo> shared, | 898 bool EnsureCompiled(Handle<SharedFunctionInfo> shared, |
898 ClearExceptionFlag flag) { | 899 ClearExceptionFlag flag) { |
899 return shared->is_compiled() || CompileLazyShared(shared, flag); | 900 return shared->is_compiled() || CompileLazyShared(shared, flag); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 | 938 |
938 bool CompileOptimized(Handle<JSFunction> function, | 939 bool CompileOptimized(Handle<JSFunction> function, |
939 int osr_ast_id, | 940 int osr_ast_id, |
940 ClearExceptionFlag flag) { | 941 ClearExceptionFlag flag) { |
941 CompilationInfo info(function); | 942 CompilationInfo info(function); |
942 info.SetOptimizing(osr_ast_id); | 943 info.SetOptimizing(osr_ast_id); |
943 return CompileLazyHelper(&info, flag); | 944 return CompileLazyHelper(&info, flag); |
944 } | 945 } |
945 | 946 |
946 } } // namespace v8::internal | 947 } } // namespace v8::internal |
OLD | NEW |