OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |