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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 Zone* zone = this->zone(); | 269 Zone* zone = this->zone(); |
270 | 270 |
271 HValue* js_array = GetParameter(0); | 271 HValue* js_array = GetParameter(0); |
272 HValue* map = GetParameter(1); | 272 HValue* map = GetParameter(1); |
273 | 273 |
274 info()->MarkAsSavesCallerDoubles(); | 274 info()->MarkAsSavesCallerDoubles(); |
275 | 275 |
276 AddInstruction(new(zone) HTrapAllocationMemento(js_array)); | 276 AddInstruction(new(zone) HTrapAllocationMemento(js_array)); |
277 | 277 |
278 HInstruction* array_length = | 278 HInstruction* array_length = |
279 AddInstruction(new(zone) HJSArrayLength(js_array, | 279 AddInstruction(HLoadNamedField::NewArrayLength(js_array, zone)); |
280 js_array, | |
281 HType::Smi())); | |
282 | 280 |
283 ElementsKind to_kind = casted_stub()->to_kind(); | 281 ElementsKind to_kind = casted_stub()->to_kind(); |
284 BuildNewSpaceArrayCheck(array_length, to_kind); | 282 BuildNewSpaceArrayCheck(array_length, to_kind); |
285 | 283 |
286 IfBuilder if_builder(this, BailoutId::StubEntry()); | 284 IfBuilder if_builder(this, BailoutId::StubEntry()); |
287 | 285 |
288 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); | 286 if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); |
289 | 287 |
290 // Nothing to do, just change the map. | 288 // Nothing to do, just change the map. |
291 | 289 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |