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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 return ic; | 142 return ic; |
143 } | 143 } |
144 | 144 |
145 | 145 |
146 Handle<Code> PlatformCodeStub::GenerateCode() { | 146 Handle<Code> PlatformCodeStub::GenerateCode() { |
147 Factory* factory = isolate()->factory(); | 147 Factory* factory = isolate()->factory(); |
148 | 148 |
149 // Generate the new code. | 149 // Generate the new code. |
150 MacroAssembler masm(isolate(), NULL, 256); | 150 MacroAssembler masm(isolate(), NULL, 256); |
151 | 151 |
| 152 // TODO(yangguo) remove this once the code serializer handles code stubs. |
| 153 if (FLAG_serialize_toplevel) masm.enable_serializer(); |
| 154 |
152 { | 155 { |
153 // Update the static counter each time a new code stub is generated. | 156 // Update the static counter each time a new code stub is generated. |
154 isolate()->counters()->code_stubs()->Increment(); | 157 isolate()->counters()->code_stubs()->Increment(); |
155 | 158 |
156 // Generate the code for the stub. | 159 // Generate the code for the stub. |
157 masm.set_generating_stub(true); | 160 masm.set_generating_stub(true); |
158 NoCurrentFrameScope scope(&masm); | 161 NoCurrentFrameScope scope(&masm); |
159 Generate(&masm); | 162 Generate(&masm); |
160 } | 163 } |
161 | 164 |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 InstallDescriptor(isolate, &stub3); | 976 InstallDescriptor(isolate, &stub3); |
974 } | 977 } |
975 | 978 |
976 InternalArrayConstructorStub::InternalArrayConstructorStub( | 979 InternalArrayConstructorStub::InternalArrayConstructorStub( |
977 Isolate* isolate) : PlatformCodeStub(isolate) { | 980 Isolate* isolate) : PlatformCodeStub(isolate) { |
978 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 981 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
979 } | 982 } |
980 | 983 |
981 | 984 |
982 } } // namespace v8::internal | 985 } } // namespace v8::internal |
OLD | NEW |