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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 masm.set_generating_stub(true); | 116 masm.set_generating_stub(true); |
117 // TODO(yangguo): remove this once we can serialize IC stubs. | 117 // TODO(yangguo): remove this once we can serialize IC stubs. |
118 masm.enable_serializer(); | 118 masm.enable_serializer(); |
119 NoCurrentFrameScope scope(&masm); | 119 NoCurrentFrameScope scope(&masm); |
120 Generate(&masm); | 120 Generate(&masm); |
121 } | 121 } |
122 | 122 |
123 // Create the code object. | 123 // Create the code object. |
124 CodeDesc desc; | 124 CodeDesc desc; |
125 masm.GetCode(&desc); | 125 masm.GetCode(&desc); |
| 126 |
126 // Copy the generated code into a heap object. | 127 // Copy the generated code into a heap object. |
127 Code::Flags flags = Code::ComputeFlags( | 128 Code::Flags flags = Code::ComputeFlags( |
128 GetCodeKind(), | 129 GetCodeKind(), |
129 GetICState(), | 130 GetICState(), |
130 GetExtraICState(), | 131 GetExtraICState(), |
131 GetStubType()); | 132 GetStubType()); |
132 Handle<Code> new_object = factory->NewCode( | 133 Handle<Code> new_object = factory->NewCode( |
133 desc, flags, masm.CodeObject(), NeedsImmovableCode()); | 134 desc, flags, masm.CodeObject(), NeedsImmovableCode()); |
134 return new_object; | 135 return new_object; |
135 } | 136 } |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 | 1041 |
1041 | 1042 |
1042 InternalArrayConstructorStub::InternalArrayConstructorStub( | 1043 InternalArrayConstructorStub::InternalArrayConstructorStub( |
1043 Isolate* isolate) : PlatformCodeStub(isolate) { | 1044 Isolate* isolate) : PlatformCodeStub(isolate) { |
1044 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 1045 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
1045 } | 1046 } |
1046 | 1047 |
1047 | 1048 |
1048 } // namespace internal | 1049 } // namespace internal |
1049 } // namespace v8 | 1050 } // namespace v8 |
OLD | NEW |