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

Side by Side Diff: src/codegen.cc

Issue 3054047: IA32: Avoid going into stubs or runtime code for bitops even if the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 DeferredCode* code = deferred_.RemoveLast(); 70 DeferredCode* code = deferred_.RemoveLast();
71 ASSERT(masm_ == code->masm()); 71 ASSERT(masm_ == code->masm());
72 // Record position of deferred code stub. 72 // Record position of deferred code stub.
73 masm_->RecordStatementPosition(code->statement_position()); 73 masm_->RecordStatementPosition(code->statement_position());
74 if (code->position() != RelocInfo::kNoPosition) { 74 if (code->position() != RelocInfo::kNoPosition) {
75 masm_->RecordPosition(code->position()); 75 masm_->RecordPosition(code->position());
76 } 76 }
77 // Generate the code. 77 // Generate the code.
78 Comment cmnt(masm_, code->comment()); 78 Comment cmnt(masm_, code->comment());
79 masm_->bind(code->entry_label()); 79 masm_->bind(code->entry_label());
80 code->SaveRegisters(); 80 if (code->AutoSaveAndRestore()) {
81 code->SaveRegisters();
82 }
81 code->Generate(); 83 code->Generate();
82 code->RestoreRegisters(); 84 if (code->AutoSaveAndRestore()) {
83 masm_->jmp(code->exit_label()); 85 code->RestoreRegisters();
86 code->Exit();
87 }
84 } 88 }
85 } 89 }
86 90
87 91
92 void DeferredCode::Exit() {
93 masm_->jmp(exit_label());
94 }
95
96
88 void CodeGenerator::SetFrame(VirtualFrame* new_frame, 97 void CodeGenerator::SetFrame(VirtualFrame* new_frame,
89 RegisterFile* non_frame_registers) { 98 RegisterFile* non_frame_registers) {
90 RegisterFile saved_counts; 99 RegisterFile saved_counts;
91 if (has_valid_frame()) { 100 if (has_valid_frame()) {
92 frame_->DetachFromCodeGenerator(); 101 frame_->DetachFromCodeGenerator();
93 // The remaining register reference counts are the non-frame ones. 102 // The remaining register reference counts are the non-frame ones.
94 allocator_->SaveTo(&saved_counts); 103 allocator_->SaveTo(&saved_counts);
95 } 104 }
96 105
97 if (new_frame != NULL) { 106 if (new_frame != NULL) {
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 516 }
508 } 517 }
509 518
510 519
511 void ApiGetterEntryStub::SetCustomCache(Code* value) { 520 void ApiGetterEntryStub::SetCustomCache(Code* value) {
512 info()->set_load_stub_cache(value); 521 info()->set_load_stub_cache(value);
513 } 522 }
514 523
515 524
516 } } // namespace v8::internal 525 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698