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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); | 360 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); |
361 } | 361 } |
362 HInstruction* object = | 362 HInstruction* object = |
363 AddInstruction(new(zone) HAllocate(context(), | 363 AddInstruction(new(zone) HAllocate(context(), |
364 size_in_bytes, | 364 size_in_bytes, |
365 HType::JSObject(), | 365 HType::JSObject(), |
366 flags)); | 366 flags)); |
367 | 367 |
368 for (int i = 0; i < size; i += kPointerSize) { | 368 for (int i = 0; i < size; i += kPointerSize) { |
369 HInstruction* value = | 369 HInstruction* value = |
370 AddInstruction(new(zone) HLoadNamedField(boilerplate, true, i)); | 370 AddInstruction(new(zone) HLoadNamedField(boilerplate, true, TAGGED, i)); |
371 AddInstruction(new(zone) HStoreNamedField(object, | 371 AddInstruction(new(zone) HStoreNamedField(object, |
372 factory->empty_string(), | 372 factory->empty_string(), |
373 value, | 373 value, |
374 true, i)); | 374 true, TAGGED, i)); |
375 } | 375 } |
376 | 376 |
377 checker.ElseDeopt(); | 377 checker.ElseDeopt(); |
378 return object; | 378 return object; |
379 } | 379 } |
380 | 380 |
381 | 381 |
382 Handle<Code> FastCloneShallowObjectStub::GenerateCode() { | 382 Handle<Code> FastCloneShallowObjectStub::GenerateCode() { |
383 return DoGenerateCode(this); | 383 return DoGenerateCode(this); |
384 } | 384 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 BuildAllocateAndInitializeElements(context(), to_kind, elements_length); | 452 BuildAllocateAndInitializeElements(context(), to_kind, elements_length); |
453 | 453 |
454 BuildCopyElements(context(), elements, | 454 BuildCopyElements(context(), elements, |
455 casted_stub()->from_kind(), new_elements, | 455 casted_stub()->from_kind(), new_elements, |
456 to_kind, array_length, elements_length); | 456 to_kind, array_length, elements_length); |
457 | 457 |
458 Factory* factory = isolate()->factory(); | 458 Factory* factory = isolate()->factory(); |
459 | 459 |
460 AddInstruction(new(zone) HStoreNamedField(js_array, | 460 AddInstruction(new(zone) HStoreNamedField(js_array, |
461 factory->elements_field_string(), | 461 factory->elements_field_string(), |
462 new_elements, true, | 462 new_elements, true, TAGGED, |
463 JSArray::kElementsOffset)); | 463 JSArray::kElementsOffset)); |
464 | 464 |
465 if_builder.End(); | 465 if_builder.End(); |
466 | 466 |
467 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_string(), | 467 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_string(), |
468 map, true, JSArray::kMapOffset)); | 468 map, true, TAGGED, |
| 469 JSArray::kMapOffset)); |
469 return js_array; | 470 return js_array; |
470 } | 471 } |
471 | 472 |
472 | 473 |
473 Handle<Code> TransitionElementsKindStub::GenerateCode() { | 474 Handle<Code> TransitionElementsKindStub::GenerateCode() { |
474 return DoGenerateCode(this); | 475 return DoGenerateCode(this); |
475 } | 476 } |
476 | 477 |
477 | 478 |
478 template <> | 479 template <> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 current_block()->MarkAsDeoptimizing(); | 512 current_block()->MarkAsDeoptimizing(); |
512 return GetParameter(0); | 513 return GetParameter(0); |
513 } | 514 } |
514 | 515 |
515 | 516 |
516 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { | 517 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { |
517 return DoGenerateCode(this); | 518 return DoGenerateCode(this); |
518 } | 519 } |
519 | 520 |
520 } } // namespace v8::internal | 521 } } // namespace v8::internal |
OLD | NEW |