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 // Wrappers for scripts are kept alive and cached in weak global | 156 // Wrappers for scripts are kept alive and cached in weak global |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 Handle<Code> code) { | 708 Handle<Code> code) { |
735 heap->EnsureWeakObjectToCodeTable(); | 709 heap->EnsureWeakObjectToCodeTable(); |
736 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); | 710 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); |
737 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); | 711 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); |
738 CALL_HEAP_FUNCTION_VOID(heap->isolate(), | 712 CALL_HEAP_FUNCTION_VOID(heap->isolate(), |
739 heap->AddWeakObjectToCodeDependency(*object, *dep)); | 713 heap->AddWeakObjectToCodeDependency(*object, *dep)); |
740 } | 714 } |
741 | 715 |
742 | 716 |
743 } } // namespace v8::internal | 717 } } // namespace v8::internal |
OLD | NEW |