OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // Create the code object. | 241 // Create the code object. |
242 CodeDesc desc; | 242 CodeDesc desc; |
243 masm.GetCode(&desc); | 243 masm.GetCode(&desc); |
244 | 244 |
245 // Copy the generated code into a heap object. | 245 // Copy the generated code into a heap object. |
246 Code::Flags flags = Code::ComputeFlags( | 246 Code::Flags flags = Code::ComputeFlags( |
247 GetCodeKind(), | 247 GetCodeKind(), |
248 GetICState(), | 248 GetICState(), |
249 GetExtraICState(), | 249 GetExtraICState(), |
250 GetStubType(), | 250 GetStubType(), |
251 GetStubFlags()); | 251 GetHandlerKind()); |
252 Handle<Code> new_object = factory->NewCode( | 252 Handle<Code> new_object = factory->NewCode( |
253 desc, flags, masm.CodeObject(), NeedsImmovableCode()); | 253 desc, flags, masm.CodeObject(), NeedsImmovableCode()); |
254 return new_object; | 254 return new_object; |
255 } | 255 } |
256 | 256 |
257 | 257 |
258 template <class Stub> | 258 template <class Stub> |
259 static Handle<Code> DoGenerateCode(Isolate* isolate, Stub* stub) { | 259 static Handle<Code> DoGenerateCode(Isolate* isolate, Stub* stub) { |
260 CodeStub::Major major_key = | 260 CodeStub::Major major_key = |
261 static_cast<HydrogenCodeStub*>(stub)->MajorKey(); | 261 static_cast<HydrogenCodeStub*>(stub)->MajorKey(); |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 return BuildRegExpConstructResult(length, index, input); | 1399 return BuildRegExpConstructResult(length, index, input); |
1400 } | 1400 } |
1401 | 1401 |
1402 | 1402 |
1403 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { | 1403 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { |
1404 return DoGenerateCode(isolate, this); | 1404 return DoGenerateCode(isolate, this); |
1405 } | 1405 } |
1406 | 1406 |
1407 | 1407 |
1408 } } // namespace v8::internal | 1408 } } // namespace v8::internal |
OLD | NEW |