Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 14146005: Track representations of fields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test for tracking fields Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(
371 boilerplate, true, Representation::Tagged(), i));
371 AddInstruction(new(zone) HStoreNamedField(object, 372 AddInstruction(new(zone) HStoreNamedField(object,
372 factory->empty_string(), 373 factory->empty_string(),
373 value, 374 value, true,
374 true, i)); 375 Representation::Tagged(), i));
375 } 376 }
376 377
377 checker.ElseDeopt(); 378 checker.ElseDeopt();
378 return object; 379 return object;
379 } 380 }
380 381
381 382
382 Handle<Code> FastCloneShallowObjectStub::GenerateCode() { 383 Handle<Code> FastCloneShallowObjectStub::GenerateCode() {
383 return DoGenerateCode(this); 384 return DoGenerateCode(this);
384 } 385 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 454
454 BuildCopyElements(context(), elements, 455 BuildCopyElements(context(), elements,
455 casted_stub()->from_kind(), new_elements, 456 casted_stub()->from_kind(), new_elements,
456 to_kind, array_length, elements_length); 457 to_kind, array_length, elements_length);
457 458
458 Factory* factory = isolate()->factory(); 459 Factory* factory = isolate()->factory();
459 460
460 AddInstruction(new(zone) HStoreNamedField(js_array, 461 AddInstruction(new(zone) HStoreNamedField(js_array,
461 factory->elements_field_string(), 462 factory->elements_field_string(),
462 new_elements, true, 463 new_elements, true,
464 Representation::Tagged(),
463 JSArray::kElementsOffset)); 465 JSArray::kElementsOffset));
464 466
465 if_builder.End(); 467 if_builder.End();
466 468
467 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_string(), 469 AddInstruction(new(zone) HStoreNamedField(js_array, factory->length_string(),
468 map, true, JSArray::kMapOffset)); 470 map, true,
471 Representation::Tagged(),
472 JSArray::kMapOffset));
469 return js_array; 473 return js_array;
470 } 474 }
471 475
472 476
473 Handle<Code> TransitionElementsKindStub::GenerateCode() { 477 Handle<Code> TransitionElementsKindStub::GenerateCode() {
474 return DoGenerateCode(this); 478 return DoGenerateCode(this);
475 } 479 }
476 480
477 481
478 template <> 482 template <>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 current_block()->MarkAsDeoptimizing(); 515 current_block()->MarkAsDeoptimizing();
512 return GetParameter(0); 516 return GetParameter(0);
513 } 517 }
514 518
515 519
516 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { 520 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() {
517 return DoGenerateCode(this); 521 return DoGenerateCode(this);
518 } 522 }
519 523
520 } } // namespace v8::internal 524 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698