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

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

Issue 15734007: Move global pretenuring flag check to ShouldGloballyPretenure(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 AddInstruction(new(zone) HInstanceSize(boilerplate)); 376 AddInstruction(new(zone) HInstanceSize(boilerplate));
377 HValue* size_in_words = 377 HValue* size_in_words =
378 AddInstruction(new(zone) HConstant(size >> kPointerSizeLog2, 378 AddInstruction(new(zone) HConstant(size >> kPointerSizeLog2,
379 Representation::Integer32())); 379 Representation::Integer32()));
380 checker.IfCompare(boilerplate_size, size_in_words, Token::EQ); 380 checker.IfCompare(boilerplate_size, size_in_words, Token::EQ);
381 checker.Then(); 381 checker.Then();
382 382
383 HValue* size_in_bytes = 383 HValue* size_in_bytes =
384 AddInstruction(new(zone) HConstant(size, Representation::Integer32())); 384 AddInstruction(new(zone) HConstant(size, Representation::Integer32()));
385 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE; 385 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE;
386 if (FLAG_pretenure_literals) { 386 if (isolate()->heap()->ShouldGloballyPretenure()) {
387 flags = static_cast<HAllocate::Flags>( 387 flags = static_cast<HAllocate::Flags>(
388 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); 388 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE);
389 } 389 }
390 HInstruction* object = 390 HInstruction* object =
391 AddInstruction(new(zone) HAllocate(context(), 391 AddInstruction(new(zone) HAllocate(context(),
392 size_in_bytes, 392 size_in_bytes,
393 HType::JSObject(), 393 HType::JSObject(),
394 flags)); 394 flags));
395 395
396 for (int i = 0; i < size; i += kPointerSize) { 396 for (int i = 0; i < size; i += kPointerSize) {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 ? graph()->GetConstantSmi1() 694 ? graph()->GetConstantSmi1()
695 : graph()->GetConstantUndefined(); 695 : graph()->GetConstantUndefined();
696 } 696 }
697 697
698 698
699 Handle<Code> CompareNilICStub::GenerateCode() { 699 Handle<Code> CompareNilICStub::GenerateCode() {
700 return DoGenerateCode(this); 700 return DoGenerateCode(this);
701 } 701 }
702 702
703 } } // namespace v8::internal 703 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698