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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry))); | 896 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry))); |
897 | 897 |
898 StubCompiler compiler(isolate_); | 898 StubCompiler compiler(isolate_); |
899 Handle<Code> code = compiler.CompileCallMiss(flags); | 899 Handle<Code> code = compiler.CompileCallMiss(flags); |
900 FillCache(isolate_, code); | 900 FillCache(isolate_, code); |
901 return code; | 901 return code; |
902 } | 902 } |
903 | 903 |
904 | 904 |
905 Handle<Code> StubCache::ComputeCompareNil(Handle<Map> receiver_map, | 905 Handle<Code> StubCache::ComputeCompareNil(Handle<Map> receiver_map, |
906 NilValue nil, | 906 CompareNilICStub& stub) { |
907 CompareNilICStub::Types types) { | 907 stub.SetKind(kNonStrictEquality); |
908 CompareNilICStub stub(kNonStrictEquality, nil, types); | |
909 | 908 |
910 Handle<String> name(isolate_->heap()->empty_string()); | 909 Handle<String> name(isolate_->heap()->empty_string()); |
911 if (!receiver_map->is_shared()) { | 910 if (!receiver_map->is_shared()) { |
912 Handle<Code> cached_ic = FindIC(name, receiver_map, Code::COMPARE_NIL_IC, | 911 Handle<Code> cached_ic = FindIC(name, receiver_map, Code::COMPARE_NIL_IC, |
913 Code::NORMAL, stub.GetExtraICState()); | 912 Code::NORMAL, stub.GetExtraICState()); |
914 if (!cached_ic.is_null()) return cached_ic; | 913 if (!cached_ic.is_null()) return cached_ic; |
915 } | 914 } |
916 | 915 |
917 Handle<Code> ic = stub.GetCode(isolate_); | 916 Handle<Code> ic = stub.GetCode(isolate_); |
918 // For monomorphic maps, use the code as a template, copying and replacing | 917 // For monomorphic maps, use the code as a template, copying and replacing |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2089 Handle<FunctionTemplateInfo>( | 2088 Handle<FunctionTemplateInfo>( |
2090 FunctionTemplateInfo::cast(signature->receiver())); | 2089 FunctionTemplateInfo::cast(signature->receiver())); |
2091 } | 2090 } |
2092 } | 2091 } |
2093 | 2092 |
2094 is_simple_api_call_ = true; | 2093 is_simple_api_call_ = true; |
2095 } | 2094 } |
2096 | 2095 |
2097 | 2096 |
2098 } } // namespace v8::internal | 2097 } } // namespace v8::internal |
OLD | NEW |