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 | |
127 // Copy the generated code into a heap object. | 126 // Copy the generated code into a heap object. |
128 Code::Flags flags = Code::ComputeFlags( | 127 Code::Flags flags = Code::ComputeFlags( |
129 GetCodeKind(), | 128 GetCodeKind(), |
130 GetICState(), | 129 GetICState(), |
131 GetExtraICState(), | 130 GetExtraICState(), |
132 GetStubType()); | 131 GetStubType()); |
133 Handle<Code> new_object = factory->NewCode( | 132 Handle<Code> new_object = factory->NewCode( |
134 desc, flags, masm.CodeObject(), NeedsImmovableCode()); | 133 desc, flags, masm.CodeObject(), NeedsImmovableCode()); |
135 return new_object; | 134 return new_object; |
136 } | 135 } |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 | 1040 |
1042 | 1041 |
1043 InternalArrayConstructorStub::InternalArrayConstructorStub( | 1042 InternalArrayConstructorStub::InternalArrayConstructorStub( |
1044 Isolate* isolate) : PlatformCodeStub(isolate) { | 1043 Isolate* isolate) : PlatformCodeStub(isolate) { |
1045 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 1044 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
1046 } | 1045 } |
1047 | 1046 |
1048 | 1047 |
1049 } // namespace internal | 1048 } // namespace internal |
1050 } // namespace v8 | 1049 } // namespace v8 |
OLD | NEW |