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