| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 Zone* zone = this->zone(); | 266 Zone* zone = this->zone(); |
| 267 | 267 |
| 268 HValue* js_array = GetParameter(0); | 268 HValue* js_array = GetParameter(0); |
| 269 HValue* map = GetParameter(1); | 269 HValue* map = GetParameter(1); |
| 270 | 270 |
| 271 info()->MarkAsSavesCallerDoubles(); | 271 info()->MarkAsSavesCallerDoubles(); |
| 272 | 272 |
| 273 AddInstruction(new(zone) HTrapAllocationMemento(js_array)); | 273 AddInstruction(new(zone) HTrapAllocationMemento(js_array)); |
| 274 | 274 |
| 275 HInstruction* array_length = | 275 HInstruction* array_length = |
| 276 AddInstruction(new(zone) HJSArrayLength(js_array, | 276 AddInstruction(HLoadNamedField::NewArrayLength( |
| 277 js_array, | 277 zone, js_array, js_array, HType::Smi())); |
| 278 HType::Smi())); | |
| 279 | 278 |
| 280 ElementsKind to_kind = casted_stub()->to_kind(); | 279 ElementsKind to_kind = casted_stub()->to_kind(); |
| 281 BuildNewSpaceArrayCheck(array_length, to_kind); | 280 BuildNewSpaceArrayCheck(array_length, to_kind); |
| 282 | 281 |
| 283 IfBuilder if_builder(this); | 282 IfBuilder if_builder(this); |
| 284 | 283 |
| 285 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); | 284 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); |
| 286 | 285 |
| 287 // Nothing to do, just change the map. | 286 // Nothing to do, just change the map. |
| 288 | 287 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 current_block()->MarkAsDeoptimizing(); | 358 current_block()->MarkAsDeoptimizing(); |
| 360 return GetParameter(0); | 359 return GetParameter(0); |
| 361 } | 360 } |
| 362 | 361 |
| 363 | 362 |
| 364 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { | 363 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { |
| 365 return DoGenerateCode(this); | 364 return DoGenerateCode(this); |
| 366 } | 365 } |
| 367 | 366 |
| 368 } } // namespace v8::internal | 367 } } // namespace v8::internal |
| OLD | NEW |