| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 GetParameter(0), GetParameter(1), GetParameter(2), NULL, | 251 GetParameter(0), GetParameter(1), GetParameter(2), NULL, |
| 252 casted_stub()->is_js_array(), casted_stub()->elements_kind(), | 252 casted_stub()->is_js_array(), casted_stub()->elements_kind(), |
| 253 true, casted_stub()->store_mode(), Representation::Tagged()); | 253 true, casted_stub()->store_mode(), Representation::Tagged()); |
| 254 AddSimulate(BailoutId::StubEntry(), REMOVABLE_SIMULATE); | 254 AddSimulate(BailoutId::StubEntry(), REMOVABLE_SIMULATE); |
| 255 | 255 |
| 256 return GetParameter(2); | 256 return GetParameter(2); |
| 257 } | 257 } |
| 258 | 258 |
| 259 | 259 |
| 260 Handle<Code> KeyedStoreFastElementStub::GenerateCode() { | 260 Handle<Code> KeyedStoreFastElementStub::GenerateCode() { |
| 261 CodeStubGraphBuilder<KeyedStoreFastElementStub> builder(this); | 261 return DoGenerateCode(this); |
| 262 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | |
| 263 return chunk->Codegen(Code::COMPILED_STUB); | |
| 264 } | 262 } |
| 265 | 263 |
| 266 | 264 |
| 267 template <> | 265 template <> |
| 268 HValue* CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() { | 266 HValue* CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() { |
| 269 Zone* zone = this->zone(); | 267 Zone* zone = this->zone(); |
| 270 | 268 |
| 271 HValue* js_array = GetParameter(0); | 269 HValue* js_array = GetParameter(0); |
| 272 HValue* map = GetParameter(1); | 270 HValue* map = GetParameter(1); |
| 273 | 271 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 314 |
| 317 if_builder.End(); | 315 if_builder.End(); |
| 318 | 316 |
| 319 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_string(), | 317 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_string(), |
| 320 map, true, JSArray::kMapOffset)); | 318 map, true, JSArray::kMapOffset)); |
| 321 AddSimulate(BailoutId::StubEntry()); | 319 AddSimulate(BailoutId::StubEntry()); |
| 322 return js_array; | 320 return js_array; |
| 323 } | 321 } |
| 324 | 322 |
| 325 | 323 |
| 324 Handle<Code> TransitionElementsKindStub::GenerateCode() { |
| 325 return DoGenerateCode(this); |
| 326 } |
| 327 |
| 328 |
| 326 template <> | 329 template <> |
| 327 HValue* CodeStubGraphBuilder<ArrayNoArgumentConstructorStub>::BuildCodeStub() { | 330 HValue* CodeStubGraphBuilder<ArrayNoArgumentConstructorStub>::BuildCodeStub() { |
| 328 HInstruction* deopt = new(zone()) HSoftDeoptimize(); | 331 HInstruction* deopt = new(zone()) HSoftDeoptimize(); |
| 329 AddInstruction(deopt); | 332 AddInstruction(deopt); |
| 330 current_block()->MarkAsDeoptimizing(); | 333 current_block()->MarkAsDeoptimizing(); |
| 331 return GetParameter(0); | 334 return GetParameter(0); |
| 332 } | 335 } |
| 333 | 336 |
| 334 | 337 |
| 335 Handle<Code> ArrayNoArgumentConstructorStub::GenerateCode() { | 338 Handle<Code> ArrayNoArgumentConstructorStub::GenerateCode() { |
| 336 return DoGenerateCode(this); | 339 return DoGenerateCode(this); |
| 337 } | 340 } |
| 338 | 341 |
| 339 | 342 |
| 340 template <> | 343 template <> |
| 341 HValue* CodeStubGraphBuilder<ArraySingleArgumentConstructorStub>:: | 344 HValue* CodeStubGraphBuilder<ArraySingleArgumentConstructorStub>:: |
| 342 BuildCodeStub() { | 345 BuildCodeStub() { |
| 343 HInstruction* deopt = new(zone()) HSoftDeoptimize(); | 346 HInstruction* deopt = new(zone()) HSoftDeoptimize(); |
| 344 AddInstruction(deopt); | 347 AddInstruction(deopt); |
| 345 current_block()->MarkAsDeoptimizing(); | 348 current_block()->MarkAsDeoptimizing(); |
| 346 return GetParameter(0); | 349 return GetParameter(0); |
| 347 } | 350 } |
| 348 | 351 |
| 349 | 352 |
| 350 Handle<Code> TransitionElementsKindStub::GenerateCode() { | |
| 351 return DoGenerateCode(this); | |
| 352 } | |
| 353 | |
| 354 | |
| 355 Handle<Code> ArraySingleArgumentConstructorStub::GenerateCode() { | 353 Handle<Code> ArraySingleArgumentConstructorStub::GenerateCode() { |
| 356 return DoGenerateCode(this); | 354 return DoGenerateCode(this); |
| 357 } | 355 } |
| 358 | 356 |
| 359 | 357 |
| 360 template <> | 358 template <> |
| 361 HValue* CodeStubGraphBuilder<ArrayNArgumentsConstructorStub>::BuildCodeStub() { | 359 HValue* CodeStubGraphBuilder<ArrayNArgumentsConstructorStub>::BuildCodeStub() { |
| 362 HInstruction* deopt = new(zone()) HSoftDeoptimize(); | 360 HInstruction* deopt = new(zone()) HSoftDeoptimize(); |
| 363 AddInstruction(deopt); | 361 AddInstruction(deopt); |
| 364 current_block()->MarkAsDeoptimizing(); | 362 current_block()->MarkAsDeoptimizing(); |
| 365 return GetParameter(0); | 363 return GetParameter(0); |
| 366 } | 364 } |
| 367 | 365 |
| 368 | 366 |
| 369 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { | 367 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { |
| 370 return DoGenerateCode(this); | 368 return DoGenerateCode(this); |
| 371 } | 369 } |
| 372 | 370 |
| 373 } } // namespace v8::internal | 371 } } // namespace v8::internal |
| OLD | NEW |