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

Side by Side Diff: src/stub-cache.cc

Issue 14284010: Introduce HObjectAccess, which is used by LoadNamedField and StoreNamedField to denote what parts (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Split apart ForOffset into ForJSObjectOffset, ForJSArrayOffset, and ForFixedArrayOffset Created 7 years, 7 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
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 JSObject::UpdateMapCodeCache(stub_holder, name, ic); 331 JSObject::UpdateMapCodeCache(stub_holder, name, ic);
332 return ic; 332 return ic;
333 } 333 }
334 334
335 335
336 Handle<Code> StubCache::ComputeKeyedLoadField(Handle<Name> name, 336 Handle<Code> StubCache::ComputeKeyedLoadField(Handle<Name> name,
337 Handle<JSObject> receiver, 337 Handle<JSObject> receiver,
338 Handle<JSObject> holder, 338 Handle<JSObject> holder,
339 PropertyIndex field) { 339 PropertyIndex field) {
340 if (receiver.is_identical_to(holder)) { 340 if (receiver.is_identical_to(holder)) {
341 // TODO(titzer): this should use an HObjectAccess
341 KeyedLoadFieldStub stub(field.is_inobject(holder), 342 KeyedLoadFieldStub stub(field.is_inobject(holder),
342 field.translate(holder)); 343 field.translate(holder));
343 return stub.GetCode(isolate()); 344 return stub.GetCode(isolate());
344 } 345 }
345 346
346 Handle<JSObject> stub_holder = StubHolder(receiver, holder); 347 Handle<JSObject> stub_holder = StubHolder(receiver, holder);
347 Handle<Code> stub = FindHandler( 348 Handle<Code> stub = FindHandler(
348 name, receiver, stub_holder, Code::KEYED_LOAD_IC, Code::FIELD); 349 name, receiver, stub_holder, Code::KEYED_LOAD_IC, Code::FIELD);
349 if (!stub.is_null()) return stub; 350 if (!stub.is_null()) return stub;
350 351
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 Handle<FunctionTemplateInfo>( 2090 Handle<FunctionTemplateInfo>(
2090 FunctionTemplateInfo::cast(signature->receiver())); 2091 FunctionTemplateInfo::cast(signature->receiver()));
2091 } 2092 }
2092 } 2093 }
2093 2094
2094 is_simple_api_call_ = true; 2095 is_simple_api_call_ = true;
2095 } 2096 }
2096 2097
2097 2098
2098 } } // namespace v8::internal 2099 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698