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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |