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

Side by Side Diff: src/handles.cc

Issue 227593004: Handlify LookupSingleCharacterStringFromCode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/hydrogen-instructions.cc » ('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 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 Handle<Object> GetProperty(Handle<JSReceiver> obj, 173 Handle<Object> GetProperty(Handle<JSReceiver> obj,
174 const char* name) { 174 const char* name) {
175 Isolate* isolate = obj->GetIsolate(); 175 Isolate* isolate = obj->GetIsolate();
176 Handle<String> str = isolate->factory()->InternalizeUtf8String(name); 176 Handle<String> str = isolate->factory()->InternalizeUtf8String(name);
177 ASSERT(!str.is_null()); 177 ASSERT(!str.is_null());
178 return Object::GetPropertyOrElement(obj, str); 178 return Object::GetPropertyOrElement(obj, str);
179 } 179 }
180 180
181 181
182 Handle<String> LookupSingleCharacterStringFromCode(Isolate* isolate,
183 uint32_t index) {
184 CALL_HEAP_FUNCTION(
185 isolate,
186 isolate->heap()->LookupSingleCharacterStringFromCode(index),
187 String);
188 }
189
190
191 // Wrappers for scripts are kept alive and cached in weak global 182 // Wrappers for scripts are kept alive and cached in weak global
192 // handles referred from foreign objects held by the scripts as long as 183 // handles referred from foreign objects held by the scripts as long as
193 // they are used. When they are not used anymore, the garbage 184 // they are used. When they are not used anymore, the garbage
194 // collector will call the weak callback on the global handle 185 // collector will call the weak callback on the global handle
195 // associated with the wrapper and get rid of both the wrapper and the 186 // associated with the wrapper and get rid of both the wrapper and the
196 // handle. 187 // handle.
197 static void ClearWrapperCache( 188 static void ClearWrapperCache(
198 const v8::WeakCallbackData<v8::Value, void>& data) { 189 const v8::WeakCallbackData<v8::Value, void>& data) {
199 Object** location = reinterpret_cast<Object**>(data.GetParameter()); 190 Object** location = reinterpret_cast<Object**>(data.GetParameter());
200 JSValue* wrapper = JSValue::cast(*location); 191 JSValue* wrapper = JSValue::cast(*location);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 Handle<Code> code) { 734 Handle<Code> code) {
744 heap->EnsureWeakObjectToCodeTable(); 735 heap->EnsureWeakObjectToCodeTable();
745 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); 736 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object));
746 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); 737 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code);
747 CALL_HEAP_FUNCTION_VOID(heap->isolate(), 738 CALL_HEAP_FUNCTION_VOID(heap->isolate(),
748 heap->AddWeakObjectToCodeDependency(*object, *dep)); 739 heap->AddWeakObjectToCodeDependency(*object, *dep));
749 } 740 }
750 741
751 742
752 } } // namespace v8::internal 743 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.h ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698