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 | 241 |
242 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_symbol(), | 242 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_symbol(), |
243 map, true, JSArray::kMapOffset)); | 243 map, true, JSArray::kMapOffset)); |
244 AddSimulate(BailoutId::StubEntry()); | 244 AddSimulate(BailoutId::StubEntry()); |
245 | 245 |
246 HReturn* ret = new(zone) HReturn(js_array, context()); | 246 HReturn* ret = new(zone) HReturn(js_array, context()); |
247 current_block()->Finish(ret); | 247 current_block()->Finish(ret); |
248 } | 248 } |
249 | 249 |
250 | 250 |
| 251 template <> |
| 252 void CodeStubGraphBuilder<ArrayNoArgumentConstructorStub>::BuildCodeStub() { |
| 253 HInstruction* deopt = new(zone()) HSoftDeoptimize(); |
| 254 AddInstruction(deopt); |
| 255 current_block()->MarkAsDeoptimizing(); |
| 256 HReturn* ret = new(zone()) HReturn(GetParameter(0), context()); |
| 257 current_block()->Finish(ret); |
| 258 } |
| 259 |
| 260 |
| 261 Handle<Code> ArrayNoArgumentConstructorStub::GenerateCode() { |
| 262 CodeStubGraphBuilder<ArrayNoArgumentConstructorStub> builder(this); |
| 263 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 264 return chunk->Codegen(Code::COMPILED_STUB); |
| 265 } |
| 266 |
| 267 |
| 268 template <> |
| 269 void CodeStubGraphBuilder<ArraySingleArgumentConstructorStub>::BuildCodeStub() { |
| 270 HInstruction* deopt = new(zone()) HSoftDeoptimize(); |
| 271 AddInstruction(deopt); |
| 272 current_block()->MarkAsDeoptimizing(); |
| 273 HReturn* ret = new(zone()) HReturn(GetParameter(0), context()); |
| 274 current_block()->Finish(ret); |
| 275 } |
| 276 |
| 277 |
251 Handle<Code> TransitionElementsKindStub::GenerateCode() { | 278 Handle<Code> TransitionElementsKindStub::GenerateCode() { |
252 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); | 279 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); |
253 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 280 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
254 return chunk->Codegen(Code::COMPILED_STUB); | 281 return chunk->Codegen(Code::COMPILED_STUB); |
255 } | 282 } |
256 | 283 |
257 | 284 |
| 285 Handle<Code> ArraySingleArgumentConstructorStub::GenerateCode() { |
| 286 CodeStubGraphBuilder<ArraySingleArgumentConstructorStub> builder(this); |
| 287 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 288 return chunk->Codegen(Code::COMPILED_STUB); |
| 289 } |
| 290 |
| 291 |
| 292 template <> |
| 293 void CodeStubGraphBuilder<ArrayNArgumentsConstructorStub>::BuildCodeStub() { |
| 294 HInstruction* deopt = new(zone()) HSoftDeoptimize(); |
| 295 AddInstruction(deopt); |
| 296 current_block()->MarkAsDeoptimizing(); |
| 297 HReturn* ret = new(zone()) HReturn(GetParameter(0), context()); |
| 298 current_block()->Finish(ret); |
| 299 } |
| 300 |
| 301 |
| 302 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { |
| 303 CodeStubGraphBuilder<ArrayNArgumentsConstructorStub> builder(this); |
| 304 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 305 return chunk->Codegen(Code::COMPILED_STUB); |
| 306 } |
| 307 |
258 } } // namespace v8::internal | 308 } } // namespace v8::internal |
OLD | NEW |