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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 Counters* counters = isolate->counters(); | 79 Counters* counters = isolate->counters(); |
80 counters->total_stubs_code_size()->Increment(code->instruction_size()); | 80 counters->total_stubs_code_size()->Increment(code->instruction_size()); |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 Code::Kind CodeStub::GetCodeKind() const { | 84 Code::Kind CodeStub::GetCodeKind() const { |
85 return Code::STUB; | 85 return Code::STUB; |
86 } | 86 } |
87 | 87 |
88 | 88 |
89 Handle<Code> CodeStub::GetCodeCopyFromTemplate(Isolate* isolate) { | 89 Handle<Code> CodeStub::GetCodeCopy(Isolate* isolate, |
| 90 const Code::FindAndReplacePattern& pattern) { |
90 Handle<Code> ic = GetCode(isolate); | 91 Handle<Code> ic = GetCode(isolate); |
91 ic = isolate->factory()->CopyCode(ic); | 92 ic = isolate->factory()->CopyCode(ic); |
| 93 ic->FindAndReplace(pattern); |
92 RecordCodeGeneration(*ic, isolate); | 94 RecordCodeGeneration(*ic, isolate); |
93 return ic; | 95 return ic; |
94 } | 96 } |
95 | 97 |
96 | 98 |
97 Handle<Code> PlatformCodeStub::GenerateCode(Isolate* isolate) { | 99 Handle<Code> PlatformCodeStub::GenerateCode(Isolate* isolate) { |
98 Factory* factory = isolate->factory(); | 100 Factory* factory = isolate->factory(); |
99 | 101 |
100 // Generate the new code. | 102 // Generate the new code. |
101 MacroAssembler masm(isolate, NULL, 256); | 103 MacroAssembler masm(isolate, NULL, 256); |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 InstallDescriptor(isolate, &stub3); | 815 InstallDescriptor(isolate, &stub3); |
814 } | 816 } |
815 | 817 |
816 InternalArrayConstructorStub::InternalArrayConstructorStub( | 818 InternalArrayConstructorStub::InternalArrayConstructorStub( |
817 Isolate* isolate) { | 819 Isolate* isolate) { |
818 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 820 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
819 } | 821 } |
820 | 822 |
821 | 823 |
822 } } // namespace v8::internal | 824 } } // namespace v8::internal |
OLD | NEW |