OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 } | 881 } |
882 | 882 |
883 HandlerFrontendFooter(name, &miss); | 883 HandlerFrontendFooter(name, &miss); |
884 } | 884 } |
885 | 885 |
886 | 886 |
887 Handle<Code> LoadStubCompiler::CompileLoadField( | 887 Handle<Code> LoadStubCompiler::CompileLoadField( |
888 Handle<HeapType> type, | 888 Handle<HeapType> type, |
889 Handle<JSObject> holder, | 889 Handle<JSObject> holder, |
890 Handle<Name> name, | 890 Handle<Name> name, |
891 FieldIndex field, | 891 PropertyIndex field, |
892 Representation representation) { | 892 Representation representation) { |
893 Register reg = HandlerFrontend(type, receiver(), holder, name); | 893 Register reg = HandlerFrontend(type, receiver(), holder, name); |
894 GenerateLoadField(reg, holder, field, representation); | 894 GenerateLoadField(reg, holder, field, representation); |
895 | 895 |
896 // Return the generated code. | 896 // Return the generated code. |
897 return GetCode(kind(), Code::FAST, name); | 897 return GetCode(kind(), Code::FAST, name); |
898 } | 898 } |
899 | 899 |
900 | 900 |
901 Handle<Code> LoadStubCompiler::CompileLoadConstant( | 901 Handle<Code> LoadStubCompiler::CompileLoadConstant( |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 } | 959 } |
960 | 960 |
961 | 961 |
962 void LoadStubCompiler::GenerateLoadPostInterceptor( | 962 void LoadStubCompiler::GenerateLoadPostInterceptor( |
963 Register interceptor_reg, | 963 Register interceptor_reg, |
964 Handle<JSObject> interceptor_holder, | 964 Handle<JSObject> interceptor_holder, |
965 Handle<Name> name, | 965 Handle<Name> name, |
966 LookupResult* lookup) { | 966 LookupResult* lookup) { |
967 Handle<JSObject> holder(lookup->holder()); | 967 Handle<JSObject> holder(lookup->holder()); |
968 if (lookup->IsField()) { | 968 if (lookup->IsField()) { |
969 FieldIndex field = lookup->GetFieldIndex(); | 969 PropertyIndex field = lookup->GetFieldIndex(); |
970 if (interceptor_holder.is_identical_to(holder)) { | 970 if (interceptor_holder.is_identical_to(holder)) { |
971 GenerateLoadField( | 971 GenerateLoadField( |
972 interceptor_reg, holder, field, lookup->representation()); | 972 interceptor_reg, holder, field, lookup->representation()); |
973 } else { | 973 } else { |
974 // We found FIELD property in prototype chain of interceptor's holder. | 974 // We found FIELD property in prototype chain of interceptor's holder. |
975 // Retrieve a field from field's holder. | 975 // Retrieve a field from field's holder. |
976 Register reg = HandlerFrontend( | 976 Register reg = HandlerFrontend( |
977 IC::CurrentTypeOf(interceptor_holder, isolate()), | 977 IC::CurrentTypeOf(interceptor_holder, isolate()), |
978 interceptor_reg, holder, name); | 978 interceptor_reg, holder, name); |
979 GenerateLoadField( | 979 GenerateLoadField( |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 Handle<FunctionTemplateInfo>( | 1481 Handle<FunctionTemplateInfo>( |
1482 FunctionTemplateInfo::cast(signature->receiver())); | 1482 FunctionTemplateInfo::cast(signature->receiver())); |
1483 } | 1483 } |
1484 } | 1484 } |
1485 | 1485 |
1486 is_simple_api_call_ = true; | 1486 is_simple_api_call_ = true; |
1487 } | 1487 } |
1488 | 1488 |
1489 | 1489 |
1490 } } // namespace v8::internal | 1490 } } // namespace v8::internal |
OLD | NEW |