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

Side by Side Diff: src/x64/codegen-x64.cc

Issue 3586006: Begin a more aggressive refactoring of the Compiler interface. (Closed)
Patch Set: Always return false on a parse failure. Created 10 years, 2 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
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 info_ = info; 171 info_ = info;
172 ASSERT(allocator_ == NULL); 172 ASSERT(allocator_ == NULL);
173 RegisterAllocator register_allocator(this); 173 RegisterAllocator register_allocator(this);
174 allocator_ = &register_allocator; 174 allocator_ = &register_allocator;
175 ASSERT(frame_ == NULL); 175 ASSERT(frame_ == NULL);
176 frame_ = new VirtualFrame(); 176 frame_ = new VirtualFrame();
177 set_in_spilled_code(false); 177 set_in_spilled_code(false);
178 178
179 // Adjust for function-level loop nesting. 179 // Adjust for function-level loop nesting.
180 ASSERT_EQ(0, loop_nesting_); 180 ASSERT_EQ(0, loop_nesting_);
181 loop_nesting_ = info->loop_nesting(); 181 loop_nesting_ = info->is_in_loop() ? 1 : 0;
182 182
183 JumpTarget::set_compiling_deferred_code(false); 183 JumpTarget::set_compiling_deferred_code(false);
184 184
185 #ifdef DEBUG 185 #ifdef DEBUG
186 if (strlen(FLAG_stop_at) > 0 && 186 if (strlen(FLAG_stop_at) > 0 &&
187 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { 187 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
188 frame_->SpillAll(); 188 frame_->SpillAll();
189 __ int3(); 189 __ int3();
190 } 190 }
191 #endif 191 #endif
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // compile an artificial return statement just above, and (b) there 349 // compile an artificial return statement just above, and (b) there
350 // are return statements in the body but (c) they are all shadowed. 350 // are return statements in the body but (c) they are all shadowed.
351 Result return_value; 351 Result return_value;
352 function_return_.Bind(&return_value); 352 function_return_.Bind(&return_value);
353 GenerateReturnSequence(&return_value); 353 GenerateReturnSequence(&return_value);
354 } 354 }
355 } 355 }
356 } 356 }
357 357
358 // Adjust for function-level loop nesting. 358 // Adjust for function-level loop nesting.
359 ASSERT_EQ(loop_nesting_, info->loop_nesting()); 359 ASSERT_EQ(loop_nesting_, info->is_in_loop() ? 1 : 0);
360 loop_nesting_ = 0; 360 loop_nesting_ = 0;
361 361
362 // Code generation state must be reset. 362 // Code generation state must be reset.
363 ASSERT(state_ == NULL); 363 ASSERT(state_ == NULL);
364 ASSERT(!function_return_is_shadowed_); 364 ASSERT(!function_return_is_shadowed_);
365 function_return_.Unuse(); 365 function_return_.Unuse();
366 DeleteFrame(); 366 DeleteFrame();
367 367
368 // Process any deferred code using the register allocator. 368 // Process any deferred code using the register allocator.
369 if (!HasStackOverflow()) { 369 if (!HasStackOverflow()) {
(...skipping 8553 matching lines...) Expand 10 before | Expand all | Expand 10 after
8923 #undef __ 8923 #undef __
8924 8924
8925 void RecordWriteStub::Generate(MacroAssembler* masm) { 8925 void RecordWriteStub::Generate(MacroAssembler* masm) {
8926 masm->RecordWriteHelper(object_, addr_, scratch_); 8926 masm->RecordWriteHelper(object_, addr_, scratch_);
8927 masm->ret(0); 8927 masm->ret(0);
8928 } 8928 }
8929 8929
8930 } } // namespace v8::internal 8930 } } // namespace v8::internal
8931 8931
8932 #endif // V8_TARGET_ARCH_X64 8932 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698