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

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

Issue 548313002: Do not use CodeStub::FindInCache if not necessary. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 GetStubType()); 131 GetStubType());
132 Handle<Code> new_object = factory->NewCode( 132 Handle<Code> new_object = factory->NewCode(
133 desc, flags, masm.CodeObject(), NeedsImmovableCode()); 133 desc, flags, masm.CodeObject(), NeedsImmovableCode());
134 return new_object; 134 return new_object;
135 } 135 }
136 136
137 137
138 Handle<Code> CodeStub::GetCode() { 138 Handle<Code> CodeStub::GetCode() {
139 Heap* heap = isolate()->heap(); 139 Heap* heap = isolate()->heap();
140 Code* code; 140 Code* code;
141 if (UseSpecialCache() 141 if (UseSpecialCache() ? FindCodeInSpecialCache(&code)
142 ? FindCodeInSpecialCache(&code) 142 : FindCodeInCache(&code)) {
143 : FindCodeInCache(&code)) {
144 DCHECK(GetCodeKind() == code->kind()); 143 DCHECK(GetCodeKind() == code->kind());
145 return Handle<Code>(code); 144 return Handle<Code>(code);
146 } 145 }
147 146
148 { 147 {
149 HandleScope scope(isolate()); 148 HandleScope scope(isolate());
150 149
151 Handle<Code> new_object = GenerateCode(); 150 Handle<Code> new_object = GenerateCode();
152 new_object->set_stub_key(GetKey()); 151 new_object->set_stub_key(GetKey());
153 FinishCode(new_object); 152 FinishCode(new_object);
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 } 1006 }
1008 1007
1009 1008
1010 InternalArrayConstructorStub::InternalArrayConstructorStub( 1009 InternalArrayConstructorStub::InternalArrayConstructorStub(
1011 Isolate* isolate) : PlatformCodeStub(isolate) { 1010 Isolate* isolate) : PlatformCodeStub(isolate) {
1012 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1011 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1013 } 1012 }
1014 1013
1015 1014
1016 } } // namespace v8::internal 1015 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698