| 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(zone, js_array)); |
| 277 js_array, | |
| 278 HType::Smi())); | |
| 279 | 277 |
| 280 ElementsKind to_kind = casted_stub()->to_kind(); | 278 ElementsKind to_kind = casted_stub()->to_kind(); |
| 281 BuildNewSpaceArrayCheck(array_length, to_kind); | 279 BuildNewSpaceArrayCheck(array_length, to_kind); |
| 282 | 280 |
| 283 IfBuilder if_builder(this); | 281 IfBuilder if_builder(this); |
| 284 | 282 |
| 285 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); | 283 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); |
| 286 | 284 |
| 287 // Nothing to do, just change the map. | 285 // Nothing to do, just change the map. |
| 288 | 286 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 current_block()->MarkAsDeoptimizing(); | 357 current_block()->MarkAsDeoptimizing(); |
| 360 return GetParameter(0); | 358 return GetParameter(0); |
| 361 } | 359 } |
| 362 | 360 |
| 363 | 361 |
| 364 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { | 362 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { |
| 365 return DoGenerateCode(this); | 363 return DoGenerateCode(this); |
| 366 } | 364 } |
| 367 | 365 |
| 368 } } // namespace v8::internal | 366 } } // namespace v8::internal |
| OLD | NEW |