Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: src/code-stubs.cc

Issue 2551353003: [stubs] Ensure that the stubs are recompiled in respective tests. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/code-stubs.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 106
107 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) { 107 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) {
108 Handle<Code> ic = GetCode(); 108 Handle<Code> ic = GetCode();
109 ic = isolate()->factory()->CopyCode(ic); 109 ic = isolate()->factory()->CopyCode(ic);
110 ic->FindAndReplace(pattern); 110 ic->FindAndReplace(pattern);
111 RecordCodeGeneration(ic); 111 RecordCodeGeneration(ic);
112 return ic; 112 return ic;
113 } 113 }
114 114
115 void CodeStub::DeleteStubFromCacheForTesting() {
116 Heap* heap = isolate_->heap();
117 Handle<UnseededNumberDictionary> dict(heap->code_stubs());
118 dict = UnseededNumberDictionary::DeleteKey(dict, GetKey());
119 heap->SetRootCodeStubs(*dict);
120 }
115 121
116 Handle<Code> PlatformCodeStub::GenerateCode() { 122 Handle<Code> PlatformCodeStub::GenerateCode() {
117 Factory* factory = isolate()->factory(); 123 Factory* factory = isolate()->factory();
118 124
119 // Generate the new code. 125 // Generate the new code.
120 MacroAssembler masm(isolate(), NULL, 256, CodeObjectRequired::kYes); 126 MacroAssembler masm(isolate(), NULL, 256, CodeObjectRequired::kYes);
121 127
122 { 128 {
123 // Update the static counter each time a new code stub is generated. 129 // Update the static counter each time a new code stub is generated.
124 isolate()->counters()->code_stubs()->Increment(); 130 isolate()->counters()->code_stubs()->Increment();
(...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after
3198 } 3204 }
3199 3205
3200 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) 3206 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
3201 : PlatformCodeStub(isolate) {} 3207 : PlatformCodeStub(isolate) {}
3202 3208
3203 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) 3209 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate)
3204 : PlatformCodeStub(isolate) {} 3210 : PlatformCodeStub(isolate) {}
3205 3211
3206 } // namespace internal 3212 } // namespace internal
3207 } // namespace v8 3213 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698