Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: src/handles.cc

Issue 7754015: Implement identity hashes for proxies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/handles.h ('k') | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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> GetHiddenProperties(Handle<JSObject> obj, CreationFlag flag) {
425 JSObject::HiddenPropertiesFlag flag) {
426 CALL_HEAP_FUNCTION(obj->GetIsolate(), 425 CALL_HEAP_FUNCTION(obj->GetIsolate(),
427 obj->GetHiddenProperties(flag), 426 obj->GetHiddenProperties(flag),
428 Object); 427 Object);
429 } 428 }
430 429
431 430
432 int GetIdentityHash(Handle<JSObject> obj) { 431 int GetIdentityHash(Handle<JSReceiver> obj) {
433 CALL_AND_RETRY(obj->GetIsolate(), 432 CALL_AND_RETRY(obj->GetIsolate(),
434 obj->GetIdentityHash(JSObject::ALLOW_CREATION), 433 obj->GetIdentityHash(ALLOW_CREATION),
435 return Smi::cast(__object__)->value(), 434 return Smi::cast(__object__)->value(),
436 return 0); 435 return 0);
437 } 436 }
438 437
439 438
440 Handle<Object> DeleteElement(Handle<JSObject> obj, 439 Handle<Object> DeleteElement(Handle<JSObject> obj,
441 uint32_t index) { 440 uint32_t index) {
442 CALL_HEAP_FUNCTION(obj->GetIsolate(), 441 CALL_HEAP_FUNCTION(obj->GetIsolate(),
443 obj->DeleteElement(index, JSObject::NORMAL_DELETION), 442 obj->DeleteElement(index, JSObject::NORMAL_DELETION),
444 Object); 443 Object);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 int num_enum = object->NumberOfEnumProperties(); 876 int num_enum = object->NumberOfEnumProperties();
878 Handle<FixedArray> storage = isolate->factory()->NewFixedArray(num_enum); 877 Handle<FixedArray> storage = isolate->factory()->NewFixedArray(num_enum);
879 Handle<FixedArray> sort_array = isolate->factory()->NewFixedArray(num_enum); 878 Handle<FixedArray> sort_array = isolate->factory()->NewFixedArray(num_enum);
880 object->property_dictionary()->CopyEnumKeysTo(*storage, *sort_array); 879 object->property_dictionary()->CopyEnumKeysTo(*storage, *sort_array);
881 return storage; 880 return storage;
882 } 881 }
883 } 882 }
884 883
885 884
886 Handle<ObjectHashTable> PutIntoObjectHashTable(Handle<ObjectHashTable> table, 885 Handle<ObjectHashTable> PutIntoObjectHashTable(Handle<ObjectHashTable> table,
887 Handle<JSObject> key, 886 Handle<JSReceiver> key,
888 Handle<Object> value) { 887 Handle<Object> value) {
889 CALL_HEAP_FUNCTION(table->GetIsolate(), 888 CALL_HEAP_FUNCTION(table->GetIsolate(),
890 table->Put(*key, *value), 889 table->Put(*key, *value),
891 ObjectHashTable); 890 ObjectHashTable);
892 } 891 }
893 892
894 893
895 bool EnsureCompiled(Handle<SharedFunctionInfo> shared, 894 bool EnsureCompiled(Handle<SharedFunctionInfo> shared,
896 ClearExceptionFlag flag) { 895 ClearExceptionFlag flag) {
897 return shared->is_compiled() || CompileLazyShared(shared, flag); 896 return shared->is_compiled() || CompileLazyShared(shared, flag);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 949
951 bool CompileOptimized(Handle<JSFunction> function, 950 bool CompileOptimized(Handle<JSFunction> function,
952 int osr_ast_id, 951 int osr_ast_id,
953 ClearExceptionFlag flag) { 952 ClearExceptionFlag flag) {
954 CompilationInfo info(function); 953 CompilationInfo info(function);
955 info.SetOptimizing(osr_ast_id); 954 info.SetOptimizing(osr_ast_id);
956 return CompileLazyHelper(&info, flag); 955 return CompileLazyHelper(&info, flag);
957 } 956 }
958 957
959 } } // namespace v8::internal 958 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698