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

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

Issue 23440035: Diagnostic code for chromium 284577 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « no previous file | src/heap.cc » ('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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 GetParameter(1), 350 GetParameter(1),
351 static_cast<HValue*>(NULL), 351 static_cast<HValue*>(NULL),
352 FAST_ELEMENTS); 352 FAST_ELEMENTS);
353 IfBuilder checker(this); 353 IfBuilder checker(this);
354 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, 354 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site,
355 undefined); 355 undefined);
356 checker.Then(); 356 checker.Then();
357 357
358 HObjectAccess access = HObjectAccess::ForAllocationSiteTransitionInfo(); 358 HObjectAccess access = HObjectAccess::ForAllocationSiteTransitionInfo();
359 HInstruction* boilerplate = Add<HLoadNamedField>(allocation_site, access); 359 HInstruction* boilerplate = Add<HLoadNamedField>(allocation_site, access);
360 HValue* push_value;
360 if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) { 361 if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) {
361 HValue* elements = AddLoadElements(boilerplate); 362 HValue* elements = AddLoadElements(boilerplate);
362 363
363 IfBuilder if_fixed_cow(this); 364 IfBuilder if_fixed_cow(this);
364 if_fixed_cow.If<HCompareMap>(elements, factory->fixed_cow_array_map()); 365 if_fixed_cow.If<HCompareMap>(elements, factory->fixed_cow_array_map());
365 if_fixed_cow.Then(); 366 if_fixed_cow.Then();
366 environment()->Push(BuildCloneShallowArray(boilerplate, 367 push_value = BuildCloneShallowArray(boilerplate,
367 allocation_site, 368 allocation_site,
368 alloc_site_mode, 369 alloc_site_mode,
369 FAST_ELEMENTS, 370 FAST_ELEMENTS,
370 0/*copy-on-write*/)); 371 0/*copy-on-write*/);
372 environment()->Push(push_value);
371 if_fixed_cow.Else(); 373 if_fixed_cow.Else();
372 374
373 IfBuilder if_fixed(this); 375 IfBuilder if_fixed(this);
374 if_fixed.If<HCompareMap>(elements, factory->fixed_array_map()); 376 if_fixed.If<HCompareMap>(elements, factory->fixed_array_map());
375 if_fixed.Then(); 377 if_fixed.Then();
376 environment()->Push(BuildCloneShallowArray(boilerplate, 378 push_value = BuildCloneShallowArray(boilerplate,
377 allocation_site, 379 allocation_site,
378 alloc_site_mode, 380 alloc_site_mode,
379 FAST_ELEMENTS, 381 FAST_ELEMENTS,
380 length)); 382 length);
383 environment()->Push(push_value);
381 if_fixed.Else(); 384 if_fixed.Else();
382 environment()->Push(BuildCloneShallowArray(boilerplate, 385 push_value = BuildCloneShallowArray(boilerplate,
383 allocation_site, 386 allocation_site,
384 alloc_site_mode, 387 alloc_site_mode,
385 FAST_DOUBLE_ELEMENTS, 388 FAST_DOUBLE_ELEMENTS,
386 length)); 389 length);
390 environment()->Push(push_value);
387 } else { 391 } else {
388 ElementsKind elements_kind = casted_stub()->ComputeElementsKind(); 392 ElementsKind elements_kind = casted_stub()->ComputeElementsKind();
389 environment()->Push(BuildCloneShallowArray(boilerplate, 393 push_value = BuildCloneShallowArray(boilerplate,
390 allocation_site, 394 allocation_site,
391 alloc_site_mode, 395 alloc_site_mode,
392 elements_kind, 396 elements_kind,
393 length)); 397 length);
398 environment()->Push(push_value);
394 } 399 }
395 400
396 checker.ElseDeopt("Uninitialized boilerplate literals"); 401 checker.ElseDeopt("Uninitialized boilerplate literals");
397 checker.End(); 402 checker.End();
398 403
399 return environment()->Pop(); 404 return environment()->Pop();
400 } 405 }
401 406
402 407
403 Handle<Code> FastCloneShallowArrayStub::GenerateCode(Isolate* isolate) { 408 Handle<Code> FastCloneShallowArrayStub::GenerateCode(Isolate* isolate) {
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 return js_function; 1102 return js_function;
1098 } 1103 }
1099 1104
1100 1105
1101 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { 1106 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) {
1102 return DoGenerateCode(isolate, this); 1107 return DoGenerateCode(isolate, this);
1103 } 1108 }
1104 1109
1105 1110
1106 } } // namespace v8::internal 1111 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698