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

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

Issue 548029: Fix a problem when compiling built-ins with the top-level compiler.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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 | « src/fast-codegen.h ('k') | src/ia32/fast-codegen-ia32.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 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 178
179 void FastCodeGenerator::SetStatementPosition(Statement* stmt) { 179 void FastCodeGenerator::SetStatementPosition(Statement* stmt) {
180 if (FLAG_debug_info) { 180 if (FLAG_debug_info) {
181 CodeGenerator::RecordPositions(masm_, stmt->statement_pos()); 181 CodeGenerator::RecordPositions(masm_, stmt->statement_pos());
182 } 182 }
183 } 183 }
184 184
185 185
186 void FastCodeGenerator::SetStatementPosition(int pos) {
187 if (FLAG_debug_info) {
188 CodeGenerator::RecordPositions(masm_, pos);
189 }
190 }
191
192
186 void FastCodeGenerator::SetSourcePosition(int pos) { 193 void FastCodeGenerator::SetSourcePosition(int pos) {
187 if (FLAG_debug_info && pos != RelocInfo::kNoPosition) { 194 if (FLAG_debug_info && pos != RelocInfo::kNoPosition) {
188 masm_->RecordPosition(pos); 195 masm_->RecordPosition(pos);
189 } 196 }
190 } 197 }
191 198
192 199
193 void FastCodeGenerator::EmitLogicalOperation(BinaryOperation* expr) { 200 void FastCodeGenerator::EmitLogicalOperation(BinaryOperation* expr) {
194 #ifdef DEBUG 201 #ifdef DEBUG
195 Expression::Context expected = Expression::kUninitialized; 202 Expression::Context expected = Expression::kUninitialized;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 while (current != NULL) { 360 while (current != NULL) {
354 stack_depth = current->Exit(stack_depth); 361 stack_depth = current->Exit(stack_depth);
355 current = current->outer(); 362 current = current->outer();
356 } 363 }
357 __ Drop(stack_depth); 364 __ Drop(stack_depth);
358 365
359 EmitReturnSequence(stmt->statement_pos()); 366 EmitReturnSequence(stmt->statement_pos());
360 } 367 }
361 368
362 369
363
364
365 void FastCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) { 370 void FastCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) {
366 Comment cmnt(masm_, "[ WithEnterStatement"); 371 Comment cmnt(masm_, "[ WithEnterStatement");
367 SetStatementPosition(stmt); 372 SetStatementPosition(stmt);
368 373
369 Visit(stmt->expression()); 374 Visit(stmt->expression());
370 if (stmt->is_catch_block()) { 375 if (stmt->is_catch_block()) {
371 __ CallRuntime(Runtime::kPushCatchContext, 1); 376 __ CallRuntime(Runtime::kPushCatchContext, 1);
372 } else { 377 } else {
373 __ CallRuntime(Runtime::kPushContext, 1); 378 __ CallRuntime(Runtime::kPushContext, 1);
374 } 379 }
(...skipping 30 matching lines...) Expand all
405 increment_loop_depth(); 410 increment_loop_depth();
406 411
407 __ bind(&body); 412 __ bind(&body);
408 Visit(stmt->body()); 413 Visit(stmt->body());
409 414
410 // Check stack before looping. 415 // Check stack before looping.
411 __ StackLimitCheck(&stack_limit_hit); 416 __ StackLimitCheck(&stack_limit_hit);
412 __ bind(&stack_check_success); 417 __ bind(&stack_check_success);
413 418
414 __ bind(loop_statement.continue_target()); 419 __ bind(loop_statement.continue_target());
420 SetStatementPosition(stmt->condition_position());
415 VisitForControl(stmt->cond(), &body, loop_statement.break_target()); 421 VisitForControl(stmt->cond(), &body, loop_statement.break_target());
416 422
417 __ bind(&stack_limit_hit); 423 __ bind(&stack_limit_hit);
418 StackCheckStub stack_stub; 424 StackCheckStub stack_stub;
419 __ CallStub(&stack_stub); 425 __ CallStub(&stack_stub);
420 __ jmp(&stack_check_success); 426 __ jmp(&stack_check_success);
421 427
422 __ bind(loop_statement.break_target()); 428 __ bind(loop_statement.break_target());
423 429
424 decrement_loop_depth(); 430 decrement_loop_depth();
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 __ Drop(stack_depth); 757 __ Drop(stack_depth);
752 __ PopTryHandler(); 758 __ PopTryHandler();
753 return 0; 759 return 0;
754 } 760 }
755 761
756 762
757 #undef __ 763 #undef __
758 764
759 765
760 } } // namespace v8::internal 766 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/fast-codegen.h ('k') | src/ia32/fast-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698