| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 void FlattenString(Handle<String> string) { | 137 void FlattenString(Handle<String> string) { |
| 138 CALL_HEAP_FUNCTION_VOID(string->GetIsolate(), string->TryFlatten()); | 138 CALL_HEAP_FUNCTION_VOID(string->GetIsolate(), string->TryFlatten()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 | 141 |
| 142 Handle<String> FlattenGetString(Handle<String> string) { | 142 Handle<String> FlattenGetString(Handle<String> string) { |
| 143 CALL_HEAP_FUNCTION(string->GetIsolate(), string->TryFlatten(), String); | 143 CALL_HEAP_FUNCTION(string->GetIsolate(), string->TryFlatten(), String); |
| 144 } | 144 } |
| 145 | 145 |
| 146 | 146 |
| 147 Handle<Object> DeleteProperty(Handle<JSObject> object, Handle<Object> key) { | |
| 148 Isolate* isolate = object->GetIsolate(); | |
| 149 CALL_HEAP_FUNCTION(isolate, | |
| 150 Runtime::DeleteObjectProperty( | |
| 151 isolate, object, key, JSReceiver::NORMAL_DELETION), | |
| 152 Object); | |
| 153 } | |
| 154 | |
| 155 | |
| 156 Handle<Object> ForceDeleteProperty(Handle<JSObject> object, | |
| 157 Handle<Object> key) { | |
| 158 Isolate* isolate = object->GetIsolate(); | |
| 159 CALL_HEAP_FUNCTION(isolate, | |
| 160 Runtime::DeleteObjectProperty( | |
| 161 isolate, object, key, JSReceiver::FORCE_DELETION), | |
| 162 Object); | |
| 163 } | |
| 164 | |
| 165 | |
| 166 Handle<Object> HasProperty(Handle<JSReceiver> obj, Handle<Object> key) { | |
| 167 Isolate* isolate = obj->GetIsolate(); | |
| 168 CALL_HEAP_FUNCTION(isolate, | |
| 169 Runtime::HasObjectProperty(isolate, obj, key), Object); | |
| 170 } | |
| 171 | |
| 172 | |
| 173 Handle<Object> GetProperty(Handle<JSReceiver> obj, | 147 Handle<Object> GetProperty(Handle<JSReceiver> obj, |
| 174 const char* name) { | 148 const char* name) { |
| 175 Isolate* isolate = obj->GetIsolate(); | 149 Isolate* isolate = obj->GetIsolate(); |
| 176 Handle<String> str = isolate->factory()->InternalizeUtf8String(name); | 150 Handle<String> str = isolate->factory()->InternalizeUtf8String(name); |
| 177 ASSERT(!str.is_null()); | 151 ASSERT(!str.is_null()); |
| 178 return Object::GetPropertyOrElement(obj, str); | 152 return Object::GetPropertyOrElement(obj, str); |
| 179 } | 153 } |
| 180 | 154 |
| 181 | 155 |
| 182 Handle<String> LookupSingleCharacterStringFromCode(Isolate* isolate, | 156 Handle<String> LookupSingleCharacterStringFromCode(Isolate* isolate, |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 Handle<Code> code) { | 717 Handle<Code> code) { |
| 744 heap->EnsureWeakObjectToCodeTable(); | 718 heap->EnsureWeakObjectToCodeTable(); |
| 745 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); | 719 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); |
| 746 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); | 720 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); |
| 747 CALL_HEAP_FUNCTION_VOID(heap->isolate(), | 721 CALL_HEAP_FUNCTION_VOID(heap->isolate(), |
| 748 heap->AddWeakObjectToCodeDependency(*object, *dep)); | 722 heap->AddWeakObjectToCodeDependency(*object, *dep)); |
| 749 } | 723 } |
| 750 | 724 |
| 751 | 725 |
| 752 } } // namespace v8::internal | 726 } } // namespace v8::internal |
| OLD | NEW |