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

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: Use BitField utility instead of C-language bitfield for portion and offset in HObjectAccess. 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
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/x64/lithium-x64.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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 return ic; 334 return ic;
335 } 335 }
336 336
337 337
338 Handle<Code> StubCache::ComputeKeyedLoadField(Handle<Name> name, 338 Handle<Code> StubCache::ComputeKeyedLoadField(Handle<Name> name,
339 Handle<JSObject> receiver, 339 Handle<JSObject> receiver,
340 Handle<JSObject> holder, 340 Handle<JSObject> holder,
341 PropertyIndex field, 341 PropertyIndex field,
342 Representation representation) { 342 Representation representation) {
343 if (receiver.is_identical_to(holder)) { 343 if (receiver.is_identical_to(holder)) {
344 // TODO(titzer): this should use an HObjectAccess
344 KeyedLoadFieldStub stub(field.is_inobject(holder), 345 KeyedLoadFieldStub stub(field.is_inobject(holder),
345 field.translate(holder), 346 field.translate(holder),
346 representation); 347 representation);
347 return stub.GetCode(isolate()); 348 return stub.GetCode(isolate());
348 } 349 }
349 350
350 Handle<JSObject> stub_holder = StubHolder(receiver, holder); 351 Handle<JSObject> stub_holder = StubHolder(receiver, holder);
351 Handle<Code> stub = FindHandler( 352 Handle<Code> stub = FindHandler(
352 name, receiver, stub_holder, Code::KEYED_LOAD_IC, Code::FIELD); 353 name, receiver, stub_holder, Code::KEYED_LOAD_IC, Code::FIELD);
353 if (!stub.is_null()) return stub; 354 if (!stub.is_null()) return stub;
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after
2088 Handle<FunctionTemplateInfo>( 2089 Handle<FunctionTemplateInfo>(
2089 FunctionTemplateInfo::cast(signature->receiver())); 2090 FunctionTemplateInfo::cast(signature->receiver()));
2090 } 2091 }
2091 } 2092 }
2092 2093
2093 is_simple_api_call_ = true; 2094 is_simple_api_call_ = true;
2094 } 2095 }
2095 2096
2096 2097
2097 } } // namespace v8::internal 2098 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698