| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/ic/handler-compiler.h" | 5 #include "src/ic/handler-compiler.h" |
| 6 | 6 |
| 7 #include "src/field-type.h" | 7 #include "src/field-type.h" |
| 8 #include "src/ic/call-optimization.h" | 8 #include "src/ic/call-optimization.h" |
| 9 #include "src/ic/ic-inl.h" | 9 #include "src/ic/ic-inl.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), | 570 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), |
| 571 receiver(), scratch2(), true, value(), holder, | 571 receiver(), scratch2(), true, value(), holder, |
| 572 accessor_index); | 572 accessor_index); |
| 573 return GetCode(kind(), name); | 573 return GetCode(kind(), name); |
| 574 } | 574 } |
| 575 | 575 |
| 576 | 576 |
| 577 #undef __ | 577 #undef __ |
| 578 | 578 |
| 579 void ElementHandlerCompiler::CompileElementHandlers( | 579 void ElementHandlerCompiler::CompileElementHandlers( |
| 580 MapHandleList* receiver_maps, CodeHandleList* handlers) { | 580 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { |
| 581 for (int i = 0; i < receiver_maps->length(); ++i) { | 581 for (int i = 0; i < receiver_maps->length(); ++i) { |
| 582 Handle<Map> receiver_map = receiver_maps->at(i); | 582 Handle<Map> receiver_map = receiver_maps->at(i); |
| 583 Handle<Code> cached_stub; | 583 Handle<Code> cached_stub; |
| 584 | 584 |
| 585 if (receiver_map->IsStringMap()) { | 585 if (receiver_map->IsStringMap()) { |
| 586 cached_stub = LoadIndexedStringStub(isolate()).GetCode(); | 586 cached_stub = LoadIndexedStringStub(isolate()).GetCode(); |
| 587 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { | 587 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { |
| 588 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); | 588 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); |
| 589 } else { | 589 } else { |
| 590 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; | 590 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 611 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 611 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
| 612 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 612 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
| 613 } | 613 } |
| 614 } | 614 } |
| 615 | 615 |
| 616 handlers->Add(cached_stub); | 616 handlers->Add(cached_stub); |
| 617 } | 617 } |
| 618 } | 618 } |
| 619 } // namespace internal | 619 } // namespace internal |
| 620 } // namespace v8 | 620 } // namespace v8 |
| OLD | NEW |