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

Side by Side Diff: src/api.cc

Issue 8341009: Make the GC aware of JSReceiver pointers in LookupResults. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Inlined LookupResult constructor and destructor. Created 9 years, 2 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 | « no previous file | src/arm/lithium-codegen-arm.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 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 3092 matching lines...) Expand 10 before | Expand all | Expand 10 after
3103 3103
3104 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain( 3104 Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
3105 Handle<String> key) { 3105 Handle<String> key) {
3106 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3106 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3107 ON_BAILOUT(isolate, 3107 ON_BAILOUT(isolate,
3108 "v8::Object::GetRealNamedPropertyInPrototypeChain()", 3108 "v8::Object::GetRealNamedPropertyInPrototypeChain()",
3109 return Local<Value>()); 3109 return Local<Value>());
3110 ENTER_V8(isolate); 3110 ENTER_V8(isolate);
3111 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this); 3111 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this);
3112 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); 3112 i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
3113 i::LookupResult lookup; 3113 i::LookupResult lookup(isolate);
3114 self_obj->LookupRealNamedPropertyInPrototypes(*key_obj, &lookup); 3114 self_obj->LookupRealNamedPropertyInPrototypes(*key_obj, &lookup);
3115 return GetPropertyByLookup(isolate, self_obj, key_obj, &lookup); 3115 return GetPropertyByLookup(isolate, self_obj, key_obj, &lookup);
3116 } 3116 }
3117 3117
3118 3118
3119 Local<Value> v8::Object::GetRealNamedProperty(Handle<String> key) { 3119 Local<Value> v8::Object::GetRealNamedProperty(Handle<String> key) {
3120 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3120 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3121 ON_BAILOUT(isolate, "v8::Object::GetRealNamedProperty()", 3121 ON_BAILOUT(isolate, "v8::Object::GetRealNamedProperty()",
3122 return Local<Value>()); 3122 return Local<Value>());
3123 ENTER_V8(isolate); 3123 ENTER_V8(isolate);
3124 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this); 3124 i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this);
3125 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); 3125 i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
3126 i::LookupResult lookup; 3126 i::LookupResult lookup(isolate);
3127 self_obj->LookupRealNamedProperty(*key_obj, &lookup); 3127 self_obj->LookupRealNamedProperty(*key_obj, &lookup);
3128 return GetPropertyByLookup(isolate, self_obj, key_obj, &lookup); 3128 return GetPropertyByLookup(isolate, self_obj, key_obj, &lookup);
3129 } 3129 }
3130 3130
3131 3131
3132 // Turns on access checks by copying the map and setting the check flag. 3132 // Turns on access checks by copying the map and setting the check flag.
3133 // Because the object gets a new map, existing inline cache caching 3133 // Because the object gets a new map, existing inline cache caching
3134 // the old map of this object will fail. 3134 // the old map of this object will fail.
3135 void v8::Object::TurnOnAccessCheck() { 3135 void v8::Object::TurnOnAccessCheck() {
3136 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3136 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
(...skipping 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after
6091 6091
6092 6092
6093 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6093 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6094 HandleScopeImplementer* scope_implementer = 6094 HandleScopeImplementer* scope_implementer =
6095 reinterpret_cast<HandleScopeImplementer*>(storage); 6095 reinterpret_cast<HandleScopeImplementer*>(storage);
6096 scope_implementer->IterateThis(v); 6096 scope_implementer->IterateThis(v);
6097 return storage + ArchiveSpacePerThread(); 6097 return storage + ArchiveSpacePerThread();
6098 } 6098 }
6099 6099
6100 } } // namespace v8::internal 6100 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698