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

Side by Side Diff: src/ia32/codegen-ia32.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/handles.cc ('k') | src/liveedit.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 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 info_ = info; 172 info_ = info;
173 ASSERT(allocator_ == NULL); 173 ASSERT(allocator_ == NULL);
174 RegisterAllocator register_allocator(this); 174 RegisterAllocator register_allocator(this);
175 allocator_ = &register_allocator; 175 allocator_ = &register_allocator;
176 ASSERT(frame_ == NULL); 176 ASSERT(frame_ == NULL);
177 frame_ = new VirtualFrame(); 177 frame_ = new VirtualFrame();
178 set_in_spilled_code(false); 178 set_in_spilled_code(false);
179 179
180 // Adjust for function-level loop nesting. 180 // Adjust for function-level loop nesting.
181 ASSERT_EQ(0, loop_nesting_); 181 ASSERT_EQ(0, loop_nesting_);
182 loop_nesting_ = info->loop_nesting(); 182 loop_nesting_ = info->is_in_loop() ? 1 : 0;
183 183
184 JumpTarget::set_compiling_deferred_code(false); 184 JumpTarget::set_compiling_deferred_code(false);
185 185
186 #ifdef DEBUG 186 #ifdef DEBUG
187 if (strlen(FLAG_stop_at) > 0 && 187 if (strlen(FLAG_stop_at) > 0 &&
188 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { 188 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
189 frame_->SpillAll(); 189 frame_->SpillAll();
190 __ int3(); 190 __ int3();
191 } 191 }
192 #endif 192 #endif
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // compile an artificial return statement just above, and (b) there 351 // compile an artificial return statement just above, and (b) there
352 // are return statements in the body but (c) they are all shadowed. 352 // are return statements in the body but (c) they are all shadowed.
353 Result return_value; 353 Result return_value;
354 function_return_.Bind(&return_value); 354 function_return_.Bind(&return_value);
355 GenerateReturnSequence(&return_value); 355 GenerateReturnSequence(&return_value);
356 } 356 }
357 } 357 }
358 } 358 }
359 359
360 // Adjust for function-level loop nesting. 360 // Adjust for function-level loop nesting.
361 ASSERT_EQ(loop_nesting_, info->loop_nesting()); 361 ASSERT_EQ(loop_nesting_, info->is_in_loop() ? 1 : 0);
362 loop_nesting_ = 0; 362 loop_nesting_ = 0;
363 363
364 // Code generation state must be reset. 364 // Code generation state must be reset.
365 ASSERT(state_ == NULL); 365 ASSERT(state_ == NULL);
366 ASSERT(!function_return_is_shadowed_); 366 ASSERT(!function_return_is_shadowed_);
367 function_return_.Unuse(); 367 function_return_.Unuse();
368 DeleteFrame(); 368 DeleteFrame();
369 369
370 // Process any deferred code using the register allocator. 370 // Process any deferred code using the register allocator.
371 if (!HasStackOverflow()) { 371 if (!HasStackOverflow()) {
(...skipping 9764 matching lines...) Expand 10 before | Expand all | Expand 10 after
10136 masm.GetCode(&desc); 10136 masm.GetCode(&desc);
10137 // Call the function from C++. 10137 // Call the function from C++.
10138 return FUNCTION_CAST<MemCopyFunction>(buffer); 10138 return FUNCTION_CAST<MemCopyFunction>(buffer);
10139 } 10139 }
10140 10140
10141 #undef __ 10141 #undef __
10142 10142
10143 } } // namespace v8::internal 10143 } } // namespace v8::internal
10144 10144
10145 #endif // V8_TARGET_ARCH_IA32 10145 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698